]> git.mxchange.org Git - flightgear.git/blobdiff - FDM/flight.hxx
Tweaked FDM interface.
[flightgear.git] / FDM / flight.hxx
index 9cd463723144bc80d1c95be2167757582c66fce8..4948bda9fce90342712434e84c70ef89e965629c 100644 (file)
 #define _FLIGHT_HXX
 
 
+#ifndef __cplusplus                                                          
+# error This library requires C++
+#endif                                   
+
+
 /* Required get_()
 
    `FGState::get_Longitude ()'
@@ -76,8 +81,8 @@
 
  */
 
-#include <Flight/Slew/slew.hxx>
 
+#include <Time/timestamp.hxx>
 
 #ifndef __cplusplus                                                          
 # error This library requires C++
@@ -544,7 +549,7 @@ public:
        geocentric_position_v[2] = radius;
     }
 
-//     inline void set_Geocentric_Position( double lat, double lon, double rad ) {
+    inline void set_Geocentric_Position( double lat, double lon, double rad ) {
        geocentric_position_v[0] = lat;
        geocentric_position_v[1] = lon;
        geocentric_position_v[2] = rad;
@@ -775,6 +780,15 @@ public:
     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; }
+
+    FGTimeStamp valid_stamp;       // time this record is valid
+    FGTimeStamp next_stamp;       // time this record is valid
+    inline FGTimeStamp get_time_stamp() const { return valid_stamp; }
+    inline void stamp_time() { valid_stamp = next_stamp; next_stamp.stamp(); }
+
+    // Extrapolate FDM based on time_offset (in usec)
+    void extrapolate( int time_offset );
+
 };
 
 
@@ -784,19 +798,33 @@ extern FGState cur_fdm_state;
 // General interface to the flight model routines
 
 // Initialize the flight model parameters
-int fgFlightModelInit(int model, FGState& f, double dt);
+int fgFDMInit(int model, FGState& f, double dt);
 
 // Run multiloop iterations of the flight model
-int fgFlightModelUpdate(int model, FGState& f, int multiloop, int jitter);
+int fgFDMUpdate(int model, FGState& f, int multiloop, int jitter);
 
 // Set the altitude (force)
-void fgFlightModelSetAltitude(int model, double alt_meters);
+void fgFDMForceAltitude(int model, double alt_meters);
+
+// Set the local ground elevation
+void fgFDMSetGroundElevation(int model, double alt_meters);
 
 
 #endif // _FLIGHT_HXX
 
 
 // $Log$
+// Revision 1.12  1999/01/20 13:42:23  curt
+// Tweaked FDM interface.
+// Testing check sum support for NMEA serial output.
+//
+// Revision 1.11  1999/01/19 17:52:07  curt
+// Working on being able to extrapolate a new position and orientation
+// based on a position, orientation, and time offset.
+//
+// Revision 1.10  1999/01/09 13:37:33  curt
+// Convert fgTIMESTAMP to FGTimeStamp which holds usec instead of ms.
+//
 // Revision 1.9  1999/01/08 19:27:38  curt
 // Fixed AOA reading on HUD.
 // Continued work on time jitter compensation.