FW land detector increase trigger time and cleanup (#8486)

This commit is contained in:
Daniel Agar
2017-12-21 12:17:32 -05:00
committed by GitHub
parent 7dab5d4380
commit ec57832a8f
6 changed files with 231 additions and 191 deletions
@@ -57,7 +57,9 @@ FixedwingLandDetector::FixedwingLandDetector()
_paramHandle.maxIntVelocity = param_find("LNDFW_VELI_MAX");
// Use Trigger time when transitioning from in-air (false) to landed (true) / ground contact (true).
_landed_hysteresis.set_hysteresis_time_from(false, LAND_DETECTOR_TRIGGER_TIME_US);
_landed_hysteresis.set_hysteresis_time_from(false, LANDED_TRIGGER_TIME_US);
_landed_hysteresis.set_hysteresis_time_from(true, FLYING_TRIGGER_TIME_US);
}
void FixedwingLandDetector::_initialize_topics()
@@ -86,26 +88,8 @@ float FixedwingLandDetector::_get_max_altitude()
{
// TODO
// This means no altitude limit as the limit
// is always current position plus 1000 meters
return roundf(-_local_pos.z + 1000);
}
bool FixedwingLandDetector::_get_freefall_state()
{
// TODO
return false;
}
bool FixedwingLandDetector::_get_ground_contact_state()
{
// TODO
return false;
}
bool FixedwingLandDetector::_get_maybe_landed_state()
{
// TODO
return false;
// is always current position plus 10000 meters
return roundf(-_local_pos.z + 10000);
}
bool FixedwingLandDetector::_get_landed_state()