Skip to content

Copter: Set Force Descend to true only when in the last phase of landing #17824

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

Merged
merged 2 commits into from
Jun 23, 2021

Conversation

lthall
Copy link
Contributor

@lthall lthall commented Jun 21, 2021

This PR fixes a problem where the aircraft crashes into the ground it the decent speed is greater than the maximum descent speed the aircraft is capable of. Land currently sets Force_Desend to true at all times. This PR changes this to only be true in the last phase of landing or when land_detect_maybe is true.

Before:
image

After:
image

This problem was discovered when descending with the callisto from 500m at 15m/s. This worked very well until we used land rather than a waypoint in a mission. The aircraft's terminal velocity is ~13m/s and attempting to descend at 15m/s resulted in the aircraft impacting the ground at 4m/s. No damage was done (sand) but this is a problem others may face.

@tridge
Copy link
Contributor

tridge commented Jun 22, 2021

may need the same fix in quadplane

@@ -528,10 +529,11 @@ void Mode::land_run_vertical_control(bool pause_descent)
cmb_rate = MIN(-precland_min_descent_speed, -max_descent_speed+land_slowdown);
}
#endif
force_descend = (MAX(g2.land_alt_low,100) > get_alt_above_ground_cm());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just as a small style thing, I think we should move this above the, "#if PRECISION_LANDING == ENABLED" line.

@lthall lthall force-pushed the 20210621_PR_LandForceDecendFix branch from 8375b10 to c7dabf6 Compare June 22, 2021 05:02
@rmackay9 rmackay9 merged commit ffc64c3 into ArduPilot:master Jun 23, 2021
@rmackay9
Copy link
Contributor

I tested this in SITL and it seemed to be setting the ignore_descent_limits flag at the right time so merged, thanks!

@lthall lthall deleted the 20210621_PR_LandForceDecendFix branch June 23, 2021 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants