Page 1 of 1

PHP GPS parser

Posted: Thu Oct 11, 2007 10:17 am
by patrikG
I've looked far and wide on phpclasses.org, sourceforge, freshmeat, googled for it but can't find a satisfactory GPS-parsing class.
There are a number of promising projects like Google Map GPS Cell Phone Tracker (of which I'd only need the GPS-parser) but the main problem appears to be that there are so many different formats GPS-data is stored in: GPX, NMEA, RINEX etc. etc.

There are some fine online solutions (e.g. http://www.gpsvisualizer.com/), some Java-applets and such, but nothing in PHP. The classes I've found on phpclasses.org are useless - either extremely narrow in scope or incomplete.

Does anyone know of a good class to parse GPS data (in different formats, if possible) with?

Posted: Thu Oct 11, 2007 10:21 am
by feyd
Do you have links to the specs of each of the storage formats?

Posted: Thu Oct 11, 2007 10:30 am
by patrikG
GPX: http://www.topografix.com/GPX/1/1/gpx.xsd

had a look at their site, nothing of use even in the developer's section.
Will check for NMEA and get back to you.

Posted: Sat Oct 13, 2007 5:15 am
by patrikG
http://www.geoaps.com/NMEA.htm for NMEA - csv instead of XML. And NMEA apparently has various "dialects"... Alas - I'm surprised no-one has created a universal GPS-class in PHP, yet, to deal with the Babylon of GPS-formats.

edit: Looks like I'll be using http://sourceforge.net/projects/gpsbabel via exec().
edit 2: Unfortunately, gpsbabel doesn't have an auto-detect feature for the GPS-format used via the command-line, only for the GUI.
Does anyone know of or has seen a wrapper-class for gpsbabel? And, I know, I'll probably have to write it myself, lazy as I am... ;)