|
|
|
@ -48,13 +48,11 @@ namespace land_detector
@@ -48,13 +48,11 @@ namespace land_detector
|
|
|
|
|
|
|
|
|
|
VtolLandDetector::VtolLandDetector() |
|
|
|
|
{ |
|
|
|
|
_paramHandle.maxAirSpeed = param_find("LNDFW_AIRSPD_MAX"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void VtolLandDetector::_update_topics() |
|
|
|
|
{ |
|
|
|
|
MulticopterLandDetector::_update_topics(); |
|
|
|
|
|
|
|
|
|
_airspeed_sub.update(&_airspeed); |
|
|
|
|
_vehicle_status_sub.update(&_vehicle_status); |
|
|
|
|
} |
|
|
|
@ -92,7 +90,7 @@ bool VtolLandDetector::_get_landed_state()
@@ -92,7 +90,7 @@ bool VtolLandDetector::_get_landed_state()
|
|
|
|
|
|
|
|
|
|
// only consider airspeed if we have been in air before to avoid false
|
|
|
|
|
// detections in the case of wind on the ground
|
|
|
|
|
if (_was_in_air && (_airspeed_filtered > _params.maxAirSpeed)) { |
|
|
|
|
if (_was_in_air && (_airspeed_filtered > _param_lndfw_airspd_max.get())) { |
|
|
|
|
landed = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -101,11 +99,4 @@ bool VtolLandDetector::_get_landed_state()
@@ -101,11 +99,4 @@ bool VtolLandDetector::_get_landed_state()
|
|
|
|
|
return landed; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void VtolLandDetector::_update_params() |
|
|
|
|
{ |
|
|
|
|
MulticopterLandDetector::_update_params(); |
|
|
|
|
|
|
|
|
|
param_get(_paramHandle.maxAirSpeed, &_params.maxAirSpeed); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // namespace land_detector
|
|
|
|
|