]> git.mxchange.org Git - flightgear.git/blobdiff - Main/fg_init.c
Tons of little changes to clean up the code and to remove fatal errors
[flightgear.git] / Main / fg_init.c
index 60bbc65b8ecc8ca6c8a24b263cf5457188862ed1..c1c9df13372c0bde8eb2ea682a6c399cc2a3df20 100644 (file)
 #include "../Include/general.h"
 
 #include "../Aircraft/aircraft.h"
+#include "../Astro/moon.h"
+#include "../Astro/sky.h"
+#include "../Astro/stars.h"
+#include "../Astro/sun.h"
 #include "../Cockpit/cockpit.h"
 #include "../Joystick/joystick.h"
 #include "../Math/fg_random.h"
 #include "../Scenery/mesh.h"
-#include "../Scenery/moon.h"
 #include "../Scenery/scenery.h"
-#include "../Scenery/sky.h"
-#include "../Scenery/stars.h"
-#include "../Scenery/sun.h"
+#include "../Scenery/tilemgr.h"
 #include "../Time/event.h"
 #include "../Time/fg_time.h"
 #include "../Time/sunpos.h"
@@ -109,11 +110,23 @@ void fgInitSubsystems( void ) {
     FG_Runway_altitude = 3234.5;
     FG_Runway_heading = 102.0 * DEG_TO_RAD;
 
-    /* Initial Position at GLOBE airport */
+    /* Initial Position at (P13) GLOBE airport */
     FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD;
     FG_Latitude  = (  120070.41 / 3600.0 ) * DEG_TO_RAD;
     FG_Altitude = FG_Runway_altitude + 3.758099;
     
+    /* Initial Position at (SEZ) SEDONA airport */
+    FG_Longitude = -111.7884614 * DEG_TO_RAD;
+    FG_Latitude  = 34.8486289 * DEG_TO_RAD;
+    FG_Runway_altitude = 4827;
+    FG_Altitude = FG_Runway_altitude + 3.758099;
+    
+    /* Initial Position at (ANE) Anoka County airport */
+    FG_Longitude = -93.2113889 * DEG_TO_RAD;
+    FG_Latitude  = 45.145 * DEG_TO_RAD;
+    FG_Runway_altitude = 912;
+    FG_Altitude = FG_Runway_altitude + 3.758099;
+    
     /* Initial Position north of the city of Globe */
     /* FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
     /* FG_Latitude  = (  120625.64 / 3600.0 ) * DEG_TO_RAD; */
@@ -121,6 +134,12 @@ void fgInitSubsystems( void ) {
     /* FG_Latitude  = (  119548.21 / 3600.0 ) * DEG_TO_RAD; */
     /* FG_Altitude = 0.0 + 3.758099; */
 
+    /* Initial Posisition near where I used to live in Globe, AZ */
+    /* FG_Longitude = ( -398757.6 / 3600.0 ) * DEG_TO_RAD; */
+    /* FG_Latitude  = (  120160.0 / 3600.0 ) * DEG_TO_RAD; */
+    /* FG_Runway_altitude = 5000.0; */
+    /* FG_Altitude = FG_Runway_altitude + 3.758099; */
+
     /* Initial Position: 10125 Jewell St. NE */
     /* FG_Longitude = ( -93.15 ) * DEG_TO_RAD; */
     /* FG_Latitude  = (  45.15 ) * DEG_TO_RAD; */
@@ -129,10 +148,9 @@ void fgInitSubsystems( void ) {
     /* A random test position */
     /* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
     /* FG_Latitude  = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
-    FG_Runway_altitude = 4000.0;
-    FG_Altitude = FG_Runway_altitude + 3.758099;
 
-    printf("Initial position is: (%.4f, %.4f, %.2f)\n", 
+   printf("Initial position is: (%.4f, %.4f, %.2f)\n", 
           FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG, 
           FG_Altitude * FEET_TO_METER);
 
@@ -217,17 +235,19 @@ void fgInitSubsystems( void ) {
     fgEventRegister( "fgSunInit()", fgSunInit, FG_EVENT_READY, 600000 );
 
     /* Intialize the moon's position */
-    fgEventRegister( "fgMoonInit()", fgSunInit, FG_EVENT_READY, 600000 );
+    fgEventRegister( "fgMoonInit()", fgMoonInit, FG_EVENT_READY, 600000 );
 
     /* Initialize the "sky" */
     fgSkyInit();
 
     /* Initialize the Scenery Management subsystem */
-    fgSceneryInit();
+    fgTileMgrInit();
+    /* fgSceneryInit(); */
 
     /* Tell the Scenery Management system where we are so it can load
      * the correct scenery data */
-    fgSceneryUpdate(FG_Latitude, FG_Longitude, FG_Altitude);
+    fgTileMgrUpdate();
+    /* fgSceneryUpdate(FG_Latitude, FG_Longitude, FG_Altitude); */
 
     /* I'm just sticking this here for now, it should probably move 
      * eventually */
@@ -267,9 +287,26 @@ void fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.26  1997/12/30 23:09:04  curt
-/* Tweaking initialization sequences.
+/* Revision 1.31  1998/01/19 18:40:32  curt
+/* Tons of little changes to clean up the code and to remove fatal errors
+/* when building with the c++ compiler.
 /*
+ * Revision 1.30  1998/01/13 00:23:09  curt
+ * Initial changes to support loading and management of scenery tiles.  Note,
+ * there's still a fair amount of work left to be done.
+ *
+ * Revision 1.29  1998/01/08 02:22:08  curt
+ * Beginning to integrate Tile management subsystem.
+ *
+ * Revision 1.28  1998/01/07 03:18:58  curt
+ * Moved astronomical stuff from .../Src/Scenery to .../Src/Astro/
+ *
+ * Revision 1.27  1998/01/05 18:44:35  curt
+ * Add an option to advance/decrease time from keyboard.
+ *
+ * Revision 1.26  1997/12/30 23:09:04  curt
+ * Tweaking initialization sequences.
+ *
  * Revision 1.25  1997/12/30 22:22:33  curt
  * Further integration of event manager.
  *