]> git.mxchange.org Git - flightgear.git/blobdiff - Main/GLUTmain.cxx
Tweaked FDM interface.
[flightgear.git] / Main / GLUTmain.cxx
index f1fba8050f92c08dde5f8b3c7267a8d440e41400..c4558cb259ec4552fd6b77515fce186a58b5f002 100644 (file)
@@ -42,7 +42,9 @@
 #   include <stdlib.h>
 #endif
 
-#include <sys/stat.h> /* for stat() */
+#ifdef HAVE_SYS_STAT_H
+#  include <sys/stat.h> /* for stat() */
+#endif
 
 #ifdef HAVE_UNISTD_H
 #  include <unistd.h>    /* for stat() */
@@ -384,10 +386,10 @@ void fgUpdateTimeDepCalcs(int multi_loop, int remainder) {
        fgAPRun();
 
        // printf("updating flight model x %d\n", multi_loop);
-       fgFlightModelUpdate( current_options.get_flight_model(), 
+       fgFDMUpdate( current_options.get_flight_model(), 
                             cur_fdm_state, multi_loop, remainder );
     } else {
-       fgFlightModelUpdate( current_options.get_flight_model(), 
+       fgFDMUpdate( current_options.get_flight_model(), 
                             cur_fdm_state, 0, remainder );
     }
 
@@ -490,14 +492,15 @@ static void fgMainLoop( void ) {
                   f->get_Altitude() * FEET_TO_METER,
                   scenery.cur_elev + alt_adjust_m - 3.0,
                   scenery.cur_elev + alt_adjust_m );
-           fgFlightModelSetAltitude( current_options.get_flight_model(), 
-                                     scenery.cur_elev + alt_adjust_m );
+           fgFDMForceAltitude( current_options.get_flight_model(), 
+                               scenery.cur_elev + alt_adjust_m );
 
            FG_LOG( FG_ALL, FG_DEBUG, 
                    "<*> resetting altitude to " 
                    << f->get_Altitude() * FEET_TO_METER << " meters" );
        }
-       f->set_Runway_altitude( scenery.cur_elev * METER_TO_FEET );
+       fgFDMSetGroundElevation( current_options.get_flight_model(),
+                                scenery.cur_elev );  // meters
     }
 
     /* printf("Adjustment - ground = %.2f  runway = %.2f  alt = %.2f\n",
@@ -1000,6 +1003,13 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.82  1999/01/20 13:42:24  curt
+// Tweaked FDM interface.
+// Testing check sum support for NMEA serial output.
+//
+// Revision 1.81  1999/01/19 20:57:03  curt
+// MacOS portability changes contributed by "Robert Puyol" <puyol@abvent.fr>
+//
 // Revision 1.80  1999/01/09 13:37:40  curt
 // Convert fgTIMESTAMP to FGTimeStamp which holds usec instead of ms.
 //