WatchUSeek Watch Forums banner

1 - 3 of 3 Posts

·
Registered
Joined
·
379 Posts
Discussion Starter · #1 ·
I'm trying to splice together 2 Ambit log files and add a missing set of GPS points as I pressed the stop button rather than the lock doing a run yesterday.

I've got the missing GPS points from a friend's GPX file, but can't work out how the lat/long coordinates in the GPX should be converted to the Latitude/Longitude elements in the Ambit XML

For example, the GPX is

Code:
<trkpt lat="-33.789061764255166" lon="150.33746349625289">
        <ele>792.74000000000001</ele>
        <time>2013-04-06T22:39:36Z</time>
      </trkpt>
but the Ambit at the point before is

Code:
<sample>
        <Latitude>-0.5897301875836239</Latitude>
        <Longitude>2.623881695608548</Longitude>
        <EHPE>5.16</EHPE>
        <Time>6645.224</Time>
        <UTC>2013-04-06T22:39:26Z</UTC>
        <SampleType>gps-tiny</SampleType>
    </sample>
I thought it would be multiply by 60, but that's not right as that would give

Lat=-35.38381125501743
Long=157.4329017365129

I've got a 40 minute straight line in my log at the mo and would love to fill in the gaps...
Anyone know what formula I should use?
 

·
Registered
Joined
·
1,134 Posts
Hi.

The Ambit xml has the lat/long in radians.
There are 2*pi radians in a circle (vs 360 degrees).

So, divide the degrees by 360 (gets you the fraction of one circle) and then multiply by 2pi to get radians for your xml.
Or simplifying a bit you can just divide by 57.29577951308

positive and negative signs looks like they will stay the same.

Or vice versa, multiply by 57.xxx to go from radian to degrees.
 

·
Registered
Joined
·
379 Posts
Discussion Starter · #3 ·
You're a star or_watching, I was hoping you'd be the one to read this as I knew you'd know the answer :)
Thanks
 
1 - 3 of 3 Posts
Top