Skip to content
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

Afs/landing slope dive #16158

Merged
merged 2 commits into from
Nov 10, 2020
Merged

Conversation

AlexanderAurora
Copy link
Contributor

Please use PX4 Discuss or Slack to align on pull requests if necessary. You can then open draft pull requests to get early feedback.

Describe problem solved by this pull request
Functions in the Landingslope class evaluate heading differences without wrapping pi.

Describe your solution
Add wrap_pi to LandingSlope.cpp functions to protect against returning zero when we don't want to.

Describe possible alternatives
Use get_vector_to_next_waypoint() instead of get_bearing_to_next_waypoint() to get a two 2-d vectors and evaluate the angle between them using the dot product.

Test data / coverage
Tested in simulation using a mission with a south-facing landing and a strong crosswind to move the vehicle off course.

Additional context
Fixes #16132

Copy link
Member

@dagar dagar left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.

@dagar dagar merged commit ea09d9e into PX4:master Nov 10, 2020
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.

FW Position Control Landing Glideslope Facing South Causes Vehicle Crash
2 participants