Skip to content

Add smoothing to glide related OSD elements#11520

Draft
y-decimal wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
y-decimal:osd-glide-calc-fix
Draft

Add smoothing to glide related OSD elements#11520
y-decimal wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
y-decimal:osd-glide-calc-fix

Conversation

@y-decimal
Copy link
Copy Markdown

@y-decimal y-decimal commented Apr 27, 2026

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.

fix: update glide time calculations to use averaged velocities

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Author

@y-decimal y-decimal left a comment

Choose a reason for hiding this comment

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

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

y-decimal and others added 2 commits April 27, 2026 19:15
…stead of rolling average, in order to have time constant and sample rate independent filtering behaviour

Co-authored-by: Copilot <copilot@github.com>
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.

1 participant