-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FW LandDetector: disregard horizontal velocity if local_position.v_xy_valid is false #24133
base: main
Are you sure you want to change the base?
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 200 byte (0.01 %)]
px4_fmu-v6x [Total VM Diff: 184 byte (0.01 %)]
Updated: 2025-01-07T15:16:07 |
@@ -105,15 +114,28 @@ bool FixedwingLandDetector::_get_landed_state() | |||
const float acc_hor = matrix::Vector2f(_acceleration).norm(); | |||
_xy_accel_filtered = _xy_accel_filtered * 0.8f + acc_hor * 0.18f; | |||
|
|||
// Check for angular velocity (disregard yaw) | |||
const float rot_vel_hor = _angular_velocity.xy().norm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering only rotations around x & y to be consistent with MC landing condition, but can be extended to all three axes if it makes sense in FW context.
@@ -112,4 +112,4 @@ PARAM_DEFINE_FLOAT(LNDFW_TRIG_TIME, 2.f); | |||
* @decimal 1 | |||
* @group Land Detector | |||
*/ | |||
PARAM_DEFINE_FLOAT(LNDFW_ROT_MAX, 0.06f); | |||
PARAM_DEFINE_FLOAT(LNDFW_ROT_MAX, 0.5f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Threshold based on logs of 8 FW flights. Highest value that results in 0 false positives.
If it's too low, could consider increasing default hysteresis time to transition into landed state, because false positives for higher thresholds are mostly non-consecutive - but I don't know if it makes sense to do that.
Solved Problem
Horizontal velocity considered in land detector for fixed wings even when invalid.
Solution
Changelog Entry
For release notes:
Test coverage