recorder icon indicating copy to clipboard operation
recorder copied to clipboard

Display the last point, instead of the last inserted point.

Open nikolak opened this issue 5 years ago • 1 comments

When a device with very bad network loses connection the location messages will get queued, and trying to send those later may result them in arriving out of order.

The messages have a timestamp, but as far as I can tell that timestamp is not being used to show the latest point on the map, if there are 2 of the same position ones.

I'm having a hard time understanding if this is intentional or not, if there are multiple same points, with different timestamps, does the recorder want to show the first or the last one on the map? Is there a way to see both? From what I can tell the recorder wants to show the latest point, but assumes that the latest inserted is actually the latest one - which doesn't have to be the case.

To illustrate what I'm saying here's the exact 2 relevant points from the .rec file, in the order they're in the file. I have removed the coordinates as I do not think they are relevant, the rest is the same:

2019-07-26T19:51:55Z	*                 	{"_type":"location","acc":12,"alt":1493,"batt":55,"conn":"m","lat":-0.123,"lon":1.123,"tid":"JD","tst":1564170715,"vac":24,"vel":0}
2019-07-26T18:08:47Z	*                 	{"_type":"location","acc":12,"alt":1493,"batt":53,"conn":"m","lat":-0.123,"lon":1.123,"t":"p","tid":"JD","tst":1564164527,"vac":24,"vel":0}

Owntracks recorder map in this case will show the 2019-07-26T18:08:47Z when I would expect it to show the latest one 2019-07-26T19:51:55Z

Screenshot:

image

nikolak avatar Jul 27 '19 08:07 nikolak

You are right, and this can be considered a bug or at the very least a feature request.

As publishes arrive at the Recorder they're written into the .rec file and we do display the last point in the file as the latest. The assumption originally was that points would arrive in order. This can definitely not be the case.

jpmens avatar Jul 27 '19 08:07 jpmens