andreynovikov / trekarta

Simple, responsive map for your trek. You decide how to journey today, not the application!
https://trekarta.info
GNU General Public License v3.0
174 stars 25 forks source link

Plotted track may contain gaps or multiple segments #133

Closed stevedee closed 3 years ago

stevedee commented 3 years ago

I have only been using your great application a few days, so this may be a silly question.

Trekarta tracks my walk OK, but the displayed track is not a continuous line. Looking at the exported GPX data I notice that my track may be randomly broken into segments (e.g. by tags: trkseg ... /trkseg).

Is this by design, or do I have a problem?

andreynovikov commented 3 years ago

Usually it means that GPS signal was lost. I had such problem on one of my previous devices (Google Nexus) - GPS was lost each 2-3 minutes for 1-2 seconds. My current device does not have this problem.

stevedee commented 3 years ago

Many thanks for your reply.

billie80 commented 3 years ago

I also recognized this. So track segments are not added deliberately?

Is it possible that it also happens under different conditions? I think it happens every time when the App switches between fore and background as well as when the screen is turned off and on again.

Is it possible that power saving plays a role here. However the track itself is recorded fine in fore and background. So I think it is not only about losing the signal.

This is on Android 10 btw.

stevedee commented 3 years ago

billie80 Check to see if your GPX file includes trkseg ... /trkseg tags where the visual breaks appear. If so, your device is not recording a continuous track.

Although the software could join the last point in a segment to the first point in the next segment (i.e. to make it appear as if it was working continuously) I don't think this would be very helpful to the user, unless you could be sure that only (say) one or two points were missing between 2 associated segments.

billie80 commented 3 years ago

Of course there are track segments! Isn't this what this issue is about? The visual breaks appear due the track segments. This is how it is supposed to be. This all is clear to me. I just want to know under which conditions they are added. Loss of signal can not be the only reason as I wrote above. If I start a recording and watch the progress on the device there wont be segments, also during the time the display is off or when the App is in the background. Every time however when I bring the App to the foreground or activate the display there is a new segment. Maybe the device is responsible for this issue and it reports a new segment in this cases. Hopefully @andreynovikov can give some more insight here. Also I am not familiar with how the position tracking on an Android drive works and what data the App is retreiving. I guess the location provider returns only positions, altitudes, time stamps, etc. The LocationService code indicates this and track segments are defined by the "continous flag" if I am correct (and this information does not seem to be coming from the location provider itself but from the gps status. Maybe the device reports status changes under the mentioned conditions!? Anyway I think it is up to the App to form the gpx xml format (which is only created when exporting as the app internal format is different anyway). So it shouldn't be a big deal to add an option to disable segments. Also other fearures would be possible. For instance add a pause recording button which then only adds a segment between pauses.