BasicAirData / GPSLogger

A GPS logger for Android mobile devices
http://www.basicairdata.eu/projects/android/android-gps-logger/
GNU General Public License v3.0
392 stars 121 forks source link

Adding an annotation while recording also adds a trackpoint #213

Closed icrf2000 closed 8 months ago

icrf2000 commented 9 months ago

When setting an annotation, a WPT is created, but no TRKPT. This is probably on purpose and there can be good arguments for it. But occasionally, when inspecting the recorded track, it can look a bit strange when there is a position you obviously visited, but no visible route how you went there. There could be a configuration setting, maybe in the "TRACKING" section, à la "Create trackpoint for annotation".

image

GrazianoCapelli commented 9 months ago

Thanks for pointing out this issue, in effect it could be a bit strange to see. It happens when the app doesn't record all the trackpoints into the database because of active filters.

The app currently works this way mainly for 2 reasons: 1) You can add annotations during the recording, but also when the tack is in pause. You can also create a track containing only annotations and no trackpoints. 2) When you click the Annotation button GPS Logger picks the next FIX and saves it in memory, then shows the Annotation dialog. If the user clicks the Add button of the dialog (after adding a description) the app writes the point into the database, else it discards it. During this time the user can move and record other trackpoints, and the trackpoint that we would add could be stored into the track in incorrect order.

A possible solution is, only when the user is recording trackpoints, to write into the database the trackpoint corresponding to the annotation as soon as the annotation button is clicked. If the user chooses to discard the annotation, the trackpoint could be left into the database without any problem. I think that it has no adverse effects to have one additional trackpoint in a track.

We prefer to avoid to add a dedicated setting for it, to keep the app simple and straightforward.

icrf2000 commented 9 months ago

If it is possible to detect whether the user is recording TRKPTs, then I agree, then this would be the optimum solution. Better than an additional preference setting.

icrf2000 commented 8 months ago

great, thank you for implementing this change! As far as I can see it is not yet in the release? As soon as I have my prod laptop back from repair, I will compile it and test.

GrazianoCapelli commented 8 months ago

At this time we are testing all the changes we made and, in the meantime, we are checking and updating the updated translations. We have in plan to release the v3.2.2 (that implements also this change) soon.

In case you have the time and the opportunity to build and test it, of course we would be glad to receive your feedback.