From 9ff72179616a295807d5f6fb72f17f4aaf0d0002 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 26 Jun 2001 22:16:02 +0000 Subject: [PATCH] Fix a JSBSim airport elevation bug. --- src/FDM/flight.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index 06eb44db1..57975b1d2 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -458,6 +458,8 @@ void FGInterface::extrapolate( int time_offset ) { // Set the altitude (force) void fgFDMForceAltitude(const string &model, double alt_meters) { + SG_LOG(SG_FLIGHT,SG_INFO, "fgFDMForceAltitude: " << alt_meters ); + double sea_level_radius_meters; double lat_geoc; @@ -468,7 +470,10 @@ void fgFDMForceAltitude(const string &model, double alt_meters) { base_fdm_state.set_Altitude( alt_meters * SG_METER_TO_FEET ); base_fdm_state.set_Sea_level_radius( sea_level_radius_meters * SG_METER_TO_FEET ); - + + cur_fdm_state->set_Altitude( alt_meters * SG_METER_TO_FEET ); + cur_fdm_state->set_Sea_level_radius( sea_level_radius_meters * + SG_METER_TO_FEET ); // additional work needed for some flight models if ( model == "larcsim" ) {