mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
HTE: remove dist_bottom validity check
Without range finder, the validity flag goes to false quite quickly and if can be that a vehicle never starts HTE is the takeoff is too slow. In this specific context of takeoff detection, since the exact value is not important, we can safely ignore the validity flag.
This commit is contained in:
parent
690c1158ad
commit
c253badba4
@ -117,10 +117,13 @@ void MulticopterHoverThrustEstimator::Run()
|
||||
if (_vehicle_local_position_sub.copy(&local_pos)) {
|
||||
// This is only necessary because the landed
|
||||
// flag of the land detector does not guarantee that
|
||||
// the vehicle does not touch the ground anymore
|
||||
// the vehicle does not touch the ground anymore.
|
||||
// There is no check for the dist_bottom validity as
|
||||
// this value is always good enough after takeoff for
|
||||
// this use case.
|
||||
// TODO: improve the landed flag
|
||||
if (local_pos.dist_bottom_valid) {
|
||||
if (!_landed && (local_pos.dist_bottom > 1.f)) {
|
||||
if (!_landed) {
|
||||
if (local_pos.dist_bottom > 1.f) {
|
||||
_in_air = true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user