iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.09k stars 1.46k forks source link

Add ability to show 'stats_total_dist' in the OSD #8980

Closed Painless360 closed 11 months ago

Painless360 commented 1 year ago

Current Behaviour

https://github.com/iNavFlight/inav/blob/master/docs/Settings.md shows that this is tracked but I can't find a way to have this shown in the OSD while flying., Just shown in the summary screen after each flight (when configured)

Desired Behaviour

To be able to select and display this as an item on the OSD. Ideally to have the value updated 'LIVE' similar to the ODOMETER in a car or motorcycle too.

Suggested Solution

Add stats_total_dist as an option in the OSD and look at being able to show it incrementing in real time in the OSD.

Who does this impact? Who is this for?

All pilots who fly their model regularly and want to track total flight distance.

Additional context

Jetrell commented 1 year ago

Just to clarify.. I assume you mean Max Distance under the stats ?

Stats

Stats_total_dist. The Traveled Distance odometer can already be displayed on the OSD.

td dis

Sidd-86 commented 1 year ago

Trip distance resets on each flight, while "stats_total_dist" accumulates each trip and is essentially craft milage from all the flights combined, just like ODO meter in a car, and not its trip meter, which can be reset. Total distance data starts recording after "stats" are turned ON, by default its off, and are saved after each disarm. 43ab1297757b4425914ef3f56ee91433

Screenshot_20230415_124451_Samsung Internet

Would be nice to be able to see these informations in one of the OSD layouts; aircraft lifetime total combined distance, combined flight time, energy used etc., which are also recorded/included when "stats" feature is turned ON.

Jetrell commented 1 year ago

Sorry @Painless360 and @Sidd-86 .. I'd forgot all about that feature.. The ironic thing, is that I have it enabled on an F411-wing build.

stats = ON
stats_total_time = 2000
stats_total_dist = 2000
stats_total_energy = 1000

Just shown in the summary screen after each flight (when configured)

I've never seen it display the Total's on the stats screen after disarming. I assume the feature still exists. And hasn't been removed at some point ?

OptimusTi commented 1 year ago

Looks like there's code for this for the stats screen. Looks like ODOMETER only shows if you're using "meters" and have the STATS on: image

Printing stats_total_dist (converted to the proper unit) + getTotalTravelDistance() to the screen could work ??

MrD-RC commented 1 year ago

The total distance on the stats screen shows all units. The switch is to show in the appropriate units selected by the OSD. Will show the odometer distance in kilometres, miles, and nautical miles.

I've made a start on this. Not done any testing yet.

https://github.com/iNavFlight/inav/tree/MrD_Add-odometer-to-OSD https://github.com/iNavFlight/inav-configurator/tree/MrD_Add-odometer-to-OSD

MrD-RC commented 1 year ago

image