]> git.mxchange.org Git - flightgear.git/commitdiff
Renamed class fgFLIGHT to class FGState as per request by JSB.
authorcurt <curt>
Sat, 5 Dec 1998 15:53:59 +0000 (15:53 +0000)
committercurt <curt>
Sat, 5 Dec 1998 15:53:59 +0000 (15:53 +0000)
26 files changed:
Aircraft/aircraft.cxx
Aircraft/aircraft.hxx
Astro/moon.cxx
Astro/sky.cxx
Astro/stars.cxx
Autopilot/autopilot.cxx
Cockpit/cockpit.cxx
External/external.cxx
External/external.hxx
FDM/LaRCsim.cxx
FDM/LaRCsim.hxx
FDM/flight.cxx
FDM/flight.hxx
Main/GLUTkey.cxx
Main/GLUTmain.cxx
Main/fg_init.cxx
Main/fg_serial.cxx
Main/options.cxx
Main/views.cxx
Main/views.hxx
Scenery/tilemgr.cxx
Slew/slew.cxx
Time/fg_time.cxx
Time/fg_time.hxx
Time/light.cxx
Weather/weather.cxx

index 5484a93dcde5c41cabbb972d68f641b90cf9b3a5..41cd56e4a37bd3b4272e22e134c3043149e6902b 100644 (file)
@@ -37,16 +37,16 @@ fgAIRCRAFT current_aircraft;
 void fgAircraftInit( void ) {
     FG_LOG( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure" );
 
-    current_aircraft.flight   = &cur_flight_params;
+    current_aircraft.fdm_state   = &cur_fdm_state;
     current_aircraft.controls = &controls;
 }
 
 
 // Display various parameters to stdout
 void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
-    fgFLIGHT *f;
+    FGState *f;
 
-    f = a->flight;
+    f = a->fdm_state;
 
     FG_LOG( FG_FLIGHT, FG_DEBUG,
            "Pos = ("
@@ -68,6 +68,9 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
 
 
 // $Log$
+// Revision 1.6  1998/12/05 15:53:59  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.5  1998/12/03 01:14:58  curt
 // Converted fgFLIGHT to a class.
 //
index 5bf546630c4c02e46f664f095987b62edabf9fb2..afa6e2018bb08ba5318bc9833b0ea4cb23831d7c 100644 (file)
@@ -39,7 +39,7 @@
 
 // Define a structure containing all the parameters for an aircraft
 typedef struct{
-    fgFLIGHT   *flight;
+    FGState   *fdm_state;
     fgCONTROLS *controls;
 } fgAIRCRAFT ;
 
@@ -61,6 +61,9 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a);
 
 
 // $Log$
+// Revision 1.3  1998/12/05 15:54:01  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.2  1998/10/17 01:33:54  curt
 // C++ ifying ...
 //
index 694e9a7aec02bf6f5701499b055da487e05bd7ae..6ca80c5aee8560c152eabc8960b47c51d94b4e70 100644 (file)
@@ -112,10 +112,10 @@ void Moon::updatePosition(fgTIME *t, Star *ourSun)
     geoRa, geoDec;
   
   fgAIRCRAFT *air;
-  fgFLIGHT *f;
+  FGState *f;
 
   air = &current_aircraft;
-  f = air->flight;
+  f = air->fdm_state;
  
   updateOrbElements(t);
   actTime = fgCalcActTime(t);
index 434a0377d62f4eabe23f8e94e7bd134c29f75526..433ec7ed0269cc2634363514efed874925cb9f6c 100644 (file)
@@ -255,7 +255,7 @@ void fgSkyInit( void ) {
 
 // Draw the Sky
 void fgSkyRender( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgLIGHT *l;
     fgVIEW *v;
     float inner_color[4];
@@ -264,7 +264,7 @@ void fgSkyRender( void ) {
     double diff;
     int i;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     l = &cur_light_params;
     v = &current_view;
 
@@ -365,6 +365,9 @@ void fgSkyRender( void ) {
 
 
 // $Log$
+// Revision 1.16  1998/12/05 15:54:03  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.15  1998/12/03 01:15:36  curt
 // Converted fgFLIGHT to a class.
 // Tweaks for Sun portability.
index af910f77dbf9b81a98aa21b0475fee6afacfc635..35ce9aaf268f3bd7efca5aa20ee7c14ea1970994 100644 (file)
@@ -210,13 +210,13 @@ int fgStarsInit( void ) {
 
 // Draw the Stars
 void fgStarsRender( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgVIEW *v;
     fgLIGHT *l;
     fgTIME *t;
     int i;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     l = &cur_light_params;
     t = &cur_time_params;
     v = &current_view;
@@ -256,6 +256,9 @@ void fgStarsRender( void ) {
 
 
 // $Log$
+// Revision 1.24  1998/12/05 15:54:04  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.23  1998/11/23 21:48:28  curt
 // Borland portability tweaks.
 //
index 46073ad7f821fd9e9076f6685aae65f2b0918d80..defe45f8959969ef996dc7f84c8a340becec8c88 100644 (file)
 
 static double get_speed( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_V_equiv_kts() );    // Make an explicit function call.
 }
 
 static double get_aoa( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
               
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Gamma_vert_rad() * RAD_TO_DEG );
 }
 
 static double fgAPget_roll( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Phi() * RAD_TO_DEG );
 }
 
 static double get_pitch( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
               
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Theta() );
 }
 
 double fgAPget_heading( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Psi() * RAD_TO_DEG );
 }
 
 static double fgAPget_altitude( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
 
        return( f->get_Altitude() * FEET_TO_METER /* -rough_elev */ );
 }
 
 static double fgAPget_climb( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
 
        // return in meters per minute
        return( f->get_Climb_Rate() * FEET_TO_METER * 60 );
@@ -109,19 +109,19 @@ static double fgAPget_climb( void )
 
 static double get_sideslip( void )
 {
-        fgFLIGHT *f;
+        FGState *f;
         
-        f = current_aircraft.flight;
+        f = current_aircraft.fdm_state;
         
         return( f->get_Beta() );
 }
 
 static double fgAPget_agl( void )
 {
-        fgFLIGHT *f;
+        FGState *f;
         double agl;
 
-        f = current_aircraft.flight;
+        f = current_aircraft.fdm_state;
         agl = f->get_Altitude() * FEET_TO_METER - scenery.cur_elev;
 
         return( agl );
index d5562ebbf202238bd78a4b4298ec207957769998..876e2100a554b8f1dd773406ad80da186e4e22b0 100644 (file)
@@ -66,8 +66,8 @@ static pCockpit ac_cockpit;
 
 double get_latitude( void )
 {
-       fgFLIGHT *f;
-       f = current_aircraft.flight;
+       FGState *f;
+       f = current_aircraft.fdm_state;
 
 //     return( toDM(FG_Latitude * RAD_TO_DEG) );
        return((double)((int)( f->get_Latitude() * RAD_TO_DEG)) );
@@ -75,10 +75,10 @@ double get_latitude( void )
 
 double get_lat_min( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
        double      a, d;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        
        a = f->get_Latitude() * RAD_TO_DEG;     
        if (a < 0.0) {
@@ -91,18 +91,18 @@ double get_lat_min( void )
 
 double get_longitude( void )
 {
-       fgFLIGHT *f;
-       f = current_aircraft.flight;
+       FGState *f;
+       f = current_aircraft.fdm_state;
 
 //     return( toDM(FG_Longitude * RAD_TO_DEG) );
        return((double)((int) (f->get_Longitude() * RAD_TO_DEG)) );
 }
 double get_long_min( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
        double  a, d;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        
        a = f->get_Longitude() * RAD_TO_DEG;    
        if (a < 0.0) {
@@ -139,50 +139,50 @@ double get_rudderval( void )
 
 double get_speed( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_V_equiv_kts() );    // Make an explicit function call.
 }
 
 double get_aoa( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
               
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Gamma_vert_rad() * RAD_TO_DEG );
 }
 
 double get_roll( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Phi() );
 }
 
 double get_pitch( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
               
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Theta() );
 }
 
 double get_heading( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        return( f->get_Psi() * RAD_TO_DEG );
 }
 
 double get_altitude( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
        // double rough_elev;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
        // rough_elev = mesh_altitude(f->get_Longitude() * RAD_TO_ARCSEC,
        //                                 f->get_Latitude()  * RAD_TO_ARCSEC);
 
@@ -195,9 +195,9 @@ double get_altitude( void )
 
 double get_agl( void )
 {
-        fgFLIGHT *f;
+        FGState *f;
 
-        f = current_aircraft.flight;
+        f = current_aircraft.fdm_state;
 
        if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
            return f->get_Altitude() - scenery.cur_elev * METER_TO_FEET;
@@ -208,9 +208,9 @@ double get_agl( void )
 
 double get_sideslip( void )
 {
-        fgFLIGHT *f;
+        FGState *f;
         
-        f = current_aircraft.flight;
+        f = current_aircraft.fdm_state;
         
         return( f->get_Beta() );
 }
@@ -245,9 +245,9 @@ double get_vfc_tris_drawn   ( void )
 
 double get_climb_rate( void )
 {
-       fgFLIGHT *f;
+       FGState *f;
 
-       f = current_aircraft.flight;
+       f = current_aircraft.fdm_state;
 
        if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
            return f->get_Climb_Rate() * 60.0;
@@ -312,6 +312,9 @@ void fgCockpitUpdate( void ) {
 
 
 // $Log$
+// Revision 1.25  1998/12/05 15:54:07  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.24  1998/12/03 01:16:00  curt
 // Converted fgFLIGHT to a class.
 //
index 1352740c1918dac68d0faeda4d843b023046e01f..10bc0553e7d77d8f6be190bf7b7798004cca77a0 100644 (file)
 
 
 // reset flight params to a specific position
-void fgExternalInit(fgFLIGHT &f, double dt) {
+void fgExternalInit( FGState &f, double dt ) {
 
 }
 
 
 // update position based on inputs, positions, velocities, etc.
-void fgExternalUpdate( fgFLIGHT& f, int multiloop ) {
+void fgExternalUpdate( FGState& f, int multiloop ) {
 
 }
 
 
 // $Log$
+// Revision 1.2  1998/12/05 15:54:13  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.1  1998/12/04 01:28:49  curt
 // Initial revision.
 //
index 5087931da8a34c802343b96426910ea2980d22d5..bf65ad0c9c1ba44a8f8a55aad785d84970064b24 100644 (file)
@@ -87,16 +87,19 @@ public:
 
 
 // reset flight params to a specific position 
-void fgExternalInit(fgFLIGHT& f, double dt);
+void fgExternalInit( FGState& f, double dt );
 
 // update position based on inputs, positions, velocities, etc.
-void fgExternalUpdate( fgFLIGHT& f, int multiloop );
+void fgExternalUpdate( FGState& f, int multiloop );
 
 
 #endif // _EXTERNAL_HXX
 
 
 // $Log$
+// Revision 1.3  1998/12/05 15:54:14  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.2  1998/12/05 14:18:47  curt
 // added an fgTIMESTAMP to define when this record is valid.
 //
index bd7570b4d673786cfc208e7d814b03ca608b6ec5..4c8f644cf65fe573efbc89b48121060c713fc315 100644 (file)
@@ -42,7 +42,7 @@ int fgLaRCsimInit(double dt) {
 
 
 // Run an iteration of the EOM (equations of motion)
-int fgLaRCsimUpdate(fgFLIGHT& f, int multiloop) {
+int fgLaRCsimUpdate(FGState& f, int multiloop) {
     double save_alt = 0.0;
 
     // lets try to avoid really screwing up the LaRCsim model
@@ -52,7 +52,7 @@ int fgLaRCsimUpdate(fgFLIGHT& f, int multiloop) {
     }
 
     // translate FG to LaRCsim structure
-    fgFlight_2_LaRCsim(f);
+    FGState_2_LaRCsim(f);
     // printf("FG_Altitude = %.2f\n", FG_Altitude * 0.3048);
     // printf("Altitude = %.2f\n", Altitude * 0.3048);
     // printf("Radius to Vehicle = %.2f\n", Radius_to_vehicle * 0.3048);
@@ -65,7 +65,7 @@ int fgLaRCsimUpdate(fgFLIGHT& f, int multiloop) {
     // translate LaRCsim back to FG structure so that the
     // autopilot (and the rest of the sim can use the updated
     // values
-    fgLaRCsim_2_Flight(f);
+    fgLaRCsim_2_FGState(f);
 
     // but lets restore our original bogus altitude when we are done
     if ( save_alt < -9000.0 ) {
@@ -76,8 +76,8 @@ int fgLaRCsimUpdate(fgFLIGHT& f, int multiloop) {
 }
 
 
-// Convert from the fgFLIGHT struct to the LaRCsim generic_ struct
-int fgFlight_2_LaRCsim (fgFLIGHT& f) {
+// Convert from the FGState struct to the LaRCsim generic_ struct
+int FGState_2_LaRCsim (FGState& f) {
 
     Lat_control = controls.get_aileron();
     Long_control = controls.get_elevator();
@@ -260,8 +260,8 @@ int fgFlight_2_LaRCsim (fgFLIGHT& f) {
 }
 
 
-// Convert from the LaRCsim generic_ struct to the fgFLIGHT struct
-int fgLaRCsim_2_Flight (fgFLIGHT& f) {
+// Convert from the LaRCsim generic_ struct to the FGState struct
+int fgLaRCsim_2_FGState (FGState& f) {
     // Mass properties and geometry values
     f.set_Inertias( Mass, I_xx, I_yy, I_zz, I_xz );
     f.set_Pilot_Location( Dx_pilot, Dy_pilot, Dz_pilot );
@@ -382,6 +382,9 @@ int fgLaRCsim_2_Flight (fgFLIGHT& f) {
 
 
 // $Log$
+// Revision 1.6  1998/12/05 15:54:08  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.5  1998/12/03 04:25:02  curt
 // Working on fixing up new fgFLIGHT class.
 //
index 6d11a3e787351194dba07b30cc14a19f2b0e6c66..e4f2c1877bd99d5e02f9acdda4115561ec3afb9f 100644 (file)
 int fgLaRCsimInit(double dt);
 
 // update position based on inputs, positions, velocities, etc.
-int fgLaRCsimUpdate(fgFLIGHT& f, int multiloop);
+int fgLaRCsimUpdate(FGState& f, int multiloop);
 
-// Convert from the fgFLIGHT struct to the LaRCsim generic_ struct
-int fgFlight_2_LaRCsim (fgFLIGHT& f);
+// Convert from the FGState struct to the LaRCsim generic_ struct
+int FGState_2_LaRCsim (FGState& f);
 
-// Convert from the LaRCsim generic_ struct to the fgFLIGHT struct
-int fgLaRCsim_2_Flight (fgFLIGHT& f);
+// Convert from the LaRCsim generic_ struct to the FGState struct
+int fgLaRCsim_2_FGState (FGState& f);
 
 
 #endif // _LARCSIM_HXX
 
 
 // $Log$
+// Revision 1.4  1998/12/05 15:54:09  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.3  1998/12/03 01:16:38  curt
 // Converted fgFLIGHT to a class.
 //
index ddaf49615a20150da7d0affc6b0a6436c03c67bf..035a6f53ba920306f9c4e489c9b7959ad96884a8 100644 (file)
 #include <Math/fg_geodesy.hxx>
 
 
-fgFLIGHT cur_flight_params;
+FGState cur_fdm_state;
 
 
 // Initialize the flight model parameters
-int fgFlightModelInit(int model, fgFLIGHT& f, double dt) {
+int fgFlightModelInit(int model, FGState& f, double dt) {
     double save_alt = 0.0;
     int result;
 
     FG_LOG( FG_FLIGHT ,FG_INFO, "Initializing flight model" );
 
-    if ( model == fgFLIGHT::FG_SLEW ) {
+    if ( model == FGState::FG_SLEW ) {
        // fgSlewInit(dt);
-    } else if ( model == fgFLIGHT::FG_LARCSIM ) {
+    } else if ( model == FGState::FG_LARCSIM ) {
        // lets try to avoid really screwing up the LaRCsim model
        if ( f.get_Altitude() < -9000.0 ) {
            save_alt = f.get_Altitude();
            f.set_Altitude( 0.0 );
        }
 
-       fgFlight_2_LaRCsim(f);  // translate FG to LaRCsim structure
+       FGState_2_LaRCsim(f);  // translate FG to LaRCsim structure
        fgLaRCsimInit(dt);
        FG_LOG( FG_FLIGHT, FG_INFO, "FG pos = " << f.get_Latitude() );
-       fgLaRCsim_2_Flight(f);  // translate LaRCsim back to FG structure
+       fgLaRCsim_2_FGState(f);  // translate LaRCsim back to FG structure
 
        // but lets restore our original bogus altitude when we are done
        if ( save_alt < -9000.0 ) {
            f.set_Altitude( save_alt );
        }
-    } else if ( model == fgFLIGHT::FG_EXTERNAL ) {
+    } else if ( model == FGState::FG_EXTERNAL ) {
        fgExternalInit(f, dt);
     } else {
        FG_LOG( FG_FLIGHT, FG_WARN,
@@ -76,7 +76,7 @@ int fgFlightModelInit(int model, fgFLIGHT& f, double dt) {
 
 
 // Run multiloop iterations of the flight model
-int fgFlightModelUpdate(int model, fgFLIGHT& f, int multiloop) {
+int fgFlightModelUpdate(int model, FGState& f, int multiloop) {
     double time_step, start_elev, end_elev;
     int result;
     // printf("Altitude = %.2f\n", FG_Altitude * 0.3048);
@@ -84,11 +84,11 @@ int fgFlightModelUpdate(int model, fgFLIGHT& f, int multiloop) {
     time_step = (1.0 / DEFAULT_MODEL_HZ) * multiloop;
     start_elev = f.get_Altitude();
 
-    if ( model == fgFLIGHT::FG_SLEW ) {
+    if ( model == FGState::FG_SLEW ) {
        // fgSlewUpdate(f, multiloop);
-    } else if ( model == fgFLIGHT::FG_LARCSIM ) {
+    } else if ( model == FGState::FG_LARCSIM ) {
        fgLaRCsimUpdate(f, multiloop);
-    } else if ( model == fgFLIGHT::FG_EXTERNAL ) {
+    } else if ( model == FGState::FG_EXTERNAL ) {
        // fgExternalUpdate(f, multiloop);
     } else {
        FG_LOG( FG_FLIGHT, FG_WARN,
@@ -107,7 +107,7 @@ int fgFlightModelUpdate(int model, fgFLIGHT& f, int multiloop) {
 
 
 // Set the altitude (force)
-void fgFlightModelSetAltitude(int model, fgFLIGHT& f, double alt_meters) {
+void fgFlightModelSetAltitude(int model, FGState& f, double alt_meters) {
     double sea_level_radius_meters;
     double lat_geoc;
     // Set the FG variables first
@@ -119,7 +119,7 @@ void fgFlightModelSetAltitude(int model, fgFLIGHT& f, double alt_meters) {
                              (sea_level_radius_meters * METER_TO_FEET) );
 
     // additional work needed for some flight models
-    if ( model == fgFLIGHT::FG_LARCSIM ) {
+    if ( model == FGState::FG_LARCSIM ) {
        ls_ForceAltitude( f.get_Altitude() );
     }
 
@@ -127,6 +127,9 @@ void fgFlightModelSetAltitude(int model, fgFLIGHT& f, double alt_meters) {
 
 
 // $Log$
+// Revision 1.6  1998/12/05 15:54:11  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.5  1998/12/04 01:29:39  curt
 // Stubbed in a new flight model called "External" which is expected to be driven
 // from some external source.
index bbedb8940873544069531a398ab9f865f50ffe04..802a7bfcd3b80b846c2075a0464e6c40b30cf2b1 100644 (file)
@@ -38,7 +38,7 @@ typedef double FG_VECTOR_3[3];
 
 
 // This is based heavily on LaRCsim/ls_generic.h
-class fgFLIGHT {
+class FGState {
 
 public:
 
@@ -313,7 +313,7 @@ public:
        v_local_v[2] = down;
     }
 
-    FG_VECTOR_3    v_local_rel_ground_v; /* V rel w.r.t. earth surface   */
+    FG_VECTOR_3    v_local_rel_ground_v; // V rel w.r.t. earth surface  
     inline double * get_V_local_rel_ground_v() { return v_local_rel_ground_v; }
     inline double get_V_north_rel_ground() const {
        return v_local_rel_ground_v[0];
@@ -330,7 +330,7 @@ public:
        v_local_rel_ground_v[2] = down;
     }
 
-    FG_VECTOR_3    v_local_airmass_v;   /* velocity of airmass (steady winds) */
+    FG_VECTOR_3    v_local_airmass_v;   // velocity of airmass (steady winds)
     inline double * get_V_local_airmass_v() { return v_local_airmass_v; }
     inline double get_V_north_airmass() const { return v_local_airmass_v[0]; }
     inline double get_V_east_airmass() const { return v_local_airmass_v[1]; }
@@ -343,8 +343,8 @@ public:
        v_local_airmass_v[2] = down;
     }
 
-    FG_VECTOR_3    v_local_rel_airmass_v;  /* velocity of veh. relative to */
-    /* airmass */
+    FG_VECTOR_3    v_local_rel_airmass_v;  // velocity of veh. relative to
+    // airmass
     inline double * get_V_local_rel_airmass_v() {
        return v_local_rel_airmass_v;
     }
@@ -365,7 +365,7 @@ public:
        v_local_rel_airmass_v[2] = down;
     }
 
-    FG_VECTOR_3    v_local_gust_v; /* linear turbulence components, L frame */
+    FG_VECTOR_3    v_local_gust_v; // linear turbulence components, L frame
     inline double * get_V_local_gust_v() { return v_local_gust_v; }
     inline double get_U_gust() const { return v_local_gust_v[0]; }
     inline double get_V_gust() const { return v_local_gust_v[1]; }
@@ -377,7 +377,7 @@ public:
        v_local_gust_v[2] = w;
     }
     
-    FG_VECTOR_3    v_wind_body_v;  /* Wind-relative velocities in body axis */
+    FG_VECTOR_3    v_wind_body_v;  // Wind-relative velocities in body axis
     inline double * get_V_wind_body_v() { return v_wind_body_v; }
     inline double get_U_body() const { return v_wind_body_v[0]; }
     inline double get_V_body() const { return v_wind_body_v[1]; }
@@ -420,7 +420,7 @@ public:
     inline double get_V_calibrated_kts() const { return v_calibrated_kts; }
     inline void set_V_calibrated_kts( double kts ) { v_calibrated_kts = kts; }
 
-    FG_VECTOR_3    omega_body_v;   /* Angular B rates      */
+    FG_VECTOR_3    omega_body_v;   // Angular B rates     
     inline double * get_Omega_body_v() { return omega_body_v; }
     inline double get_P_body() const { return omega_body_v[0]; }
     inline double get_Q_body() const { return omega_body_v[1]; }
@@ -431,7 +431,7 @@ public:
        omega_body_v[2] = r;
     }
 
-    FG_VECTOR_3    omega_local_v;  /* Angular L rates      */
+    FG_VECTOR_3    omega_local_v;  // Angular L rates     
     inline double * get_Omega_local_v() { return omega_local_v; }
     inline double get_P_local() const { return omega_local_v[0]; }
     inline double get_Q_local() const { return omega_local_v[1]; }
@@ -442,7 +442,7 @@ public:
        omega_local_v[2] = r;
     }
 
-    FG_VECTOR_3    omega_total_v;  /* Diff btw B & L       */
+    FG_VECTOR_3    omega_total_v;  // Diff btw B & L      
     inline double * get_Omega_total_v() { return omega_total_v; }
     inline double get_P_total() const { return omega_total_v[0]; }
     inline double get_Q_total() const { return omega_total_v[1]; }
@@ -464,7 +464,7 @@ public:
        euler_rates_v[2] = psi;
     }
 
-    FG_VECTOR_3    geocentric_rates_v;     /* Geocentric linear velocities */
+    FG_VECTOR_3    geocentric_rates_v;     // Geocentric linear velocities
     inline double * get_Geocentric_rates_v() { return geocentric_rates_v; }
     inline double get_Latitude_dot() const { return geocentric_rates_v[0]; }
     inline double get_Longitude_dot() const { return geocentric_rates_v[1]; }
@@ -529,7 +529,7 @@ public:
 
     /*======================= Miscellaneous quantities ========================*/
 
-    double    t_local_to_body_m[3][3];    /* Transformation matrix L to B */
+    double    t_local_to_body_m[3][3];    // Transformation matrix L to B
     // inline double * get_T_local_to_body_m() { return t_local_to_body_m; }
     inline double get_T_local_to_body_11() const {
        return t_local_to_body_m[0][0];
@@ -567,15 +567,15 @@ public:
        }
     }
 
-    double    gravity;            /* Local acceleration due to G  */
+    double    gravity;            // Local acceleration due to G 
     inline double get_Gravity() const { return gravity; }
     inline void set_Gravity(double g) { gravity = g; }
     
-    double    centrifugal_relief; /* load factor reduction due to speed */
+    double    centrifugal_relief; // load factor reduction due to speed
     inline double get_Centrifugal_relief() const { return centrifugal_relief; }
     inline void set_Centrifugal_relief(double cr) { centrifugal_relief = cr; }
 
-    double    alpha, beta, alpha_dot, beta_dot;   /* in radians   */
+    double    alpha, beta, alpha_dot, beta_dot;   // in radians  
     inline double get_Alpha() const { return alpha; }
     inline void set_Alpha( double a ) { alpha = a; }
     inline double get_Beta() const { return beta; }
@@ -609,7 +609,7 @@ public:
     inline double get_Sin_psi() const { return sin_psi; }
     inline void set_Sin_psi( double sp ) { sin_psi = sp; }
 
-    double    gamma_vert_rad, gamma_horiz_rad;    /* Flight path angles   */
+    double    gamma_vert_rad, gamma_horiz_rad;    // Flight path angles  
     inline double get_Gamma_vert_rad() const { return gamma_vert_rad; }
     inline void set_Gamma_vert_rad( double gv ) { gamma_vert_rad = gv; }
     inline double get_Gamma_horiz_rad() const { return gamma_horiz_rad; }
@@ -667,7 +667,7 @@ public:
     inline double get_Radius_to_rwy() const { return radius_to_rwy; }
     inline void set_Radius_to_rwy( double r ) { radius_to_rwy = r; }
 
-    FG_VECTOR_3    d_cg_rwy_local_v;       /* CG rel. to rwy in local coords */
+    FG_VECTOR_3    d_cg_rwy_local_v;       // CG rel. to rwy in local coords
     inline double * get_D_cg_rwy_local_v() { return d_cg_rwy_local_v; }
     inline double get_D_cg_north_of_rwy() const { return d_cg_rwy_local_v[0]; }
     inline double get_D_cg_east_of_rwy() const { return d_cg_rwy_local_v[1]; }
@@ -679,7 +679,7 @@ public:
        d_cg_rwy_local_v[2] = above;
     }
 
-    FG_VECTOR_3    d_cg_rwy_rwy_v; /* CG relative to rwy, in rwy coordinates */
+    FG_VECTOR_3    d_cg_rwy_rwy_v; // CG relative to rwy, in rwy coordinates
     inline double * get_D_cg_rwy_rwy_v() { return d_cg_rwy_rwy_v; }
     inline double get_X_cg_rwy() const { return d_cg_rwy_rwy_v[0]; }
     inline double get_Y_cg_rwy() const { return d_cg_rwy_rwy_v[1]; }
@@ -691,7 +691,7 @@ public:
        d_cg_rwy_rwy_v[2] = h;
     }
 
-    FG_VECTOR_3    d_pilot_rwy_local_v;  /* pilot rel. to rwy in local coords */
+    FG_VECTOR_3    d_pilot_rwy_local_v;  // pilot rel. to rwy in local coords
     inline double * get_D_pilot_rwy_local_v() { return d_pilot_rwy_local_v; }
     inline double get_D_pilot_north_of_rwy() const {
        return d_pilot_rwy_local_v[0];
@@ -709,7 +709,7 @@ public:
        d_pilot_rwy_local_v[2] = above;
     }
 
-    FG_VECTOR_3   d_pilot_rwy_rwy_v;   /* pilot rel. to rwy, in rwy coords. */
+    FG_VECTOR_3   d_pilot_rwy_rwy_v;   // pilot rel. to rwy, in rwy coords.
     inline double * get_D_pilot_rwy_rwy_v() { return d_pilot_rwy_rwy_v; }
     inline double get_X_pilot_rwy() const { return d_pilot_rwy_rwy_v[0]; }
     inline double get_Y_pilot_rwy() const { return d_pilot_rwy_rwy_v[1]; }
@@ -721,31 +721,34 @@ public:
        d_pilot_rwy_rwy_v[2] = h;
     }
 
-    double        climb_rate;           /* in feet per second */
+    double        climb_rate;           // in feet per second
     inline double get_Climb_Rate() const { return climb_rate; }
     inline void set_Climb_Rate(double rate) { climb_rate = rate; }
 };
 
 
-extern fgFLIGHT cur_flight_params;
+extern FGState cur_fdm_state;
 
 
-/* General interface to the flight model routines */
+// General interface to the flight model routines
 
-/* Initialize the flight model parameters */
-int fgFlightModelInit(int model, fgFLIGHT& f, double dt);
+// Initialize the flight model parameters
+int fgFlightModelInit(int model, FGState& f, double dt);
 
-/* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, fgFLIGHT& f, int multiloop);
+// Run multiloop iterations of the flight model
+int fgFlightModelUpdate(int model, FGState& f, int multiloop);
 
-/* Set the altitude (force) */
-void fgFlightModelSetAltitude(int model, fgFLIGHT& f, double alt_meters);
+// Set the altitude (force)
+void fgFlightModelSetAltitude(int model, FGState& f, double alt_meters);
 
 
 #endif // _FLIGHT_HXX
 
 
 // $Log$
+// Revision 1.6  1998/12/05 15:54:12  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.5  1998/12/04 01:29:40  curt
 // Stubbed in a new flight model called "External" which is expected to be driven
 // from some external source.
index edd0559e870cb8d08c0c8aae4a36b5c26cbb1453..2a3d41866d39675cea3fd1c21c8f285dc95bc0f0 100644 (file)
@@ -69,14 +69,14 @@ static void local_update_sky_and_lighting_params( void ) {
 
 // Handle keyboard events
 void GLUTkey(unsigned char k, int x, int y) {
-    fgFLIGHT *f;
+    FGState *f;
     fgTIME *t;
     fgVIEW *v;
     struct fgWEATHER *w;
     float fov, tmp;
     static bool winding_ccw = true;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     t = &cur_time_params;
     v = &current_view;
     w = &current_weather;
@@ -386,6 +386,9 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 // $Log$
+// Revision 1.34  1998/12/05 15:54:17  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.33  1998/12/03 01:17:12  curt
 // Converted fgFLIGHT to a class.
 //
index 84873ec3180bb44a309145cea2c85b9a81f601f8..6d46fce53e68fb636ecc5a4b2e29dd2716f52484 100644 (file)
@@ -228,7 +228,7 @@ static void fgUpdateInstrViewParams( void ) {
 
 // Update all Visuals (redraws anything graphics related)
 static void fgRenderFrame( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgLIGHT *l;
     fgTIME *t;
     fgVIEW *v;
@@ -239,7 +239,7 @@ static void fgRenderFrame( void ) {
     GLfloat terrain_color[4] = { 0.54, 0.44, 0.29, 1.0 };
     GLbitfield clear_mask;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     l = &cur_light_params;
     t = &cur_time_params;
     v = &current_view;
@@ -371,13 +371,13 @@ static void fgRenderFrame( void ) {
 
 // Update internal time dependent calculations (i.e. flight model)
 void fgUpdateTimeDepCalcs(int multi_loop) {
-    fgFLIGHT *f;
+    FGState *f;
     fgLIGHT *l;
     fgTIME *t;
     fgVIEW *v;
     int i;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     l = &cur_light_params;
     t = &cur_time_params;
     v = &current_view;
@@ -393,10 +393,10 @@ void fgUpdateTimeDepCalcs(int multi_loop) {
 
        // printf("updating flight model x %d\n", multi_loop);
        fgFlightModelUpdate( current_options.get_flight_model(), 
-                            cur_flight_params, multi_loop );
+                            cur_fdm_state, multi_loop );
     } else {
        fgFlightModelUpdate( current_options.get_flight_model(), 
-                            cur_flight_params, 0 );
+                            cur_fdm_state, 0 );
     }
 
     // update the view angle
@@ -456,7 +456,7 @@ static const double alt_adjust_m = alt_adjust_ft * FEET_TO_METER;
 // What should we do when we have nothing else to do?  Let's get ready
 // for the next move and update the display?
 static void fgMainLoop( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgGENERAL *g;
     fgTIME *t;
     static int remainder = 0;
@@ -464,7 +464,7 @@ static void fgMainLoop( void ) {
     int i;
     double accum;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     g = &general;
     t = &cur_time_params;
 
@@ -490,7 +490,7 @@ static void fgMainLoop( void ) {
                   scenery.cur_elev + alt_adjust_m - 3.0,
                   scenery.cur_elev + alt_adjust_m );
            fgFlightModelSetAltitude( current_options.get_flight_model(), 
-                                     cur_flight_params
+                                     cur_fdm_state
                                      scenery.cur_elev + alt_adjust_m );
 
            FG_LOG( FG_ALL, FG_DEBUG, 
@@ -934,9 +934,9 @@ int fgGlutInitEvents( void ) {
 
 // Main ...
 int main( int argc, char **argv ) {
-    fgFLIGHT *f;
+    FGState *f;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
 
 #ifdef HAVE_BC5PLUS
     _control87(MCW_EM, MCW_EM);  /* defined in float.h */
@@ -1014,6 +1014,9 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.72  1998/12/05 15:54:18  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.71  1998/12/05 14:19:51  curt
 // Looking into a problem with cur_view_params.abs_view_pos initialization.
 //
index de3102da963ef4795f7bd10655b504559cf4dbc5..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();
@@ -332,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
@@ -370,6 +370,9 @@ 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.
 //
index 22655a29746468d79e0a06026f106f471871dcc1..601feb6c38d7f351ff69b574c6b775557a1515d3 100644 (file)
@@ -227,7 +227,7 @@ static void send_nmea_out( fgIOCHANNEL& p ) {
     char dir;
     int deg;
     double min;
-    fgFLIGHT *f;
+    FGState *f;
     fgTIME *t;
 
     // run once every two seconds
@@ -239,7 +239,7 @@ static void send_nmea_out( fgIOCHANNEL& p ) {
        return;
     }
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     t = &cur_time_params;
 
     char utc[10];
@@ -326,7 +326,7 @@ static void send_garmin_out( fgIOCHANNEL& p ) {
     char dir;
     int deg;
     double min;
-    fgFLIGHT *f;
+    FGState *f;
     fgTIME *t;
 
     // run once per second
@@ -338,7 +338,7 @@ static void send_garmin_out( fgIOCHANNEL& p ) {
        return;
     }
     
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     t = &cur_time_params;
 
     char utc[10];
@@ -451,6 +451,9 @@ void fgSerialProcess() {
 
 
 // $Log$
+// Revision 1.7  1998/12/05 15:54:21  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.6  1998/12/03 01:17:18  curt
 // Converted fgFLIGHT to a class.
 //
index 4067acf2791dd0dc8b60b44a9d2360a8eb1b27ec..b9e7b79fd3c021d4c487b6ba0d2428d1ddcd6fe7 100644 (file)
@@ -129,7 +129,7 @@ fgOPTIONS::fgOPTIONS() :
     sound(1),
 
     // Flight Model options
-    flight_model(fgFLIGHT::FG_LARCSIM),
+    flight_model(FGState::FG_LARCSIM),
 
     // Rendering options
     fog(FG_FOG_NICEST),  // nicest
@@ -310,11 +310,11 @@ fgOPTIONS::parse_flight_model( const string& fm ) {
     // printf("flight model = %s\n", fm);
 
     if ( fm == "slew" ) {
-       return fgFLIGHT::FG_SLEW;
+       return FGState::FG_SLEW;
     } else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
-       return fgFLIGHT::FG_LARCSIM;
+       return FGState::FG_LARCSIM;
     } else if ( fm == "external" ) {
-       return fgFLIGHT::FG_EXTERNAL;
+       return FGState::FG_EXTERNAL;
     } else {
        FG_LOG( FG_GENERAL, FG_ALERT, "Unknown flight model = " << fm );
        exit(-1);
@@ -624,6 +624,9 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.34  1998/12/05 15:54:22  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.33  1998/12/04 01:30:44  curt
 // Added support for the External flight model.
 //
index ae8491f2df8ce17cc8b5fb01fb54243f2dadb8c7..79915d84a63cf7b78b3310aa5be680250e133031 100644 (file)
@@ -185,10 +185,10 @@ void fgVIEW::LookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 
 // Update the view volume, position, and orientation
 void fgVIEW::UpdateViewParams( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgLIGHT *l;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     l = &cur_light_params;
 
     UpdateViewMath(f);
@@ -263,7 +263,7 @@ void fgVIEW::UpdateViewParams( void ) {
 
 
 // Update the view parameters
-void fgVIEW::UpdateViewMath( fgFLIGHT *f ) {
+void fgVIEW::UpdateViewMath( FGState *f ) {
     Point3D p;
     MAT3vec vec, forward, v0, minus_z;
     MAT3mat R, TMP, UP, LOCAL, VIEW;
@@ -426,7 +426,7 @@ void fgVIEW::UpdateViewMath( fgFLIGHT *f ) {
 
 // Update the "World to Eye" transformation matrix
 // This is most useful for view frustum culling
-void fgVIEW::UpdateWorldToEye( fgFLIGHT *f ) {
+void fgVIEW::UpdateWorldToEye( FGState *f ) {
     MAT3mat R_Phi, R_Theta, R_Psi, R_Lat, R_Lon, T_view;
     MAT3mat TMP;
     MAT3hvec vec;
@@ -599,6 +599,9 @@ fgVIEW::~fgVIEW( void ) {
 
 
 // $Log$
+// Revision 1.29  1998/12/05 15:54:24  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.28  1998/12/03 01:17:20  curt
 // Converted fgFLIGHT to a class.
 //
index 22b5f1c5f03e759c3e114ead0deb3b8253aee8cb..02c573b7f2d5c545d63c7431efab4b834361597a 100644 (file)
@@ -147,11 +147,12 @@ public:
     // Initialize a view class
     void Init( void );
 
-    void update_globals( fgFLIGHT *f );
+    void update_globals( FGState *f );
 
     // Basically, this is a modified version of the Mesa gluLookAt()
     // function that's been modified slightly so we can capture the
-    // result before sending it off to OpenGL land.
+    // result (and use it later) otherwise this all gets calculated in
+    // OpenGL land and we don't have access to the results.
     void LookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
                 GLdouble centerx, GLdouble centery, GLdouble centerz,
                 GLdouble upx, GLdouble upy, GLdouble upz );
@@ -160,10 +161,10 @@ public:
     void UpdateViewParams( void );
 
     // Update the view parameters
-    void UpdateViewMath( fgFLIGHT *f );
+    void UpdateViewMath( FGState *f );
 
     // Update the "World to Eye" transformation matrix
-    void UpdateWorldToEye(  fgFLIGHT *f );
+    void UpdateWorldToEye( FGState *f );
 
     // Update the field of view parameters
     void UpdateFOV( fgOPTIONS *o );
@@ -180,6 +181,9 @@ extern fgVIEW current_view;
 
 
 // $Log$
+// Revision 1.16  1998/12/05 15:54:25  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.15  1998/10/16 23:27:56  curt
 // C++-ifying.
 //
index 7c63f048b3966befe939cb100599216178dce0d9..369f6bb54b35428051041a417cb8cd60c283cc7a 100644 (file)
@@ -331,14 +331,14 @@ fgTileMgrCurElevOLD( double lon, double lat, const Point3D& abs_view_pos ) {
 // the chunk isn't already in the cache, then read it from disk.
 int fgTileMgrUpdate( void ) {
     fgTILECACHE *c;
-    fgFLIGHT *f;
+    FGState *f;
     fgBUCKET p1, p2;
     static fgBUCKET p_last = {-1000, 0, 0, 0};
     int tile_diameter;
     int i, j, dw, dh;
 
     c = &global_tile_cache;
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
 
     tile_diameter = current_options.get_tile_diameter();
 
@@ -641,7 +641,7 @@ update_tile_geometry( fgTILE *t, GLdouble *MODEL_VIEW)
 
 // Render the local tiles
 void fgTileMgrRender( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgTILECACHE *c;
     fgTILE *t;
     fgVIEW *v;
@@ -655,7 +655,7 @@ void fgTileMgrRender( void ) {
     int drawn = 0;
 
     c = &global_tile_cache;
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     v = &current_view;
 
     tile_diameter = current_options.get_tile_diameter();
@@ -748,6 +748,9 @@ void fgTileMgrRender( void ) {
 
 
 // $Log$
+// Revision 1.49  1998/12/05 15:54:26  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.48  1998/12/05 14:20:21  curt
 // Looking into a terrain intersection problem.
 //
index f84c6c0cabb86ec83cb847021d802567ea99e598..07e4bcab77a07020b80c8bae7677416fa938e81f 100644 (file)
@@ -34,9 +34,9 @@
 
 // reset flight params to a specific position
 void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
-    fgFLIGHT *f;
-
-    f = current_aircraft.flight;
+    FGState *f;
+    
+    f = current_aircraft.fdm_state;
 
     /*
     f->pos_x = pos_x;
@@ -62,10 +62,10 @@ void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
 
 // update position based on inputs, positions, velocities, etc.
 void fgSlewUpdate( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgCONTROLS *c;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     c = current_aircraft.controls;
 
     /* f->Psi += ( c->aileron / 8 );
@@ -83,6 +83,9 @@ void fgSlewUpdate( void ) {
 
 
 // $Log$
+// Revision 1.3  1998/12/05 15:54:16  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.2  1998/10/17 01:34:17  curt
 // C++ ifying ...
 //
index a8b20400c80bde53ee2e308ed53f4c7d1b592740..11cb3b9a359fd9a7e98c21a1ee14eb928fc983cc 100644 (file)
@@ -332,7 +332,7 @@ double sidereal_course(fgTIME *t, double lng) {
 
 
 // Update time variables such as gmt, julian date, and sidereal time
-void fgTimeUpdate(fgFLIGHT *f, fgTIME *t) {
+void fgTimeUpdate(FGState *f, fgTIME *t) {
     double gst_precise, gst_course;
 
     FG_LOG( FG_EVENT, FG_DEBUG, "Updating time" );
@@ -398,6 +398,9 @@ void fgTimeUpdate(fgFLIGHT *f, fgTIME *t) {
 
 
 // $Log$
+// Revision 1.26  1998/12/05 15:54:28  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.25  1998/12/05 14:21:30  curt
 // Moved struct fg_timestamp to class fgTIMESTAMP and moved it's definition
 // to it's own file, timestamp.hxx.
index 60ffd8341a544c7283e52461cc01092a97ed744e..a308cdf1a8a9cc32c654337435e142b5f99c7fc2 100644 (file)
@@ -92,13 +92,16 @@ void fgTimeInit(fgTIME *t);
 
 
 // Update the time dependent variables
-void fgTimeUpdate(fgFLIGHT *f, fgTIME *t);
+void fgTimeUpdate(FGState *f, fgTIME *t);
 
 
 #endif // _FG_TIME_HXX
 
 
 // $Log$
+// Revision 1.11  1998/12/05 15:54:29  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.10  1998/12/05 14:21:31  curt
 // Moved struct fg_timestamp to class fgTIMESTAMP and moved it's definition
 // to it's own file, timestamp.hxx.
index 6cea78b11245f6a68dd31b4ad16df99c320ad69b..9881e42b1ca6a054f7d162f205eeb31bdab70cf5 100644 (file)
@@ -89,7 +89,7 @@ void fgLIGHT::Init( void ) {
 
 // update lighting parameters based on current sun position
 void fgLIGHT::Update( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgTIME *t;
     fgVIEW *v;
     // if the 4th field is 0.0, this specifies a direction ...
@@ -100,7 +100,7 @@ void fgLIGHT::Update( void ) {
     GLfloat base_fog_color[4] = {0.90, 0.90, 1.00, 1.0};
     double deg, ambient, diffuse, sky_brightness;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     t = &cur_time_params;
     v = &current_view;
 
@@ -150,11 +150,11 @@ void fgLIGHT::Update( void ) {
 
 // calculate fog color adjusted for sunrise/sunset effects
 void fgLIGHT::UpdateAdjFog( void ) {
-    fgFLIGHT *f;
+    FGState *f;
     fgVIEW *v;
     double sun_angle_deg, rotation, param1[3], param2[3];
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     v = &current_view;
 
     FG_LOG( FG_EVENT, FG_DEBUG, "Updating adjusted fog parameters." );
@@ -217,6 +217,9 @@ fgLIGHT::~fgLIGHT( void ) {
 
 
 // $Log$
+// Revision 1.23  1998/12/05 15:54:30  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.22  1998/12/03 01:18:42  curt
 // Converted fgFLIGHT to a class.
 //
index 7d838c18391c00ec71aad41b09bf5257fc4fc1ce..21d702c5cf74a0e4fb12e77e3ffc7ace875868a1 100644 (file)
@@ -67,10 +67,10 @@ void fgWeatherUpdate( void ) {
     // temporarily remove the code of this do-nothing routine
 
 // #ifdef FG_WEATHER_UPDATE
-    fgFLIGHT *f;
+    FGState *f;
     struct fgWEATHER *w;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     w = &current_weather;
 
     // Add some random turbulence
@@ -104,6 +104,9 @@ void fgWeatherSetVisibility( float visibility ) {
 
 
 // $Log$
+// Revision 1.4  1998/12/05 15:54:31  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
 // Revision 1.3  1998/11/23 21:49:11  curt
 // Borland portability tweaks.
 //