AP_NavEKF2: Fix bug preventing pre-takeoff reference measurements
This commit is contained in:
parent
71c399674a
commit
4e928bf294
@ -351,7 +351,7 @@ void NavEKF2_core::detectFlight()
|
||||
prevInFlight = inFlight;
|
||||
|
||||
// Store vehicle height and range prior to takeoff for use in post takeoff checks
|
||||
if (!onGround && !prevOnGround) {
|
||||
if (onGround && prevOnGround) {
|
||||
// store vertical position at start of flight to use as a reference for ground relative checks
|
||||
posDownAtTakeoff = stateStruct.position.z;
|
||||
// store the range finder measurement which will be used as a reference to detect when we have taken off
|
||||
|
Loading…
Reference in New Issue
Block a user