6 protected const string ALTITUDE_AGL_SIGNAL =
"altitudeAGL";
8 [
Attribute(defvalue:
"3",
desc:
"Minimum altitude AGL\n[m]",
params:
"0 10000 0.1", precision: 1)]
9 protected float m_fAltitudeAGL;
11 protected SignalsManagerComponent m_Signals;
12 protected int m_iAltitudeAGLID = -1;
22 SignalsManagerComponent signals =
data.GetCurrentVehicleSignals();
23 if (!signals || m_Signals != signals)
26 m_iAltitudeAGLID = -1;
30 if (m_iAltitudeAGLID == -1)
31 m_iAltitudeAGLID = signals.AddOrFindSignal(ALTITUDE_AGL_SIGNAL);
34 if (m_iAltitudeAGLID != -1)
35 altitudeAGL = signals.GetSignalValue(m_iAltitudeAGLID);
37 bool result = altitudeAGL >= m_fAltitudeAGL;
38 return GetReturnResult(result);