]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mk_viii.hxx
GPWS: avoid "altitude_callout_voice != NULL" assertion
[flightgear.git] / src / Instrumentation / mk_viii.hxx
index 7d33b1ca8358c43f31f973a792d289759c13223b..e37fc972be2bfa2fa9bfe9ae2b862b9609bed99c 100755 (executable)
@@ -1,4 +1,4 @@
-// mk_viii.cxx -- Honeywell MK VIII EGPWS emulation
+// mk_viii.hxx -- Honeywell MK VIII EGPWS emulation
 //
 // Written by Jean-Yves Lefort, started September 2005.
 //
@@ -200,6 +200,9 @@ class MK_VIII : public SGSubsystem
       SGPropertyNode_ptr altimeter_serviceable;
       SGPropertyNode_ptr altitude;
       SGPropertyNode_ptr altitude_agl;
+      SGPropertyNode_ptr altitude_gear_agl;
+      SGPropertyNode_ptr altitude_radar_agl;
+      SGPropertyNode_ptr orientation_roll;
       SGPropertyNode_ptr asi_serviceable;
       SGPropertyNode_ptr asi_speed;
       SGPropertyNode_ptr autopilot_heading_lock;
@@ -479,6 +482,8 @@ public:
       bool                     alternate_steep_approach;
       bool                     use_internal_gps;
       bool                     localizer_enabled;
+      int                      altitude_source;
+      bool                     use_attitude_indicator;
     } conf;
 
     struct _s_input_feeders
@@ -605,6 +610,7 @@ public:
     void update_egpws_alert_discrete_2 ();
     void update_egpwc_alert_discrete_3 ();
     void update_outputs ();
+    void reposition ();
 
     void update_lamps ();
     void set_lamp (Lamp lamp);
@@ -631,10 +637,11 @@ public:
       typedef deque< Sample<double> > samples_type;
       samples_type             samples;
       double                   value;
+      double                   last_update;
 
     public:
       inline TerrainClearanceFilter ()
-       : value(0) {}
+       : value(0.0), last_update(-1.0) {}
 
       double update (double agl);
       void reset ();
@@ -1358,7 +1365,7 @@ private:
     } conf;
 
     inline Mode4Handler (MK_VIII *device)
-      : mk(device) {}
+      : mk(device),ab_bias(0.0),ab_expanded_bias(0.0),c_bias(0.0) {}
 
     double get_upper_agl (const EnvelopesConfiguration *c);
     void update ();
@@ -1402,7 +1409,7 @@ private:
 
   public:
     inline Mode5Handler (MK_VIII *device)
-      : mk(device) {}
+      : mk(device), soft_bias(0.0) {}
 
     void update ();
   };