From: Torsten Dreyer Date: Tue, 13 Jul 2010 19:11:49 +0000 (+0200) Subject: Compute /position/altitude-agl-ft in MagicCarpet FDM X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e0d30cc412a32207578d6d020da363eb6a229f9e;p=flightgear.git Compute /position/altitude-agl-ft in MagicCarpet FDM Add the same computation of /position/altitude-agl-ft for the magic carpet fdm as it is used in the ufo fdm. This property is used in the environment controller to interpolate between the individual weather-condition layers. --- diff --git a/src/FDM/SP/MagicCarpet.cxx b/src/FDM/SP/MagicCarpet.cxx index 44bffd0ef..822c1aa89 100644 --- a/src/FDM/SP/MagicCarpet.cxx +++ b/src/FDM/SP/MagicCarpet.cxx @@ -115,4 +115,5 @@ void FGMagicCarpet::update( double dt ) { _update_ground_elev_at_pos(); _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET); _set_Altitude( get_Altitude() + climb ); + _set_Altitude_AGL( get_Altitude() - get_Runway_altitude() ); }