]> git.mxchange.org Git - flightgear.git/blobdiff - FDM/flight.cxx
Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
[flightgear.git] / FDM / flight.cxx
index fbe1a048ae494500404c4dc22736ba16b3c66243..5216c251b0133b1203c19afba2988ccace022304 100644 (file)
@@ -28,8 +28,8 @@
 #include "LaRCsim.hxx"
 
 #include <Debug/logstream.hxx>
-#include <Flight/External/external.hxx>
-#include <Flight/LaRCsim/ls_interface.h>
+#include <FDM/External/external.hxx>
+#include <FDM/LaRCsim/ls_interface.h>
 #include <Include/fg_constants.h>
 #include <Math/fg_geodesy.hxx>
 #include <Time/timestamp.hxx>
@@ -70,7 +70,7 @@ void FGState::extrapolate( int time_offset ) {
 
 
 // Initialize the flight model parameters
-int fgFlightModelInit(int model, FGState& f, double dt) {
+int fgFDMInit(int model, FGState& f, double dt) {
     double save_alt = 0.0;
 
     FG_LOG( FG_FLIGHT ,FG_INFO, "Initializing flight model" );
@@ -120,7 +120,7 @@ int fgFlightModelInit(int model, FGState& f, double dt) {
 
 
 // Run multiloop iterations of the flight model
-int fgFlightModelUpdate(int model, FGState& f, int multiloop, int time_offset) {
+int fgFDMUpdate(int model, FGState& f, int multiloop, int time_offset) {
     double time_step, start_elev, end_elev;
 
     // printf("Altitude = %.2f\n", FG_Altitude * 0.3048);
@@ -161,7 +161,7 @@ int fgFlightModelUpdate(int model, FGState& f, int multiloop, int time_offset) {
 
 
 // Set the altitude (force)
-void fgFlightModelSetAltitude(int model, double alt_meters) {
+void fgFDMForceAltitude(int model, double alt_meters) {
     double sea_level_radius_meters;
     double lat_geoc;
 
@@ -181,7 +181,25 @@ void fgFlightModelSetAltitude(int model, double alt_meters) {
 }
 
 
+// Set the local ground elevation
+void fgFDMSetGroundElevation(int model, double ground_meters) {
+    base_fdm_state.set_Runway_altitude( ground_meters * METER_TO_FEET );
+    cur_fdm_state.set_Runway_altitude( ground_meters * METER_TO_FEET );
+}
+
+
 // $Log$
+// 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.
+//
+// Revision 1.13  1999/01/27 04:48:39  curt
+// Set the runway height in cur_fdm_state as well as base_fdm_state.
+//
+// Revision 1.12  1999/01/20 13:42:22  curt
+// Tweaked FDM interface.
+// Testing check sum support for NMEA serial output.
+//
 // Revision 1.11  1999/01/19 17:52:06  curt
 // Working on being able to extrapolate a new position and orientation
 // based on a position, orientation, and time offset.