Add smoothing to glide related OSD elements#11520
Draft
y-decimal wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
Draft
Add smoothing to glide related OSD elements#11520y-decimal wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
y-decimal wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
Conversation
fix: update glide time calculations to use averaged velocities Co-authored-by: Copilot <copilot@github.com>
y-decimal
commented
Apr 27, 2026
Author
There was a problem hiding this comment.
Note: I did not test this yet, I would appreciate if someone with access to an SITL setup could help me with that, as most of my wings are currently out of comission and the weather is forecast to be very windy.
I also just realized I have no idea how frequently the update function will be called, so I might be smoothing out way too small of a time frame at the moment. Gonna have to take a look at that
…stead of rolling average, in order to have time constant and sample rate independent filtering behaviour Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds filtered variables for vertical velocity and ground speed, specifically for use in the 3 glide related OSD elements, Glide Slope, Glide Distance and Glide Time.
Previously, these used instantaneous measurements at the moment of osd update, which caused these values to jump all over the place from small momentary influences like turbulence or air gusts, as well as sensor noise. When glide distance aggressively jumps between 500m and 12km from one moment to the next, it becomes quite unusable.
With this smoothing, the goal is to smooth out the noisy data to stabilized the calculated glide data and make it more useful.