land_detector: Reduce and detection false negatives due to estimator bias

Using the vertical derivative estimate prevents vertical velocity offsets caused by estimation vertical velocity errors preventing the vehicle disarming.
This commit is contained in:
Dennis Mannhart
2017-12-12 12:14:24 +00:00
committed by Lorenz Meier
parent 64a06d8523
commit 26e85736a5
@@ -197,7 +197,7 @@ bool MulticopterLandDetector::_get_ground_contact_state()
// Adjust maxClimbRate if land_speed is lower than 2x maxClimbrate
float maxClimbRate = ((land_speed_threshold * 0.5f) < _params.maxClimbRate) ? (0.5f * land_speed_threshold) :
_params.maxClimbRate;
verticalMovement = fabsf(_vehicleLocalPosition.vz) > maxClimbRate;
verticalMovement = fabsf(_vehicleLocalPosition.z_deriv) > maxClimbRate;
}
// Check if we are moving horizontally.