G
Guest
Guest
I am just writing a little program to help me enter waypoints into my Garmin GPS and create routes from it. (I know you can buy software to do it, but I like a challenge).
To test it, I am comparing the Bearing & Distance from the same waypoints in my GPS to that produced by the program. The bearing is fine in all cases, but the distance is sometimes out a little bit.
It appears to me that the GPS reads a bit higher sometimes (or my program reads a bit lower depending on how you look at it).
If the course is mainly North-South of vice versa then the distance is spot on, if the course is vaguely east or west, then it can be some way out. For Ramsgate to Nab Tower it is underreading by about 3/4mile. For Ramsgate to Singapore it underreads by about 35 miles. It's just strange that its bang on for North & South.
The formula I use goes something like this:
d = Acos(sIn(lat1) * sIn(lat2) + Cos(lat1) * Cos(lat2) * Cos(lon1 - lon2))
dDegrees = d * 180 / PI
Distance = Round(dDegrees * 60, 1)
Which apparently gives the Great Circle distance, and I suppose this is where the error comes in, as if you are going pretty much North-South then you are following a Great Circle whereas if you are going any other way, then you aren't.
Does the GPS give a Great Circle distance?
I don't know, but I'd welcome any input.
Mark
To test it, I am comparing the Bearing & Distance from the same waypoints in my GPS to that produced by the program. The bearing is fine in all cases, but the distance is sometimes out a little bit.
It appears to me that the GPS reads a bit higher sometimes (or my program reads a bit lower depending on how you look at it).
If the course is mainly North-South of vice versa then the distance is spot on, if the course is vaguely east or west, then it can be some way out. For Ramsgate to Nab Tower it is underreading by about 3/4mile. For Ramsgate to Singapore it underreads by about 35 miles. It's just strange that its bang on for North & South.
The formula I use goes something like this:
d = Acos(sIn(lat1) * sIn(lat2) + Cos(lat1) * Cos(lat2) * Cos(lon1 - lon2))
dDegrees = d * 180 / PI
Distance = Round(dDegrees * 60, 1)
Which apparently gives the Great Circle distance, and I suppose this is where the error comes in, as if you are going pretty much North-South then you are following a Great Circle whereas if you are going any other way, then you aren't.
Does the GPS give a Great Circle distance?
I don't know, but I'd welcome any input.
Mark