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

Fixed wing flight detection fix #10621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

breadoven
Copy link
Collaborator

Closes #10595 by adding an altitude change check for fixed wing flight detection. Flight is only detected if the altitude changes by 5m in addition to the other existing checks. The 5m is relative to a reference takeoff altitude that is constantly updated whilst disarmed only being fixed on arming as the reference takeoff altitude to be used during flight.

The takeoff reference altitude mentioned above is also used to fix a general issue related to the use of inav_reset_altitude set to FIRST_ARM (default). If you change takeoff elevation after first arming/disarming the reference altitudes for launch mode max altitude, RTH altitudes and other altitude related settings potentially end up using the wrong reference takeoff altitude. This PR fixes the Launch mode issue which can cause the plane to disarm by landing shortly after arming for a new flight if the takeoff altitude exceeds the launch finish altitude or alternatively it might cause the launch to end too early. The best solution if you fly from varying takeoff altitudes is to set inav_reset_altitude to EACH_ARM so the change for Launch mode is really just fool proofing.

Other related issues such as RTH altitudes are beyond the scope of this changes for now,

HITL testing shows this change to work as expected.

@b14ckyy b14ckyy requested a review from mmosca January 19, 2025 15:26
@b14ckyy b14ckyy added this to the 8.1 milestone Jan 19, 2025
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.

Inav can "disarm because of landing" even if the aircraft has not taken off. (Inav 8.0.0 RC4)
2 participants