#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
#include <Autopilot/autopilot.hxx>
+#include <Scenery/scenery.hxx>
#include <Time/fg_time.hxx>
#include <Time/light.hxx>
#include <Cockpit/radiostack.hxx>
}
+
+/**
+ * Return the current altitude in above the terrain.
+ */
+double
+FGBFI::getAGL ()
+{
+ return current_aircraft.fdm_state->get_Altitude()
+ - scenery.cur_elev * METER_TO_FEET;
+}
+
+
/**
* Set the current altitude in feet.
*/
static double getLatitude ();
static double getLongitude ();
static double getAltitude ();
+ static double getAGL ();
static void setLatitude (double latitude);
static void setLongitude (double longitude);