1
0
Fork 0

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:
Thorsten Brehm 2010-10-05 22:34:23 +02:00
parent 9be636555c
commit a1137ed940
2 changed files with 10 additions and 1 deletions

View file

@ -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)
{

View file

@ -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 ();