Another GPWS fix: terrain clearance filter must be reset on reset/reposition.
Queue of recent altitude samples must be cleared on reset/reposition to avoid nuisance alerts...
This commit is contained in:
parent
9be636555c
commit
a1137ed940
2 changed files with 10 additions and 1 deletions
|
@ -362,6 +362,7 @@ MK_VIII::SystemHandler::update ()
|
|||
if (replay_state != last_replay_state)
|
||||
{
|
||||
mk->alert_handler.reposition();
|
||||
mk->io_handler.reposition();
|
||||
|
||||
last_replay_state = replay_state;
|
||||
state = STATE_REPOSITION;
|
||||
|
@ -1065,6 +1066,7 @@ MK_VIII::IOHandler::boot ()
|
|||
mk_doutput(glideslope_cancel) = power_saved.glideslope_cancel;
|
||||
|
||||
altitude_samples.clear();
|
||||
reset_terrain_clearance();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1364,6 +1366,12 @@ MK_VIII::IOHandler::reset_terrain_clearance ()
|
|||
update_terrain_clearance();
|
||||
}
|
||||
|
||||
void
|
||||
MK_VIII::IOHandler::reposition ()
|
||||
{
|
||||
reset_terrain_clearance();
|
||||
}
|
||||
|
||||
void
|
||||
MK_VIII::IOHandler::handle_input_fault (bool test, FaultHandler::Fault fault)
|
||||
{
|
||||
|
|
|
@ -609,6 +609,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);
|
||||
|
@ -639,7 +640,7 @@ public:
|
|||
|
||||
public:
|
||||
inline TerrainClearanceFilter ()
|
||||
: value(0) {}
|
||||
: value(0.0), last_update(-1.0) {}
|
||||
|
||||
double update (double agl);
|
||||
void reset ();
|
||||
|
|
Loading…
Add table
Reference in a new issue