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

FW Nav Auto Landing fixes #9940

Conversation

breadoven
Copy link
Collaborator

Closes #9916. Also fixes 2 other issues:

  1. Landing detection disarm doesn't trigger during Failsafe RTH - fix resulted in another Auto land State being added NAV_STATE_FW_LANDING_FINISHED.
  2. WP mission Landing not triggered correctly in RTH Landing state for multi missions > 1

WP RTH Landing state code also cleaned up.

Tests OK in HITL.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Apr 13, 2024

Awesome, will test the fixes tomorrow. Thanks a lot.

@breadoven breadoven added this to the 7.1.1 milestone Apr 13, 2024
@Jetrell
Copy link

Jetrell commented Apr 15, 2024

Ran some quick tests this afternoon.. It now appears to shut off the motor and disarm after a mission LAND WP.
Sorry, I ran out of time to test the multi-mission fix.

Has anyone else noticed their planes will sometimes linger at nav_rth_altitude when loitering around the safehome for a wind direction check. Instead of descending to nav_rth_home_altitude ? Or Landing Approach altitude. I happen to have them both at 40meters.
I'm not sure if its related to nav_rth_use_linear_descent being enabled. I can't seem to pin down the reason.

@b14ckyy nav_fw_loiter_radius = 2500 . I only mention it because I've seen it happen rather constantly. While it doesn't occur when there is no landing safehome.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Apr 15, 2024

@Jetrell I had that once when my Loiter radius was accidently set to 50cm instead of 50m. It took sometimes a few minutes until the plane actually considered the loiter to be entered to switch into wind check or start descent. After the loiter radius was not too small anymore I never had a problem again.

I was not able to test yesterday. Started to rain all afternoon.

@breadoven
Copy link
Collaborator Author

breadoven commented Apr 15, 2024

It fails to detect you've arrived at the RTH home point because it simply looks to see if you're within 1.1 * nav_fw_loiter_radius from the home point to trigger arrival. So if nav_fw_loiter_radius has been set much smaller than the plane can actually achieve it never arrives, made worse by the fact the plane starts to go into a loiter quite some distance (around 4 * nav_fw_loiter_radius ) before the home point itself is reached.

I think there's perhaps a better way of doing this which just looks to see if the plane has started to loiter around the home/hold point. This might mean it arrives too early but since this would only affect RTH which ends up in some kind of loiter at the home point regardless it shouldn't make any difference. I'll test and see.

@DzikuVx
Copy link
Member

DzikuVx commented Apr 21, 2024

@breadoven please resolve conflicts. And shall we merge or wait?

@b14ckyy
Copy link
Collaborator

b14ckyy commented Apr 21, 2024

when solved and it fixes the disarm issue, imho its ready to merge. Optimizations and enhancements can be done in the future. The disarm bug is more important to be fixed.

@breadoven
Copy link
Collaborator Author

I tested this in HITL pretty thoroughly and it worked as expected so I don't see why it shouldn't work in real flight just the same given it's just logic changes which HITL should simulate exactly. Should be good to merge on that basis and also the testing by @Jetrell.

@breadoven breadoven merged commit 00fa921 into iNavFlight:release_7.1.1 Apr 22, 2024
14 checks passed
@breadoven breadoven deleted the abo_autolanding_landing_disarm_fix branch May 15, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants