]> git.mxchange.org Git - flightgear.git/commitdiff
Compute /position/altitude-agl-ft in MagicCarpet FDM
authorTorsten Dreyer <Torsten@t3r.de>
Tue, 13 Jul 2010 19:11:49 +0000 (21:11 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Tue, 13 Jul 2010 19:11:49 +0000 (21:11 +0200)
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

index 44bffd0ef7e5dd324647fcbfb0c9ae9c32564611..822c1aa89f665a3e24ba41c276a511ae0f7590e8 100644 (file)
@@ -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() );
 }