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 total flight time counting bug #12944

Merged
merged 1 commit into from
Sep 17, 2019
Merged

fixed total flight time counting bug #12944

merged 1 commit into from
Sep 17, 2019

Conversation

mlaiacker
Copy link
Contributor

After landing it can happen that a second take off is detected and then the _takeoff_time is rest, resulting in a wrong total flight time counter after disarming.

When checking for _takeoff_time == 0 the flight time is reliably counted from the first take off until the vehicle is disarmed.
Normally the vehicle will not spend much time armed after landing, if it does the flight time will be off but this is the same as before this fix. Without this additional check the flight time will be counted from the last detected take off until disarming.

This fix was tested in several flight experiments.

After landing it can happen that a second take off is detected and then the _takeoff_time is rest, resulting in a wrong total flight time counter. With this fix the flight time is reliably counted from the first take off until the vehicle is disarmed. Normally the vehicle will not spend much time armed after landing, if it does the flight time will be off but this is the same as before this fix. This fix was tested in several flight experiments.
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Nice find, thanks

@bkueng bkueng merged commit 72e93a9 into PX4:master Sep 17, 2019
@mlaiacker mlaiacker deleted the flight-time-fix branch September 14, 2020 12:38
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.

2 participants