alexandrainst / alexandra-trackmap-panel

Grafana map plugin to visualise coordinates as markers, hexbin, ant path, or heatmap.
MIT License
78 stars 26 forks source link

Ant-Path is not chronologically connected #44

Closed xkilian closed 3 years ago

xkilian commented 3 years ago

The path jumps around when a vehicule is in proximity of its own path. When the vehicule is on a linear or near linear path it looks ok.

image

Am I missing a configuration item to get it to work properly?

anirudh-ramesh commented 3 years ago

@xkilian, could you check if your query is ordered by time asc/desc either? This behaviour has been observed when not ordered by time, and eliminating that could be one step towards reproducing this.

xkilian commented 3 years ago

This is data is coming from a Loki log stream which, each log line is converted to a table using a Grafana Transform. I have not see any indication that this data could sequence other than newest to oldest. I will look around in Grafana to see. When looking at the data in table or graph format, it does not look anomalous..

anirudh-ramesh commented 3 years ago

Yeah, I think it's worth a relook at Grafana because when I saw your screenshot, it pretty clearly looks to me like the ant path is an ORDER BY longitude DESC (or ORDER BY latitude DESC if the map is rotated by any means, or ASC in either if the ant path is moving up instead of down) or its equivalent in Loki.

xkilian commented 3 years ago

That sounds plausible. I have no clue how to get it re-ordered by time, so any suggestions are welcome.

xkilian commented 3 years ago

Ok, inspecting the data in the panel, shows that it is indeed ordered by latitude or longitude and not by time. I still have not figured out how to change it.. Suggestions welcome. image

xkilian commented 3 years ago

I think we can close this issue as it is unrelated to TrackMap. Thank you,

xkilian commented 3 years ago

The origin of this issue has been acknowledged in Loki by the maintainers. If using using Loki and Labels to Fields Grafana feature the output cannot be used in the TrackMap plugin as the data is not strictly ordered by time. AS of writing this will not work in Grafana 7.3.5 and Loki 2.1.