wellenvogel / avnav

using the raspberry pi as a nav computer
MIT License
85 stars 26 forks source link

'Trip Log' Functionality #361

Open nmeyne opened 1 month ago

nmeyne commented 1 month ago

AvNav does not have a 'trip log' widget / display. There is no persistent record of total distance run over the ground (or through the water). Normally this would be built into a log device with some persistent storage of some kind, but not in a 'headless' GPS that sends NMEA only. Also AvNav currently does not have a data base that survives e.g. restarts of the system.

Distance run could be obtained (approximately) from the length a track by summing up distances between points with some parameter to ignore/suppress position errors .

The persistent storage issue could be overcome by doing the calculation when the track is closed or cleared and then including the distance run in the .gpx filename along with the time closed/cleared. See Issue 359

The filenames in the tracks list would then provide a handy list of distances run for each track.

Does that make sense?

nmeyne commented 1 month ago

Sorry, I have just realised that the Track 'Info' dialog already provides the track length information and more. I guess it still might be helpful to see it in the filename or in an overview on the list of tracks?

wellenvogel commented 1 month ago

Seeing it in the filename could be interesting. But until now the computation is done at the browser side (not on the server). So there is no chance to do this when closing the file (until this would be re-implemented on the server side - for linux and for android). Showing it in the overview could be a problem as tracks could contain many points - and computing the distance on the fly for a lot of tracks could slow down things a lot.

nmeyne commented 1 month ago

Thanks, yes I guess the computation would need to be moved server-side. At least it would run infrequently there, on file close. Doing it client side on the fly for many large tracks indeed sounds very slow. I guess this is a bigger job than expected!

In the meantime, a new ability to clear and close the tracks plus the existing client side display of track info for a single track gives all the information needed.