]> git.mxchange.org Git - flightgear.git/blobdiff - Main/fg_init.cxx
Renamed class fgFLIGHT to class FGState as per request by JSB.
[flightgear.git] / Main / fg_init.cxx
index 720c24893b86696d67295d281ca68b3910d667e7..53aff9d819aae46d17775ba1ef841d36835ebc82 100644 (file)
@@ -75,9 +75,9 @@ extern const char *default_root;
 // Set initial position and orientation
 int fgInitPosition( void ) {
     string id;
-    fgFLIGHT *f;
+    FGState *f;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
 
     id = current_options.get_airport_id();
     if ( id.length() ) {
@@ -154,7 +154,7 @@ int fgInitGeneral( void ) {
 // Returns non-zero if a problem encountered.
 int fgInitSubsystems( void )
 {
-    fgFLIGHT *f;
+    FGState *f;
     fgLIGHT *l;
     fgTIME *t;
     fgVIEW *v;
@@ -173,7 +173,7 @@ int fgInitSubsystems( void )
     // allocates structures so must happen before any of the flight
     // model or control parameters are set
     fgAircraftInit();   // In the future this might not be the case.
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
 
     // set the initial position
     fgInitPosition();
@@ -230,17 +230,17 @@ int fgInitSubsystems( void )
     // and should really be read in from one or more files.
 
     // Initial Velocity
-    f->set_Local_Velocities( 0.0, 0.0, 0.0 );
+    f->set_Velocities_Local( 0.0, 0.0, 0.0 );
 
     // Initial Orientation
-    f->set_Euler_Orientation( current_options.get_roll() * DEG_TO_RAD,
-                             current_options.get_pitch() * DEG_TO_RAD,
-                             current_options.get_heading() * DEG_TO_RAD );
+    f->set_Euler_Angles( current_options.get_roll() * DEG_TO_RAD,
+                        current_options.get_pitch() * DEG_TO_RAD,
+                        current_options.get_heading() * DEG_TO_RAD );
 
     // Initial Angular Body rates
-    f->set_Body_Rates( 7.206685E-05, 0.000000E+00, 9.492658E-05 );
+    f->set_Omega_Body( 7.206685E-05, 0.0, 9.492658E-05 );
 
-    f->set_Earth_position_angle( 0.000000E+00 );
+    f->set_Earth_position_angle( 0.0 );
 
     // Mass properties and geometry values
     f->set_Inertias( 8.547270E+01, 
@@ -267,6 +267,7 @@ int fgInitSubsystems( void )
     v->Init();
     FG_LOG( FG_GENERAL, FG_DEBUG, "After v->init()");
     v->UpdateViewMath(f);
+    FG_LOG( FG_GENERAL, FG_DEBUG, "  abs_view_pos = " << v->abs_view_pos );
     v->UpdateWorldToEye(f);
 
     // Build the solar system
@@ -331,7 +332,7 @@ int fgInitSubsystems( void )
     // Initialize the flight model subsystem data structures base on
     // above values
 
-    fgFlightModelInit( current_options.get_flight_model(), cur_flight_params
+    fgFlightModelInit( current_options.get_flight_model(), cur_fdm_state
                       1.0 / DEFAULT_MODEL_HZ );
 
     // I'm just sticking this here for now, it should probably move
@@ -369,6 +370,15 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// Revision 1.55  1998/12/05 15:54:20  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
+// Revision 1.54  1998/12/05 14:19:53  curt
+// Looking into a problem with cur_view_params.abs_view_pos initialization.
+//
+// Revision 1.53  1998/12/03 04:25:05  curt
+// Working on fixing up new fgFLIGHT class.
+//
 // Revision 1.52  1998/12/03 01:17:17  curt
 // Converted fgFLIGHT to a class.
 //