- procedure EDDP(rCenterLat, rCenterLon, scale : real);
- var
- r08Lat, r08Lon, r26Lat, r26Lon : real; // Runway 08/26
- r10Lat, r10Lon, r28Lat, r28Lon : real; // Runway 10/28
- begin
- // RWY 08/26 eine Linie
- r08Lat := 51.431242*scale;
- r08Lon := 12.215825*scale;
- r26Lat := 51.433647*scale;
- r26Lon := 12.267444*scale;
- // RWY 10/28 auch eine Linie
- r10Lat := 51.418003*scale;
- r10Lon := 12.209653*scale;
- r28Lat := 51.412067*scale;
- r28Lon := 12.244303*scale;
- // Achse X ( Lon ) in Gelb
- glBegin(GL_LINES);
- glColor3F(1,1,0);
- glVertex3F(rCenterLat-0.1,rCenterLon,0);
- glVertex3F(rCenterLat+0.1,rCenterLon,0);
- glEnd;
- // Achse Y ( Lat ) in
- glBegin(GL_LINES);
- glColor3F(0,1,1);
- glVertex3F(rCenterLat,rCenterLon-0.1,0);
- glVertex3F(rCenterLat,rCenterLon+0.1,0);
- glEnd;
- // Runway 08/26
- glBegin(GL_LINES);
- glColor3F(1,0,0);
- glVertex3F(r08Lat, r08Lon, 0);
- glColor3F(0,1,0);
- glVertex3F(r26Lat, r28Lon, 0);
- glEnd;
- // Runway 10/28 in rot
- glBegin(GL_LINES);
- glColor3F(1,0,0);
- glVertex3F(r10Lat, r10Lon, 0);
- glColor3F(0,0,1);
- glVertex3F(r28Lat, r28Lon, 0);
- glEnd;
- end;
- procedure EDDF(rCenterLat, rCenterLon, scale : real);
- var
- r07LLat, r07LLon, r25RLat, r25RLon : real; // Runway 07L/25R
- r07RLat, r07RLon, r25LLat, r25LLon : real; // Runway 07R/25L
- r18Lat, r18Lon, r36Lat, r36Lon : real; // Runway 18/36
- begin
- // Runway 07L/25R
- r07LLat := 50.032617*scale;
- r07LLon := 8.534631*scale;
- r25RLat := 50.045128*scale;
- r25RLon := 8.586981*scale;
- // Runway 07R/25L
- r07RLat := 50.027542*scale;
- r07RLon := 8.534175*scale;
- r25LLat := 50.040053*scale;
- r25LLon := 8.586531*scale;
- // Runway 18/36
- r18Lat := 50.034439*scale;
- r18Lon := 8.525928*scale;
- r36Lat := 49.998417*scale;
- r36Lon := 8.526083*scale;
- // Achse X ( Lon ) in Gelb
- glBegin(GL_LINES);
- glColor3F(1,1,0);
- glVertex3F(rCenterLat,rCenterLon,0);
- glVertex3F(rCenterLat,rCenterLon+0.1,0);
- glEnd;
- glColor3F(1,1,1);
- Form1.PrintText(rCenterLat,rCenterLon+0.1,0,'X');
- // Achse Y ( Lat ) in
- glBegin(GL_LINES);
- glColor3F(0,1,1);
- glVertex3F(rCenterLat,rCenterLon,0);
- glVertex3F(rCenterLat+0.1,rCenterLon,0);
- glEnd;
- glColor3F(1,1,1);
- Form1.PrintText(rCenterLat+0.1,rCenterLon,0,'Y');
- // Runway 07R/25L
- glBegin(GL_LINES);
- glColor3F(1,0,0);
- glVertex3F(r07RLat, r07RLon, 0);
- glColor3F(0,1,0);
- glVertex3F(r25LLat, r25LLon, 0);
- glEnd;
- glColor3F(1,1,1);
- Form1.PrintText(r07RLat, r07RLon,0,'07R');
- Form1.PrintText(r25LLat, r25LLon,0,'25L');
- // Runway 07L/25R in rot
- glBegin(GL_LINES);
- glColor3F(1,0,0);
- glVertex3F(r07LLat, r07LLon, 0);
- glColor3F(0,0,1);
- glVertex3F(r25RLat, r25RLon, 0);
- glEnd;
- glColor3F(1,1,1);
- Form1.PrintText(r07LLat, r07LLon,0,'07L');
- Form1.PrintText(r25RLat, r25RLon,0,'25R');
- // Runway 18/36 in rot/grün
- glBegin(GL_LINES);
- glColor3F(1,0,0);
- glVertex3F(r18Lat, r18Lon, 0);
- glColor3F(0,0,1);
- glVertex3F(r36Lat, r36Lon, 0);
- glEnd;
- glColor3F(1,1,1);
- Form1.PrintText(r18Lat, r18Lon,0,'18');
- Form1.PrintText(r36Lat, r36Lon,0,'36');
- end;
- procedure TForm1.Render;
- var
- rCenterLat, rCenterLon, rCenterAlt : real; // Airport Center
- scale : real;
- rx, ry, rz : integer;
- begin
- scale := tbZoom.Position/10;
- // Zentrum des Airports Leipzig
- //rCenterLat := 51.414997*scale;
- //rCenterLon := 12.226944*scale;
- // Zentrum des Airports EDDF
- rCenterLat := 50.026422*scale;
- rCenterLon := 8.543125*scale;
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity;
- gluPerspective(30.0, ClientWidth/ClientHeight, NearClipping, FarClipping);
- rx := 0;
- ry := 0;
- rZ := 0;
- if rotX.Checked then
- rx := 1;
- if rotY.Checked then
- ry := 1;
- if rotZ.Checked then
- rZ := 1;
- //glRotateF(StrToFloat(edAngle.Text),rx,ry,rz);
- //glRotateF(90,0,1,0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity;
- glTransLateF(rCenterLat*-1,rCenterLon*-1,-5);
- glColor3F(1,1,1);
- //PrintText(rCenterLat,rCenterLon,tbZoom.Position*-1, 'EDDP');
- PrintText(rCenterLat,rCenterLon,tbZoom.Position*-1, 'EDDF');
- //EDDP(rCenterLat, rCenterLon, scale);
- EDDF(rCenterLat, rCenterLon, scale);
- SwapBuffers(DC);
- end;