iPhone GPS data acquisition apps

14 views
Skip to first unread message

Chris Bartley

unread,
Nov 10, 2009, 9:00:05 PM11/10/09
to char...@googlegroups.com
Hi all,

Just wanted to share some thoughts about GPS data acquisition apps for
the iPhone. For starters, I thought I'd post my experiences testing
the RunKeeper app as a possible way to collect driving data for
chargecar.org. In short, not good, I'm afraid.

There are two problems:

1) The exported GPX is invalid. They have an extra <time> element
within the <trk> element which isn't allowed by the schema. I've
reported this on their Get Satisfaction site (http://gsfn.us/t/kvz0).

2) They're rounding/truncating the timestamps to whole-number seconds
which results in wild fluctuations of the calculated speed. I've
reported this, too (http://gsfn.us/t/kvyy).

To be fair, #2 isn't unique to RunKeeper. TrailGuru suffers from the
same problem, as does MotionX-GPS. MotionX-GPS, however, does provide
the fractional-second timestamps within a raw.xml file which is tucked
into the .kmz file that you get upon export. I have code which takes
in a MotionX-GPS .kmz file and produces a GPX with fractional-second
timestamps, but we haven't yet had a chance to make it available (and
I'm not convinced yet that the ROI is worth it at this point).

Anyway, I'm afraid we currently have to discourage users from
recording drives with RunKeeper unless (until?) the above two issues
are resolved. Right now, iPhone users who want to contribute to
ChargeCar should use MotionX-GPS and contact me for details on how to
get a useable GPX from it.

Chris

David

unread,
Nov 11, 2009, 3:39:35 PM11/11/09
to ChargeCar
I downloaded a free app "GPS Stone" and I thought that it would work
ok. I recorded my commute, exported the gpx file and tried uploading
it to chargecar I got this error:

There was an error processing your raw data file. Please verify that
your file is not corrupt.

I went to this handy online page for visualizing gpx files and my file
loaded just fine.
http://www.chrislacy.net/map/current/index.html

I tried w3cschools xml validator and it was unable to find errors.
http://www.w3schools.com/XML/xml_validator.asp

Timestamps in the file do not appear to be fractional and it only
records a trkpt every 2-3 seconds so I am not sure that it will
capture data to the level chargecar requires. Still looking for an
accurate gps/gpx app for the iphone.

Chris Bartley

unread,
Nov 11, 2009, 4:48:51 PM11/11/09
to char...@googlegroups.com
Hi David,

On Nov 11, 2009, at 3:39 PM, David wrote:
> I downloaded a free app "GPS Stone" and I thought that it would work
> ok. I recorded my commute, exported the gpx file and tried uploading
> it to chargecar I got this error:
>
> There was an error processing your raw data file. Please verify that
> your file is not corrupt.

Thanks for the info. I got your other mail with the GPX attached,
thanks. Unfortunately, it, too, is invalid according to the GPX
schema. The problem is twofold:

1) The child elements of the <trkpt> element are in the wrong order
2) The timestamp in the <time> element is formatted wrong

For example (I've obscured your lat/long for privacy):

<trkpt lat="XX.XXXXX" lon="YY.YYYYY">
<time>2009-11-11T08:39:59Z AM</time>
<hdop>17.068495</hdop>
<magvar>192.000000</magvar>
<ele>237.000000</ele>
<vdop>23.164150</vdop>
</trkpt>

The "AM" part of the timestamp shouldn't be there (it's 24-hour time),
and the elements must be listed in the following order: ele, time,
magvar, hdop, vdop

> I went to this handy online page for visualizing gpx files and my file
> loaded just fine.
> http://www.chrislacy.net/map/current/index.html
>
> I tried w3cschools xml validator and it was unable to find errors.
> http://www.w3schools.com/XML/xml_validator.aspl

The w3schools validator merely validates well-formedness, and doesn't
actually validate against the schema (they say so somewhere on the
page, but it's not obvious and easily missed). Same must be true for
the chrislacy.net site.

> Timestamps in the file do not appear to be fractional and it only
> records a trkpt every 2-3 seconds so I am not sure that it will
> capture data to the level chargecar requires. Still looking for an
> accurate gps/gpx app for the iphone.

The best I've found so far is MotionX-GPS (http://gps.motionx.com/),
but beware that you can't (well, shouldn't) just upload the GPX file
that it exports because they truncate the fractional seconds. I have
some code which will convert the KMZ file (also exported by MotionX-
GPS) to a GPX with fractional timestamps, but we've kinda been hoping
MotionX-GPS would start using fractional-second timestamps in their
GPXs rather than our having to add special-case code to
chargecar.org. Maybe in the meantime I can make the conversion tool
more user-friendly and release it for y'all to try.

Finally, we're working on our own iPhone app. More details to come in
mid-late December.

Chris

Kevin Kelm

unread,
Nov 11, 2009, 8:32:47 PM11/11/09
to ChargeCar
I'd love to start contributing as soon as you have an iphone app.

David

unread,
Nov 11, 2009, 9:53:13 PM11/11/09
to ChargeCar
Thanks for the speedy explanation Chris.

I went and checked out the gpx 1.1 spec and you are right on both
points.
It is disappointing that so many developers get the format of the gpx
xml file wrong.

David

unread,
Nov 12, 2009, 10:28:33 AM11/12/09
to ChargeCar
I tried Trails Lite which it allows you to crank up the accuracy and
record more waypoints, but the gpx ouput is still very disappointing.
No fractional seconds, displays PM in the time, very little
information.

<trkpt lat="43.059195" lon="-89.451108">
<ele>248.000000</ele>
<time>2009-11-12T02:30:48Z PM</time>
</trkpt>
<trkpt lat="43.059085" lon="-89.451084">
<ele>249.000000</ele>
<time>2009-11-12T02:30:48Z PM</time>
</trkpt>

I'm calling out all iphone gps app developers. Your code is teh suxor.
Prove me wrong.

Edoardo

unread,
Nov 17, 2009, 8:07:25 AM11/17/09
to ChargeCar
I'm collecting commute data with MotionX app for iPhone in Europe. Any
news about international & iPhone data upload?

Chris Bartley

unread,
Nov 17, 2009, 10:04:57 AM11/17/09
to char...@googlegroups.com
On Nov 17, 2009, at 8:07 AM, Edoardo wrote:
> I'm collecting commute data with MotionX app for iPhone in Europe. Any
> news about international & iPhone data upload?

International uploads are welcome and appreciated! We don't yet have
the ability to do elevation lookups for anywhere outside the US, but
hope to do so at some point (we'd need to partner with agencies
similar to the USGS which provides elevation data for any lat/long).
So, for now, it's best if you have a GPS with a barometric altimeter
for more accurate elevation measurements, but it's still OK if you
don't. You'll just see that the recorded elevations aren't as
accurate as they could be and thus the power calculations will be a
bit off.

As for iPhone data upload from MotionX-GPS, I'm a day behind, sorry.
I'll be releasing a downloadable tool later today which will be able
to convert a MotionX-GPS .kmz file to a .gpx file which you can then
upload to chargecar.org.

thanks and best,

Chris
Reply all
Reply to author
Forward
0 new messages