From e0d30cc412a32207578d6d020da363eb6a229f9e Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Tue, 13 Jul 2010 21:11:49 +0200 Subject: [PATCH] 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. --- src/FDM/SP/MagicCarpet.cxx | 1 + 1 file changed, 1 insertion(+) 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() ); }