question

karelholubicka avatar image
karelholubicka asked

Not complete GPS data as KML files from VRM?

Hi. My problem looks similar to

https://community.victronenergy.com/questions/65635/can-i-retrieve-gps-data-kml-files-from-vrm.html

- tracks downloaded as KML looks incomplete.

However, I digged deeper: In fact all coordinates are correctly uploaded to VRM and are visible, when I download complete data. But when downloading data as KML, coordinates are strangely grouped within a random (?) intervals, so 1/ proper timing of coordinates is lost and 2/ some of coordinates are lost aswell. Is there some rounding and simplifying applied to coordinates data before are converted to KML? It happenes identically in API or in "download KML" on Advanced page. I can provide examples if needed, as our car is just cruising Italy :-)

VRM
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
karelholubicka avatar image
karelholubicka answered ·

Well, after I digged really deep, I discovered (at least at the API part), that KML coordinates MAY be divided into more <Placemark>s. And I processed only first Placemark, which left the others "missing". So the GPS tracker script I have found here - thanks Allan:

https://community.victronenergy.com/articles/94188/vessel-tracking-on-google-maps-with-ccgx-and-vrm-a.html

should contain/read not only first Placemark, as it does with:

track = data.getElementsByTagName("coordinates")[0].childNodes[0].nodeValue;

but also the others:

var clusters = data.getElementsByTagName("coordinates").length

for (var i = 1; i < clusters; i++) {

addtrack = data.getElementsByTagName("coordinates")[i].childNodes[0].nodeValue;

track = track + " " + addtrack;

}

Now it works for me.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mesteve avatar image
mesteve answered ·

I click the download button, but all that downloads is an empty KML. The widget has been enabled, and the GPS antenna has been plugged in for over a month showing the correct GPS location.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

pwfarnell avatar image pwfarnell commented ·

1. Please do not post the same post multiple times in different places.

2. Answered elsewhere.

0 Likes 0 ·