First test of GPX file output

Today was the first trial run with the Raspberry Pi “car-puter” running in my car during my commute. I’ve run it a few times before with little success due to the sudden power loss from shutting the car down. This is the first time I had the Pi running using the Pi USP from CW2. It allows the Pi to shut down properly using backup power after the main power (from the car) shuts down when the car is parked.

The GPS data was run through a PHP script to generate the GPX XML file and uploaded to to visualize it.


The results are on the right track. The horizontal line is likely drawn by the mapper because of a gap in data. As for the rest of the track, it looks about right. It’s just shifted over by a few degrees of Lat/Lon. Going to have to review the GPS calibration.

A few Facebook friends were confused as to why I was logging my GPS data from somewhere on the south shore where I don’t even live, all the way onto a boat in Mass Bay and back. heh.

A key thing I learned is how to continue working on the GPS time issue. Should the GPS locations be logged according to the Pi’s local clock? Probably not as that clock doesn’t work since the Pi doesn’t have an internal battery. The GPS receiver pulls UTC which is more universally accurate than worrying about the local computer’s clocks being correct.

One thought on “First test of GPX file output”

  1. Hi,
    Nice project! I know its a long time since june 2014 but i just came across you site since i am prospecting to start a similar project myself (probably largely based on your work). I’m pleased to see you came to the conclusion of sticking to the UTC time generated by the receiver. I am curious to hear what you ended up doing with the lat/lon shift? I believe the shift may likely be due to using the wrong formula or the wrong UTM zone in a conversion somewhere. Natively(mostly), GPS (or GNSS) data comes in the ECEF coordinate system. (x,y,z, from the center of the earth) and is converted into a local coordinate system. Sometimes, coordinates are portrayed in the wrong coordinate system. For instance, if a regular old car gps was locked to UTM zone 10 (california) and driven to the east coast in zone 18, it would be trying to represent the east coast coordinates based on a flat plane going through California. Earth not being that flat and all would put those coordinates somewhat off to the left and probably far under ground. Get in touch if that is new to you and you are still working on this. I may have some python tools to convert coordinates to ‘Murican… actually i know i have some mathlab tools, but they can be Pythonified easily enough.

Leave a Reply

Your email address will not be published. Required fields are marked *