]> git.mxchange.org Git - flightgear.git/commitdiff
Modifications to incorporate Jon S. Berndts flight model code.
authorcurt <curt>
Fri, 5 Feb 1999 21:28:09 +0000 (21:28 +0000)
committercurt <curt>
Fri, 5 Feb 1999 21:28:09 +0000 (21:28 +0000)
29 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/Makefile.am
FDM/flight.cxx
FDM/flight.hxx
Main/GLUTkey.cxx
Main/GLUTmain.cxx
Main/Makefile.am
Main/fg_init.cxx
Main/fg_serial.cxx
Main/options.cxx
Main/options.hxx
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 41cd56e4a37bd3b4272e22e134c3043149e6902b..ac4b067b08de0c18e3b36e85c4d54ba978ee4224 100644 (file)
@@ -44,7 +44,7 @@ void fgAircraftInit( void ) {
 
 // Display various parameters to stdout
 void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
-    FGState *f;
+    FGInterface *f;
 
     f = a->fdm_state;
 
@@ -68,6 +68,9 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
 
 
 // $Log$
+// Revision 1.7  1999/02/05 21:28:09  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.6  1998/12/05 15:53:59  curt
 // Renamed class fgFLIGHT to class FGState as per request by JSB.
 //
index 2b8c12cfa8c1bcc442114b7a22b7264de954f65b..02e7470eeb0d273da68e030e0fec5e0f67ffaa77 100644 (file)
@@ -39,7 +39,7 @@
 
 // Define a structure containing all the parameters for an aircraft
 typedef struct{
-    FGState   *fdm_state;
+    FGInterface   *fdm_state;
     FGControls *controls;
 } fgAIRCRAFT ;
 
@@ -61,6 +61,9 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a);
 
 
 // $Log$
+// Revision 1.6  1999/02/05 21:28:10  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.5  1999/02/01 21:33:24  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 6e791f5feeb0cb1c9f118865ecea2bd8f1bcd318..1c358dcf64a06f9b28770ea7393fc1af0c59d75e 100644 (file)
@@ -113,7 +113,7 @@ void Moon::updatePosition(fgTIME *t, Star *ourSun)
     geoRa, geoDec;
   
   fgAIRCRAFT *air;
-  FGState *f;
+  FGInterface *f;
 
   air = &current_aircraft;
   f = air->fdm_state;
index 9f3bb50c227326ddc1f4ee54636b3c01007dd540..d5e7730c7cd2876066d524d0d300f249dc0376d1 100644 (file)
@@ -255,7 +255,7 @@ void fgSkyInit( void ) {
 
 // Draw the Sky
 void fgSkyRender( void ) {
-    FGState *f;
+    FGInterface *f;
     fgLIGHT *l;
     float inner_color[4];
     float middle_color[4];
@@ -362,6 +362,9 @@ void fgSkyRender( void ) {
 
 
 // $Log$
+// Revision 1.21  1999/02/05 21:28:50  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.20  1999/02/02 20:13:29  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index 8aae8157be4397d350e0e64589ad28cc78ac472d..8f7bdb23a391f1eba23e3341cbd0cf77085c3cd3 100644 (file)
@@ -220,7 +220,7 @@ int fgStarsInit( void ) {
 
 // Draw the Stars
 void fgStarsRender( void ) {
-    FGState *f;
+    FGInterface *f;
     fgLIGHT *l;
     fgTIME *t;
     int i;
@@ -264,6 +264,9 @@ void fgStarsRender( void ) {
 
 
 // $Log$
+// Revision 1.27  1999/02/05 21:28:52  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.26  1999/02/02 20:13:30  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index 127593aa1710e38cb7a9f30e5ccf7b56d917c4c2..bd930886c1b6d9a3662380c0f977b99bffce303a 100644 (file)
 
 static double get_speed( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_V_equiv_kts() );    // Make an explicit function call.
+    return( current_aircraft.fdm_state->get_V_equiv_kts() );
 }
 
 static double get_aoa( void )
 {
-       FGState *f;
-              
-       f = current_aircraft.fdm_state;
-       return( f->get_Gamma_vert_rad() * RAD_TO_DEG );
+    return( current_aircraft.fdm_state->get_Gamma_vert_rad() * RAD_TO_DEG );
 }
 
 static double fgAPget_roll( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_Phi() * RAD_TO_DEG );
+    return( current_aircraft.fdm_state->get_Phi() * RAD_TO_DEG );
 }
 
 static double get_pitch( void )
 {
-       FGState *f;
-              
-       f = current_aircraft.fdm_state;
-       return( f->get_Theta() );
+    return( current_aircraft.fdm_state->get_Theta() );
 }
 
 double fgAPget_heading( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_Psi() * RAD_TO_DEG );
+    return( current_aircraft.fdm_state->get_Psi() * RAD_TO_DEG );
 }
 
 static double fgAPget_altitude( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-
-       return( f->get_Altitude() * FEET_TO_METER /* -rough_elev */ );
+    return( current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER );
 }
 
 static double fgAPget_climb( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-
-       // return in meters per minute
-       return( f->get_Climb_Rate() * FEET_TO_METER * 60 );
+    // return in meters per minute
+    return( current_aircraft.fdm_state->get_Climb_Rate() * FEET_TO_METER * 60 );
 }
 
 static double get_sideslip( void )
 {
-        FGState *f;
-        
-        f = current_aircraft.fdm_state;
-        
-        return( f->get_Beta() );
+    return( current_aircraft.fdm_state->get_Beta() );
 }
 
 static double fgAPget_agl( void )
 {
-        FGState *f;
         double agl;
 
-        f = current_aircraft.fdm_state;
-        agl = f->get_Altitude() * FEET_TO_METER - scenery.cur_elev;
+        agl = current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER
+           - scenery.cur_elev;
 
         return( agl );
 }
index a489474b9840849370b6291dbe2c0002d7639a3b..e01acf7bfc8e58ee1c7faf04a4d6c1afd7e510c0 100644 (file)
@@ -66,50 +66,38 @@ static pCockpit ac_cockpit;
 
 double get_latitude( void )
 {
-       FGState *f;
-       f = current_aircraft.fdm_state;
-
-//     return( toDM(FG_Latitude * RAD_TO_DEG) );
-       return((double)((int)( f->get_Latitude() * RAD_TO_DEG)) );
+    return((double)((int)( current_aircraft.fdm_state->get_Latitude() 
+                          * RAD_TO_DEG)) );
 }
 
 double get_lat_min( void )
 {
-       FGState *f;
-       double      a, d;
-
-       f = current_aircraft.fdm_state;
-       
-       a = f->get_Latitude() * RAD_TO_DEG;     
-       if (a < 0.0) {
-               a = -a;
-       }
-       d = (double) ( (int) a);
-       return( (a - d) * 60.0);
-}
+    double a, d;
 
+    a = current_aircraft.fdm_state->get_Latitude() * RAD_TO_DEG;       
+    if (a < 0.0) {
+       a = -a;
+    }
+    d = (double) ( (int) a);
+    return( (a - d) * 60.0);
+}
 
 double get_longitude( void )
 {
-       FGState *f;
-       f = current_aircraft.fdm_state;
-
-//     return( toDM(FG_Longitude * RAD_TO_DEG) );
-       return((double)((int) (f->get_Longitude() * RAD_TO_DEG)) );
+    return( (double)((int) (current_aircraft.fdm_state->get_Longitude()
+                           * RAD_TO_DEG)) );
 }
+
 double get_long_min( void )
 {
-       FGState *f;
-       double  a, d;
-
-       f = current_aircraft.fdm_state;
-       
-       a = f->get_Longitude() * RAD_TO_DEG;    
-       if (a < 0.0) {
-               a = -a;
-       }
-       d = (double) ( (int) a);
-       return( (a - d) * 60.0);
+    double  a, d;
+    
+    a = current_aircraft.fdm_state->get_Longitude() * RAD_TO_DEG;      
+    if (a < 0.0) {
+       a = -a;
+    }
+    d = (double) ( (int) a);
+    return( (a - d) * 60.0);
 }
 
 double get_throttleval( void )
@@ -139,80 +127,52 @@ double get_rudderval( void )
 
 double get_speed( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_V_equiv_kts() );    // Make an explicit function call.
+    return( current_aircraft.fdm_state->get_V_equiv_kts() );
 }
 
 double get_aoa( void )
 {
-       FGState *f;
-              
-       f = current_aircraft.fdm_state;
-       return( f->get_Alpha() * RAD_TO_DEG );
+    return( current_aircraft.fdm_state->get_Alpha() * RAD_TO_DEG );
 }
 
 double get_roll( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_Phi() );
+    return( current_aircraft.fdm_state->get_Phi() );
 }
 
 double get_pitch( void )
 {
-       FGState *f;
-              
-       f = current_aircraft.fdm_state;
-       return( f->get_Theta() );
+    return( current_aircraft.fdm_state->get_Theta() );
 }
 
 double get_heading( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-       return( f->get_Psi() * RAD_TO_DEG );
+    return( current_aircraft.fdm_state->get_Psi() * RAD_TO_DEG );
 }
 
 double get_altitude( void )
 {
-       FGState *f;
-       // double rough_elev;
-
-       f = current_aircraft.fdm_state;
-       // rough_elev = mesh_altitude(f->get_Longitude() * RAD_TO_ARCSEC,
-       //                                 f->get_Latitude()  * RAD_TO_ARCSEC);
-
-       if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
-           return f->get_Altitude();
-       } else {
-           return f->get_Altitude() * FEET_TO_METER;
-       }
+    if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
+       return current_aircraft.fdm_state->get_Altitude();
+    } else {
+       return current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER;
+    }
 }
 
 double get_agl( void )
 {
-        FGState *f;
-
-        f = current_aircraft.fdm_state;
-
-       if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
-           return f->get_Altitude() - scenery.cur_elev * METER_TO_FEET;
-       } else {
-           return f->get_Altitude() * FEET_TO_METER - scenery.cur_elev;
-       }
+    if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
+       return current_aircraft.fdm_state->get_Altitude()
+           - scenery.cur_elev * METER_TO_FEET;
+    } else {
+       return current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER
+           - scenery.cur_elev;
+    }
 }
 
 double get_sideslip( void )
 {
-        FGState *f;
-        
-        f = current_aircraft.fdm_state;
-        
-        return( f->get_Beta() );
+    return( current_aircraft.fdm_state->get_Beta() );
 }
 
 double get_frame_rate( void )
@@ -237,15 +197,12 @@ double get_vfc_tris_drawn   ( void )
 
 double get_climb_rate( void )
 {
-       FGState *f;
-
-       f = current_aircraft.fdm_state;
-
-       if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
-           return f->get_Climb_Rate() * 60.0;
-       } else {
-           return f->get_Climb_Rate() * FEET_TO_METER * 60.0;
-       }
+    if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
+       return current_aircraft.fdm_state->get_Climb_Rate() * 60.0;
+    } else {
+       return current_aircraft.fdm_state->get_Climb_Rate()
+           * FEET_TO_METER * 60.0;
+    }
 }
 
 
@@ -303,6 +260,9 @@ void fgCockpitUpdate( void ) {
 
 
 // $Log$
+// Revision 1.30  1999/02/05 21:28:57  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.29  1999/01/08 19:27:34  curt
 // Fixed AOA reading on HUD.
 // Continued work on time jitter compensation.
index 0340f921e879fc7102fda90c4f429f973520bb45..2325f1052e749521bb10f5c32c4a01bdfae7ef2f 100644 (file)
 
 
 // reset flight params to a specific position
-void fgExternalInit( FGState &f ) {
+void fgExternalInit( FGInterface &f ) {
 }
 
 
 // update position based on inputs, positions, velocities, etc.
-void fgExternalUpdate( FGState& f, int multiloop ) {
+void fgExternalUpdate( FGInterface& f, int multiloop ) {
 
 }
 
 
 // $Log$
+// Revision 1.5  1999/02/05 21:29:03  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.4  1999/02/01 21:33:32  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 323420ec5a57a68ef1c522037957a56925bf3763..ba7023fdb09e24b4968f9eaec4f149eadff01e53 100644 (file)
@@ -76,13 +76,16 @@ public:
 
 
 // reset flight params to a specific position 
-void fgExternalInit( FGState& f );
+void fgExternalInit( FGInterface& f );
 
 
 #endif // _EXTERNAL_HXX
 
 
 // $Log$
+// Revision 1.6  1999/02/05 21:29:04  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.5  1999/01/19 17:52:12  curt
 // Working on being able to extrapolate a new position and orientation
 // based on a position, orientation, and time offset.
index 4bc0781c6d245c4e18ad90348c3eacb75b45aac1..22f75966ae872c485b22d3c5669657714a35481f 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <Aircraft/aircraft.hxx>
 #include <Controls/controls.hxx>
+#include <Debug/logstream.hxx>
 #include <FDM/flight.hxx>
 #include <FDM/LaRCsim/ls_cockpit.h>
 #include <FDM/LaRCsim/ls_generic.h>
@@ -42,7 +43,7 @@ int fgLaRCsimInit(double dt) {
 
 
 // Run an iteration of the EOM (equations of motion)
-int fgLaRCsimUpdate(FGState& f, int multiloop) {
+int fgLaRCsimUpdate(FGInterface& f, int multiloop) {
     double save_alt = 0.0;
 
     // lets try to avoid really screwing up the LaRCsim model
@@ -62,9 +63,9 @@ int fgLaRCsimUpdate(FGState& f, int multiloop) {
     // Inform LaRCsim of the local terrain altitude
     Runway_altitude =   f.get_Runway_altitude();
 
-    // old -- FGstate_2_LaRCsim() not needed except for Init()
+    // old -- FGInterface_2_LaRCsim() not needed except for Init()
     // translate FG to LaRCsim structure
-    // FGState_2_LaRCsim(f);
+    // FGInterface_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);
@@ -77,7 +78,7 @@ int fgLaRCsimUpdate(FGState& 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_FGState(f);
+    fgLaRCsim_2_FGInterface(f);
 
     // but lets restore our original bogus altitude when we are done
     if ( save_alt < -9000.0 ) {
@@ -88,8 +89,8 @@ int fgLaRCsimUpdate(FGState& f, int multiloop) {
 }
 
 
-// Convert from the FGState struct to the LaRCsim generic_ struct
-int FGState_2_LaRCsim (FGState& f) {
+// Convert from the FGInterface struct to the LaRCsim generic_ struct
+int FGInterface_2_LaRCsim (FGInterface& f) {
 
     Mass =      f.get_Mass();
     I_xx =      f.get_I_xx();
@@ -265,8 +266,8 @@ int FGState_2_LaRCsim (FGState& f) {
 }
 
 
-// Convert from the LaRCsim generic_ struct to the FGState struct
-int fgLaRCsim_2_FGState (FGState& f) {
+// Convert from the LaRCsim generic_ struct to the FGInterface struct
+int fgLaRCsim_2_FGInterface (FGInterface& f) {
 
     // Mass properties and geometry values
     f.set_Inertias( Mass, I_xx, I_yy, I_zz, I_xz );
@@ -324,6 +325,11 @@ int fgLaRCsim_2_FGState (FGState& f) {
     // f.set_Euler_Rates( Phi_dot, Theta_dot, Psi_dot );
     f.set_Geocentric_Rates( Latitude_dot, Longitude_dot, Radius_dot );
 
+    FG_LOG( FG_FLIGHT, FG_DEBUG, "lon = " << Longitude 
+           << " lat_geoc = " << Lat_geocentric << " lat_geod = " << Latitude 
+           << " alt = " << Altitude << " sl_radius = " << Sea_level_radius 
+           << " radius_to_vehicle = " << Radius_to_vehicle );
+           
     // Positions
     f.set_Geocentric_Position( Lat_geocentric, Lon_geocentric, 
                                Radius_to_vehicle );
@@ -389,6 +395,9 @@ int fgLaRCsim_2_FGState (FGState& f) {
 
 
 // $Log$
+// Revision 1.11  1999/02/05 21:28:58  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.10  1999/02/01 21:33:30  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index e4f2c1877bd99d5e02f9acdda4115561ec3afb9f..0231834c0b69c023722428a034e3c40aed79da9c 100644 (file)
 int fgLaRCsimInit(double dt);
 
 // update position based on inputs, positions, velocities, etc.
-int fgLaRCsimUpdate(FGState& f, int multiloop);
+int fgLaRCsimUpdate(FGInterface& f, int multiloop);
 
-// Convert from the FGState struct to the LaRCsim generic_ struct
-int FGState_2_LaRCsim (FGState& f);
+// Convert from the FGInterface struct to the LaRCsim generic_ struct
+int FGInterface_2_LaRCsim (FGInterface& f);
 
-// Convert from the LaRCsim generic_ struct to the FGState struct
-int fgLaRCsim_2_FGState (FGState& f);
+// Convert from the LaRCsim generic_ struct to the FGInterface struct
+int fgLaRCsim_2_FGInterface (FGInterface& f);
 
 
 #endif // _LARCSIM_HXX
 
 
 // $Log$
+// Revision 1.5  1999/02/05 21:28:59  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.4  1998/12/05 15:54:09  curt
 // Renamed class fgFLIGHT to class FGState as per request by JSB.
 //
index 015e2bf8a74fb26ff5e7afca08898fc51f47311c..e44cd5bd812d22e4ca689903ee91e84c7826c283 100644 (file)
@@ -1,7 +1,9 @@
-SUBDIRS        = External LaRCsim Slew
+SUBDIRS        = External JSBsim LaRCsim Slew
 
 noinst_LIBRARIES = libFlight.a
 
-libFlight_a_SOURCES = flight.cxx flight.hxx LaRCsim.cxx LaRCsim.hxx
+libFlight_a_SOURCES = flight.cxx flight.hxx \
+       JSBsim.cxx JSBsim.hxx \
+       LaRCsim.cxx LaRCsim.hxx
 
 INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
index 5216c251b0133b1203c19afba2988ccace022304..75ab5f208fbc0a82af91f873929f98c049fc95e3 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdio.h>
 
 #include "flight.hxx"
+#include "JSBsim.hxx"
 #include "LaRCsim.hxx"
 
 #include <Debug/logstream.hxx>
 // world time, so we introduce cur_fdm_state which is extrapolated by
 // the difference between sim time and real world time
 
-FGState cur_fdm_state;
-FGState base_fdm_state;
+FGInterface cur_fdm_state;
+FGInterface base_fdm_state;
 
 
 // Extrapolate fdm based on time_offset (in usec)
-void FGState::extrapolate( int time_offset ) {
+void FGInterface::extrapolate( int time_offset ) {
     double dt = time_offset / 1000000.0;
     cout << "extrapolating FDM by dt = " << dt << endl;
 
@@ -70,17 +71,19 @@ void FGState::extrapolate( int time_offset ) {
 
 
 // Initialize the flight model parameters
-int fgFDMInit(int model, FGState& f, double dt) {
+int fgFDMInit(int model, FGInterface& f, double dt) {
     double save_alt = 0.0;
 
     FG_LOG( FG_FLIGHT ,FG_INFO, "Initializing flight model" );
 
     base_fdm_state = f;
 
-    if ( model == FGState::FG_SLEW ) {
+    if ( model == FGInterface::FG_SLEW ) {
        // fgSlewInit(dt);
-    } else if ( model == FGState::FG_LARCSIM ) {
-
+    } else if ( model == FGInterface::FG_JSBSIM ) {
+       fgJSBsimInit(dt);
+       fgJSBsim_2_FGInterface(base_fdm_state);
+    } else if ( model == FGInterface::FG_LARCSIM ) {
        // lets try to avoid really screwing up the LaRCsim model
        if ( base_fdm_state.get_Altitude() < -9000.0 ) {
            save_alt = base_fdm_state.get_Altitude();
@@ -88,7 +91,7 @@ int fgFDMInit(int model, FGState& f, double dt) {
        }
 
        // translate FG to LaRCsim structure
-       FGState_2_LaRCsim(base_fdm_state);
+       FGInterface_2_LaRCsim(base_fdm_state);
 
        // initialize LaRCsim
        fgLaRCsimInit(dt);
@@ -97,13 +100,13 @@ int fgFDMInit(int model, FGState& f, double dt) {
                base_fdm_state.get_Latitude() );
 
        // translate LaRCsim back to FG structure
-       fgLaRCsim_2_FGState(base_fdm_state);
+       fgLaRCsim_2_FGInterface(base_fdm_state);
 
        // but lets restore our original bogus altitude when we are done
        if ( save_alt < -9000.0 ) {
            base_fdm_state.set_Altitude( save_alt );
        }
-    } else if ( model == FGState::FG_EXTERNAL ) {
+    } else if ( model == FGInterface::FG_EXTERNAL ) {
        fgExternalInit(base_fdm_state);
     } else {
        FG_LOG( FG_FLIGHT, FG_WARN,
@@ -120,7 +123,7 @@ int fgFDMInit(int model, FGState& f, double dt) {
 
 
 // Run multiloop iterations of the flight model
-int fgFDMUpdate(int model, FGState& f, int multiloop, int time_offset) {
+int fgFDMUpdate(int model, FGInterface& f, int multiloop, int time_offset) {
     double time_step, start_elev, end_elev;
 
     // printf("Altitude = %.2f\n", FG_Altitude * 0.3048);
@@ -131,14 +134,17 @@ int fgFDMUpdate(int model, FGState& f, int multiloop, int time_offset) {
     time_step = (1.0 / DEFAULT_MODEL_HZ) * multiloop;
     start_elev = base_fdm_state.get_Altitude();
 
-    if ( model == FGState::FG_SLEW ) {
+    if ( model == FGInterface::FG_SLEW ) {
        // fgSlewUpdate(f, multiloop);
-    } else if ( model == FGState::FG_LARCSIM ) {
+    } else if ( model == FGInterface::FG_JSBSIM ) {
+       fgJSBsimUpdate(base_fdm_state, multiloop);
+       f = base_fdm_state;
+    } else if ( model == FGInterface::FG_LARCSIM ) {
        fgLaRCsimUpdate(base_fdm_state, multiloop);
        // extrapolate position based on actual time
        // f = extrapolate_fdm( base_fdm_state, time_offset );
        f = base_fdm_state;
-    } else if ( model == FGState::FG_EXTERNAL ) {
+    } else if ( model == FGInterface::FG_EXTERNAL ) {
        // fgExternalUpdate(f, multiloop);
        FGTimeStamp current;
        current.stamp();
@@ -175,7 +181,7 @@ void fgFDMForceAltitude(int model, double alt_meters) {
                                           METER_TO_FEET) );
 
     // additional work needed for some flight models
-    if ( model == FGState::FG_LARCSIM ) {
+    if ( model == FGInterface::FG_LARCSIM ) {
        ls_ForceAltitude( base_fdm_state.get_Altitude() );
     }
 }
@@ -189,6 +195,9 @@ void fgFDMSetGroundElevation(int model, double ground_meters) {
 
 
 // $Log$
+// Revision 1.15  1999/02/05 21:29:01  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.14  1999/02/01 21:33:31  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 4948bda9fce90342712434e84c70ef89e965629c..9edf224e3ec211e6627583b58c3c01eb7375bd55 100644 (file)
 
 /* Required get_()
 
-   `FGState::get_Longitude ()'
-   `FGState::get_Latitude ()'
-   `FGState::get_Altitude ()'
-   `FGState::get_Phi ()'
-   `FGState::get_Theta ()'
-   `FGState::get_Psi ()'
-   `FGState::get_V_equiv_kts ()'
-
-   `FGState::get_Mass ()'
-   `FGState::get_I_xx ()'
-   `FGState::get_I_yy ()'
-   `FGState::get_I_zz ()'
-   `FGState::get_I_xz ()'
+   `FGInterface::get_Longitude ()'
+   `FGInterface::get_Latitude ()'
+   `FGInterface::get_Altitude ()'
+   `FGInterface::get_Phi ()'
+   `FGInterface::get_Theta ()'
+   `FGInterface::get_Psi ()'
+   `FGInterface::get_V_equiv_kts ()'
+
+   `FGInterface::get_Mass ()'
+   `FGInterface::get_I_xx ()'
+   `FGInterface::get_I_yy ()'
+   `FGInterface::get_I_zz ()'
+   `FGInterface::get_I_xz ()'
    
-   `FGState::get_V_north ()'
-   `FGState::get_V_east ()'
-   `FGState::get_V_down ()'
+   `FGInterface::get_V_north ()'
+   `FGInterface::get_V_east ()'
+   `FGInterface::get_V_down ()'
 
-   `FGState::get_P_Body ()'
-   `FGState::get_Q_Body ()'
-   `FGState::get_R_Body ()'
+   `FGInterface::get_P_Body ()'
+   `FGInterface::get_Q_Body ()'
+   `FGInterface::get_R_Body ()'
 
-   `FGState::get_Gamma_vert_rad ()'
-   `FGState::get_Climb_Rate ()'
-   `FGState::get_Alpha ()'
-   `FGState::get_Beta ()'
+   `FGInterface::get_Gamma_vert_rad ()'
+   `FGInterface::get_Climb_Rate ()'
+   `FGInterface::get_Alpha ()'
+   `FGInterface::get_Beta ()'
 
-   `FGState::get_Runway_altitude ()'
+   `FGInterface::get_Runway_altitude ()'
 
-   `FGState::get_Lon_geocentric ()'
-   `FGState::get_Lat_geocentric ()'
-   `FGState::get_Sea_level_radius ()'
-   `FGState::get_Earth_position_angle ()'
+   `FGInterface::get_Lon_geocentric ()'
+   `FGInterface::get_Lat_geocentric ()'
+   `FGInterface::get_Sea_level_radius ()'
+   `FGInterface::get_Earth_position_angle ()'
 
-   `FGState::get_Latitude_dot()'
-   `FGState::get_Longitude_dot()'
-   `FGState::get_Radius_dot()'
+   `FGInterface::get_Latitude_dot()'
+   `FGInterface::get_Longitude_dot()'
+   `FGInterface::get_Radius_dot()'
 
-   `FGState::get_Dx_cg ()'
-   `FGState::get_Dy_cg ()'
-   `FGState::get_Dz_cg ()'
+   `FGInterface::get_Dx_cg ()'
+   `FGInterface::get_Dy_cg ()'
+   `FGInterface::get_Dz_cg ()'
 
-   `FGState::get_T_local_to_body_11 ()' ... `FGState::get_T_local_to_body_33 ()'
+   `FGInterface::get_T_local_to_body_11 ()' ... `FGInterface::get_T_local_to_body_33 ()'
 
-   `FGState::get_Radius_to_vehicle ()'
+   `FGInterface::get_Radius_to_vehicle ()'
 
  */
 
@@ -93,7 +93,7 @@ typedef double FG_VECTOR_3[3];
 
 
 // This is based heavily on LaRCsim/ls_generic.h
-class FGState {
+class FGInterface {
 
 public:
 
@@ -102,18 +102,23 @@ public:
        // Slew (in MS terminology)
        FG_SLEW = 0,
        
-       // The only "real" model that is currently implemented
+       // The NASA LaRCsim (Navion) flight model
        FG_LARCSIM = 1,
 
-       FG_ACM = 2,
-       FG_SUPER_SONIC = 3,
-       FG_HELICOPTER = 4,
-       FG_AUTOGYRO = 5,
-       FG_BALLOON = 6,
-       FG_PARACHUTE = 7,
+       // Jon S. Berndt's new FDM written from the ground up in C++
+       FG_JSBSIM = 2,
+
+       // The following aren't implemented but are here to spark
+       // thoughts and discussions, and maybe even action.
+       FG_ACM = 3,
+       FG_SUPER_SONIC = 4,
+       FG_HELICOPTER = 5,
+       FG_AUTOGYRO = 6,
+       FG_BALLOON = 7,
+       FG_PARACHUTE = 8,
 
        // Driven externally via a serial port, net, file, etc.
-       FG_EXTERNAL = 8
+       FG_EXTERNAL = 9
     };
 
 /*================== Mass properties and geometry values ==================*/
@@ -792,16 +797,16 @@ public:
 };
 
 
-extern FGState cur_fdm_state;
+extern FGInterface cur_fdm_state;
 
 
 // General interface to the flight model routines
 
 // Initialize the flight model parameters
-int fgFDMInit(int model, FGState& f, double dt);
+int fgFDMInit(int model, FGInterface& f, double dt);
 
 // Run multiloop iterations of the flight model
-int fgFDMUpdate(int model, FGState& f, int multiloop, int jitter);
+int fgFDMUpdate(int model, FGInterface& f, int multiloop, int jitter);
 
 // Set the altitude (force)
 void fgFDMForceAltitude(int model, double alt_meters);
@@ -814,6 +819,9 @@ void fgFDMSetGroundElevation(int model, double alt_meters);
 
 
 // $Log$
+// Revision 1.13  1999/02/05 21:29:02  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.12  1999/01/20 13:42:23  curt
 // Tweaked FDM interface.
 // Testing check sum support for NMEA serial output.
index e287f168c31cbcfc45f91dad258b5f2294142547..f50dcef51f2e4360d56b6c33ed3efe7559e87449 100644 (file)
@@ -69,7 +69,7 @@ static void local_update_sky_and_lighting_params( void ) {
 
 // Handle keyboard events
 void GLUTkey(unsigned char k, int x, int y) {
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
     FGView *v;
     FGWeather *w;
@@ -386,6 +386,9 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 // $Log$
+// Revision 1.39  1999/02/05 21:29:07  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.38  1998/12/11 20:26:25  curt
 // Fixed view frustum culling accuracy bug so we can look out the sides and
 // back without tri-stripes dropping out.
index 187ad17c76279ecf6259bdb854d2490c2697f06c..d8d24ac9b2c3036b40798832f3595c4d310aa8da 100644 (file)
@@ -371,7 +371,7 @@ static void fgRenderFrame( void ) {
 
 // Update internal time dependent calculations (i.e. flight model)
 void fgUpdateTimeDepCalcs(int multi_loop, int remainder) {
-    FGState *f = current_aircraft.fdm_state;
+    FGInterface *f = current_aircraft.fdm_state;
     fgLIGHT *l = &cur_light_params;
     fgTIME *t = &cur_time_params;
     FGView *v = &current_view;
@@ -451,7 +451,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 ) {
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
     static long remainder = 0;
     long elapsed, multi_loop;
@@ -927,7 +927,7 @@ int fgGlutInitEvents( void ) {
 
 // Main ...
 int main( int argc, char **argv ) {
-    FGState *f;
+    FGInterface *f;
 
     f = current_aircraft.fdm_state;
 
@@ -1007,6 +1007,9 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.85  1999/02/05 21:29:08  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.84  1999/02/02 20:13:34  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index 399eee95742e23dc5bf7dd1e8fa36f88cbed91b8..fdf2aa9e797e8af3e98dcf6cdbf3ac2d1a83ca58 100644 (file)
@@ -52,6 +52,7 @@ fgfs_LDADD = \
        $(top_builddir)/Simulator/Controls/libControls.a \
        $(top_builddir)/Simulator/FDM/libFlight.a \
        $(top_builddir)/Simulator/FDM/External/libExternal.a \
+       $(top_builddir)/Simulator/FDM/JSBsim/libJSBsim.a \
        $(top_builddir)/Simulator/FDM/LaRCsim/libLaRCsim.a \
        $(top_builddir)/Simulator/FDM/Slew/libSlew.a \
        $(top_builddir)/Simulator/GUI/libGUI.a \
index 0f4247635ed5234c912a049695c19baa3e803f43..012db04f7e5b7cae7e928685618bf45e6121e380 100644 (file)
@@ -74,7 +74,7 @@ extern const char *default_root;
 // Set initial position and orientation
 int fgInitPosition( void ) {
     string id;
-    FGState *f;
+    FGInterface *f;
 
     f = current_aircraft.fdm_state;
 
@@ -154,7 +154,7 @@ int fgInitGeneral( void ) {
 // Returns non-zero if a problem encountered.
 int fgInitSubsystems( void )
 {
-    FGState *f; // assigned later
+    FGInterface *f; // assigned later
     fgLIGHT *l = &cur_light_params;
     fgTIME *t = &cur_time_params;
     FGView *v = &current_view;
@@ -392,6 +392,9 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// Revision 1.66  1999/02/05 21:29:10  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.65  1999/02/02 20:13:36  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index 13738d4136d07c915cb9710c20e76ee501f1886c..86f1586e8ed89f73222bd1ee8bf8c81a824420b3 100644 (file)
@@ -232,7 +232,7 @@ static void send_nmea_out( fgIOCHANNEL *p ) {
     char dir;
     int deg;
     double min;
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
 
     // run once every two seconds
@@ -331,7 +331,7 @@ static void send_garmin_out( fgIOCHANNEL *p ) {
     char dir;
     int deg;
     double min;
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
 
     // run once per second
@@ -468,6 +468,9 @@ void fgSerialProcess() {
 
 
 // $Log$
+// Revision 1.11  1999/02/05 21:29:11  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.10  1999/01/21 00:55:01  curt
 // Fixed some problems with timing of output strings.
 // Added checksum support for nmea and garmin output.
index d889c7bbf92b894ad92a987839a46da90b1d48c7..e63c13a958874dd312d2834fc9597f5f7677241c 100644 (file)
@@ -128,7 +128,7 @@ fgOPTIONS::fgOPTIONS() :
     sound(1),
 
     // Flight Model options
-    flight_model(FGState::FG_LARCSIM),
+    flight_model(FGInterface::FG_LARCSIM),
 
     // Rendering options
     fog(FG_FOG_NICEST),  // nicest
@@ -303,19 +303,21 @@ fgOPTIONS::parse_tile_radius( const string& arg ) {
 }
 
 
-// Parse --flightmode=abcdefg type option 
+// Parse --fdm=abcdefg type option 
 int
-fgOPTIONS::parse_flight_model( const string& fm ) {
-    // printf("flight model = %s\n", fm);
+fgOPTIONS::parse_fdm( const string& fm ) {
+    // printf("fdm = %s\n", fm);
 
     if ( fm == "slew" ) {
-       return FGState::FG_SLEW;
+       return FGInterface::FG_SLEW;
+    } else if ( fm == "jsb" ) {
+       return FGInterface::FG_JSBSIM;
     } else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
-       return FGState::FG_LARCSIM;
+       return FGInterface::FG_LARCSIM;
     } else if ( fm == "external" ) {
-       return FGState::FG_EXTERNAL;
+       return FGInterface::FG_EXTERNAL;
     } else {
-       FG_LOG( FG_GENERAL, FG_ALERT, "Unknown flight model = " << fm );
+       FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
        exit(-1);
     }
 
@@ -426,8 +428,8 @@ int fgOPTIONS::parse_option( const string& arg ) {
        pitch = atof( arg.substr(8) );
     } else if ( arg.find( "--fg-root=" ) != string::npos ) {
        fg_root = arg.substr( 10 );
-    } else if ( arg.find( "--flight-model=" ) != string::npos ) {
-       flight_model = parse_flight_model( arg.substr(15) );
+    } else if ( arg.find( "--fdm=" ) != string::npos ) {
+       flight_model = parse_fdm( arg.substr(6) );
     } else if ( arg == "--fog-disable" ) {
        fog = FG_FOG_DISABLED;  
     } else if ( arg == "--fog-fastest" ) {
@@ -575,7 +577,7 @@ void fgOPTIONS::usage ( void ) {
     printf("\n");
  
     printf("Flight Model:\n");
-    printf("\t--flight-mode=abcd:  one of slew, larcsim, or external\n");
+    printf("\t--fdm=abcd:  one of slew, jsb, larcsim, or external\n");
     printf("\n");
 
     printf("Initial Position and Orientation:\n");
@@ -629,6 +631,9 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.39  1999/02/05 21:29:12  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.38  1999/02/01 21:33:35  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 67ba5e2d5e95f97e38626c27076a88df1831d357..3c6a3849d4dff8527f93261df92428c7b8beada9 100644 (file)
@@ -232,7 +232,7 @@ private:
     double parse_degree( const string& degree_str );
     int parse_time_offset( const string& time_str );
     int parse_tile_radius( const string& arg );
-    int parse_flight_model( const string& fm );
+    int parse_fdm( const string& fm );
     double parse_fov( const string& arg );
     bool parse_serial( const string& serial_str );
 };
@@ -245,6 +245,9 @@ extern fgOPTIONS current_options;
 
 
 // $Log$
+// Revision 1.27  1999/02/05 21:29:13  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.26  1999/02/02 20:13:37  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index 651312b9c6bedd03eccd691c1e93fc9da8ef418b..8bad74132b0a511844b759d66039909a930ad417 100644 (file)
@@ -52,7 +52,7 @@ static int panel_hist = 0;
 // and external modes wouldn't need to recreate the LaRCsim matrices
 // themselves.
 
-static const bool use_larcsim_local_to_body = true;
+static const bool use_larcsim_local_to_body = false;
 
 
 // This is a record containing current view parameters
@@ -198,7 +198,7 @@ void FGView::LookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 
 // Update the view volume, position, and orientation
 void FGView::UpdateViewParams( void ) {
-    FGState *f = current_aircraft.fdm_state;
+    FGInterface *f = current_aircraft.fdm_state;
 
     UpdateViewMath(f);
     UpdateWorldToEye(f);
@@ -262,7 +262,7 @@ void FGView::UpdateViewParams( void ) {
 
 
 // Update the view parameters
-void FGView::UpdateViewMath( FGState *f ) {
+void FGView::UpdateViewMath( FGInterface *f ) {
     Point3D p;
     MAT3vec vec, forward, v0, minus_z;
     MAT3mat R, TMP, UP, LOCAL, VIEW;
@@ -296,15 +296,13 @@ void FGView::UpdateViewMath( FGState *f ) {
        p.setz( p.radius() + scenery.cur_elev + 0.5 * METER_TO_FEET );
     }
 
+
     abs_view_pos = fgPolarToCart3d(p);
     view_pos = abs_view_pos - scenery.center;
 
-    FG_LOG( FG_VIEW, FG_DEBUG, "Absolute view pos = "
-           << abs_view_pos.x() << ", " 
-           << abs_view_pos.y() << ", " 
-           << abs_view_pos.z() );
-    FG_LOG( FG_VIEW, FG_DEBUG, "Relative view pos = "
-           << view_pos.x() << ", " << view_pos.y() << ", " << view_pos.z() );
+    FG_LOG( FG_VIEW, FG_DEBUG, "Polar view pos = " << p );
+    FG_LOG( FG_VIEW, FG_DEBUG, "Absolute view pos = " << abs_view_pos );
+    FG_LOG( FG_VIEW, FG_DEBUG, "Relative view pos = " << view_pos );
 
     // Derive the LOCAL aircraft rotation matrix (roll, pitch, yaw)
     // from FG_T_local_to_body[3][3]
@@ -435,7 +433,7 @@ void FGView::UpdateViewMath( FGState *f ) {
 
 // Update the "World to Eye" transformation matrix
 // This is most useful for view frustum culling
-void FGView::UpdateWorldToEye( FGState *f ) {
+void FGView::UpdateWorldToEye( FGInterface *f ) {
     MAT3mat R_Phi, R_Theta, R_Psi, R_Lat, R_Lon, T_view;
     MAT3mat TMP;
     MAT3hvec vec;
@@ -603,6 +601,9 @@ FGView::~FGView( void ) {
 
 
 // $Log$
+// Revision 1.33  1999/02/05 21:29:14  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.32  1999/01/07 20:25:12  curt
 // Updated struct fgGENERAL to class FGGeneral.
 //
index 2808f4f9dda4668211a1002d36a033861ccb9046..f3de02a8460a341935988c8e2ec79c960a6492b0 100644 (file)
@@ -172,10 +172,10 @@ public:
     inline void force_update_fov_math() { update_fov = true; }
 
     // Update the view parameters
-    void UpdateViewMath( FGState *f );
+    void UpdateViewMath( FGInterface *f );
 
     // Update the "World to Eye" transformation matrix
-    void UpdateWorldToEye( FGState *f );
+    void UpdateWorldToEye( FGInterface *f );
 
     // Update the field of view coefficients
     void UpdateFOV( const fgOPTIONS& o );
@@ -232,6 +232,9 @@ extern FGView current_view;
 
 
 // $Log$
+// Revision 1.21  1999/02/05 21:29:15  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.20  1999/02/02 20:13:38  curt
 // MSVC++ portability changes by Bernie Bright:
 //
index f956bf1f5f5ee16db5132ac88e334d0778047dba..858966c04fa5d9219457a59b8e5726a9c7613f57 100644 (file)
@@ -333,7 +333,7 @@ fgTileMgrCurElev( 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;
-    FGState *f;
+    FGInterface *f;
     fgBUCKET p1, p2;
     static fgBUCKET p_last = {-1000, 0, 0, 0};
     int tile_diameter;
@@ -651,7 +651,7 @@ update_tile_geometry( fgTILE *t, GLdouble *MODEL_VIEW)
 
 // Render the local tiles
 void fgTileMgrRender( void ) {
-    FGState *f;
+    FGInterface *f;
     fgTILECACHE *c;
     fgTILE *t;
     FGView *v;
@@ -758,6 +758,9 @@ void fgTileMgrRender( void ) {
 
 
 // $Log$
+// Revision 1.53  1999/02/05 21:29:16  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.52  1999/01/27 04:49:48  curt
 // Fixes so that the sim can start out at an airport below sea level.
 //
index 5026f7d60835258ff28cf6a437a1b7e65057deed..2706b990641affd9845d55561742d8243604db24 100644 (file)
@@ -34,7 +34,7 @@
 
 // reset flight params to a specific position
 void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
-    FGState *f;
+    FGInterface *f;
     
     f = current_aircraft.fdm_state;
 
@@ -62,7 +62,7 @@ void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
 
 // update position based on inputs, positions, velocities, etc.
 void fgSlewUpdate( void ) {
-    FGState *f;
+    FGInterface *f;
     FGControls *c;
 
     f = current_aircraft.fdm_state;
@@ -83,6 +83,9 @@ void fgSlewUpdate( void ) {
 
 
 // $Log$
+// Revision 1.6  1999/02/05 21:29:05  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.5  1999/02/01 21:33:33  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 62b19933ff2c6a7c58dd39b2fd1a4d8427caffdc..f7a1c6e40af2f0113bb70de2e6f446eb3ce26c04 100644 (file)
@@ -333,7 +333,7 @@ double sidereal_course(fgTIME *t, double lng) {
 
 
 // Update time variables such as gmt, julian date, and sidereal time
-void fgTimeUpdate(FGState *f, fgTIME *t) {
+void fgTimeUpdate(FGInterface *f, fgTIME *t) {
     double gst_precise, gst_course;
 
     FG_LOG( FG_EVENT, FG_DEBUG, "Updating time" );
@@ -399,6 +399,9 @@ void fgTimeUpdate(FGState *f, fgTIME *t) {
 
 
 // $Log$
+// Revision 1.31  1999/02/05 21:29:18  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.30  1999/02/01 21:33:37  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 04c48470a86f2ccf8b2422fa69905d0b60e52825..a784531fef8e10686b7af292be5f640b31c49443 100644 (file)
@@ -98,13 +98,16 @@ void fgTimeInit(fgTIME *t);
 
 
 // Update the time dependent variables
-void fgTimeUpdate(FGState *f, fgTIME *t);
+void fgTimeUpdate(FGInterface *f, fgTIME *t);
 
 
 #endif // _FG_TIME_HXX
 
 
 // $Log$
+// Revision 1.14  1999/02/05 21:29:19  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.13  1999/02/01 21:33:39  curt
 // Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
 // Jon accepted my offer to do this and thought it was a good idea.
index 940a5960d7cc8b7e9be44af640dd012affe7ab50..c47f652cd4562b6a8f91c86dbb67a37b994ecf65 100644 (file)
@@ -95,7 +95,7 @@ void fgLIGHT::Init( void ) {
 
 // update lighting parameters based on current sun position
 void fgLIGHT::Update( void ) {
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
     // if the 4th field is 0.0, this specifies a direction ...
     GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
@@ -154,7 +154,7 @@ void fgLIGHT::Update( void ) {
 
 // calculate fog color adjusted for sunrise/sunset effects
 void fgLIGHT::UpdateAdjFog( void ) {
-    FGState *f;
+    FGInterface *f;
     double sun_angle_deg, rotation, param1[3], param2[3];
 
     f = current_aircraft.fdm_state;
@@ -220,6 +220,9 @@ fgLIGHT::~fgLIGHT( void ) {
 
 
 // $Log$
+// Revision 1.26  1999/02/05 21:29:20  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.25  1999/01/07 20:25:36  curt
 // Portability changes and updates from Bernie Bright.
 //
index c8b99d4367cb66b2fc7da07f1dc6f7037c61f606..7a1b50c119fb886cc52c90fa7efb5703a3db42a4 100644 (file)
@@ -67,7 +67,7 @@ void FGWeather::Init( ) {
 
 // Update the weather parameters for the current position
 void FGWeather::Update( void ) {
-    FGState *f;
+    FGInterface *f;
 
     f = current_aircraft.fdm_state;
 
@@ -79,6 +79,9 @@ void FGWeather::Update( void ) {
 
 
 // $Log$
+// Revision 1.6  1999/02/05 21:29:21  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
 // Revision 1.5  1998/12/06 13:51:26  curt
 // Turned "struct fgWEATHER" into "class FGWeather".
 //