Jump to content

Mileage Calculations - How?


TripCyclone

Recommended Posts

I'm just wondering if anyone can help me understand something about how Groundspeak calculates distances on the site. Here's why I'm wondering.

 

In the Great TB Race, dipping is not allowed and time a dip occurs, we void the points earned from it. This requires a recalculation of the distance between the initial pickup and the final drop off, along with looking at the path on a map to recalculate border crossings.

 

Since this can't be easily done on the site, I was using Google Maps to do it. I had to place markers for each cache, draw a line between the two, and get the distance and border crossings from that. I started looking for distance calculators to speed up the process and came across several, including boulter's and GPS Visualizer. The latter one both gives the distance and plots it on a map. But after a few tries I began to notice something. The distance both of these sites, and several other online distance calculators, use does not match what is listed on Groundspeak. Depending on the distance between the two points, the variance in distance can be as much as two miles from what Groundspeak lists. Here's an example:

 

A travel bug goes from GCX671 in Greece to GC1T6YA in England. Groundspeak lists the mileage as 1571.9 miles. Both of the above sites list 1573.79 (one rounds from 1573.788). This got me looking into why the distances are different. I found that the distance calculator sites are using something called a Great Circle calculation. It is designed to take into account that the Earth has a slightly squished, elliptical shape. However, in my research, it seems that Groundspeak is using something called a FAI Sphere. This method is used by the Fédération Aéronautique Internationale. The problem is that it is based on the idea that the Earth is a perfect sphere, which it isn't.

 

So which one is more accurate? Logic would say that the Great Circle version is more accurate than the FAI version. Any reason why Groundspeak uses one over the other? There are distance calculators that will figure out the distances, so I ask out of personal wonder.

Link to comment

The first waypoint you gave is in florida, so I couldn't try the distance calc my self.

 

Several months ago, gc did change how they computed distances, and there was a ripple in the forums at that time. I don't remember if they stated what method they started using, maybe Nate or someone that remembers can chime in here. I tried searching but thats pretty useless anymore.

 

A program I use is geocalc, it uses a couple different formulas. You just key in both coordinates, and you can change which method it uses and see the difference immediately.

Link to comment

Oops, my mistake, its no longer called geocalc, its called fizzycalc.

 

Here's the url:

 

http://www.fizzymagic.net/Geocaching/FizzyCalc/index.html

 

Okay, that explains a few things.

 

Tried Fizzycalc and here's what I see. The Great Circle option doesn't match the mileage seen in every other Great Circle calculator I've seen (which all give the same measurement), being lower by about 3 miles than what's online, and about 1 mile lower than what GS lists. However, the "High Accuracy" option produces that Great Circle measurement I've seen online exactly. Rhumb Lines measure distances slightly differently anyway, so aren't an issue for me.

Link to comment

Tried Fizzycalc and here's what I see. The Great Circle option doesn't match the mileage seen in every other Great Circle calculator I've seen (which all give the same measurement), being lower by about 3 miles than what's online, and about 1 mile lower than what GS lists. However, the "High Accuracy" option produces that Great Circle measurement I've seen online exactly.

Great Circle distances generally imply a spherical Earth and can vary depending on what you choose as the radius of the Earth. For FizzyCalc, I chose 6366707 meters, which makes 1 nm exactly 1 minute of latitude; others may choose different values, but from my experience, this is the most common.

 

The "High Accuracy" calculation is not a great circle calculation because it uses the WGS-84 ellipsoid. It is the most accurate, good to about a centimeter per 100 km. Of course, assuming that the Earth is actually the shape of the WGS-84 ellipsoid, which it is not. And, of course, if you are flying in an airplane the radius is bigger (by about 10 km for a jet) so the distance is a little longer.

Link to comment

As for the reason, the simpler spherical calculations almost certainly require less CPU time, quite possibly enough less to matter. I can see gc.com deciding that for this game, the extra accuracy isn't worth the cost. As fizzymagic points out, there are other factors too, so a more accurate calculation could easily be considered worthless.

 

Edward

Link to comment

Tried Fizzycalc and here's what I see. The Great Circle option doesn't match the mileage seen in every other Great Circle calculator I've seen (which all give the same measurement), being lower by about 3 miles than what's online, and about 1 mile lower than what GS lists. However, the "High Accuracy" option produces that Great Circle measurement I've seen online exactly.

Great Circle distances generally imply a spherical Earth and can vary depending on what you choose as the radius of the Earth. For FizzyCalc, I chose 6366707 meters, which makes 1 nm exactly 1 minute of latitude; others may choose different values, but from my experience, this is the most common.

 

The "High Accuracy" calculation is not a great circle calculation because it uses the WGS-84 ellipsoid. It is the most accurate, good to about a centimeter per 100 km. Of course, assuming that the Earth is actually the shape of the WGS-84 ellipsoid, which it is not. And, of course, if you are flying in an airplane the radius is bigger (by about 10 km for a jet) so the distance is a little longer.

 

Interesting. I'm not a math person to begin with so I could read very little of the presented formulas themselves. But in what research I've done today, it seems there is a difference of opinion on how to do Great Circle measurements. Every Great Circle calculator I have found (short of yours), seems to be using what I've found to be the equatorial radius, which is 6,378.137 km (the upper extreme of Earth's radius). The polar radius, which hits the low end, is 6,356.7523 km. The average of the two is 6,371.01 km. The equatorial radius measurements seem to be producing exactly the same result as your High Accuracy calculation in the various trials I performed, hence why the difference between your Great Circle and High Accuracy calculations threw me off and made me wonder how you did them. The average radius value seems to be what the FAI Sphere calculations use, which also match what GS uses on several trials. Hmmm...I wonder if your FizzyCalc program would match GS's distances if it had an option for using the average radius?

 

Yet even more interesting is the differences in reported accuracy. I've frequently seen reports that Great Circle measurements are more accurate than FAI Sphere measurements because they take into account Earth's not-so-spherical shape while FAI Sphere models assume a perfectly spherical Earth model. But I've found that they only as accurate as the method used, much like you said. I have found another source that says Great Circle measurements are based on a spherical Earth model, which would be less accurate than models based on Earth's real shape.

 

Then, I find references to Vincenty's formula. It seems that if this formula is used when doing Great Circle calculations, and this formula is designed to take into account the correct shape of the Earth, it becomes more accurate than standard Great Circle formulas. Actually, I came across this reference on one of those calculators, and it produced the exact same result as your High Accuracy option. Could that be the formula you used?

 

Being inquisitive in nature, it's quite interesting to see these differences out there. I can understand why GS wouldn't care as much for that little bit of extra accuracy if it sacrifices processing time like paleolith suggested. However, I guess we might have to agree to disagree on your point about High Accuracy not being a great circle measurement. It is designed to measure the shortest distance between two points (which is what a great circle measurement is designed for). And WGS84 (World Geodetic System) is based on the concepts of geodesics, or the shortest distance between two points on the Earth's surface. In other words, great circles. So if you say it's based on WGS84, then I say it is based on the concept of great circles.

 

All in all, it really makes me look differently when websites give distances. What method are they using? How accurate are they? I would love to hear someone from GS speak up on what method they use. And all of this learning I'm doing is a result of trying to find an easy way to recalculate mileage and draw a map plotting a line between two points when a racing travel bug is dipped. If only some of the kids I teach were this inquisitive.

Link to comment

Then, I find references to Vincenty's formula. ... Could that be the formula you used?

 

Yes, the High Accuracy mode of FizzyCalc uses the Vincenty method (it's not really a formula, but that is more math-y). The Vincenty distances are generally considered the most accurate.

 

However, I guess we might have to agree to disagree on your point about High Accuracy not being a great circle measurement. It is designed to measure the shortest distance between two points (which is what a great circle measurement is designed for). And WGS84 (World Geodetic System) is based on the concepts of geodesics, or the shortest distance between two points on the Earth's surface. In other words, great circles. So if you say it's based on WGS84, then I say it is based on the concept of great circles.

 

Warning: math content! A "great circle" is a geodesic on a sphere. It's actually an exact circle, hence the name. On an ellipse, the geodesics aren't quite circles, so it's not quite right to call them "great circles." I just use the proper term, "geodesic."

 

But not everybody uses the terminology correctly, and a lot of the web pages that claim to do "great circle" calculations are actually doing ellipsoidal geodesics.

 

If you ever try one of those puzzles where the distances from three points to the cache are given, you will care a lot about what method the puzzle creator used! There is a third method of approximate ellipsoidal distances where you use the Earth's radius at the latitude of the points, but I didn't include that in FizzyCalc because Vincenty is so much better.

 

But the distance you should use for TB distances is definitely the Vincenty distance.

Link to comment

But not everybody uses the terminology correctly, and a lot of the web pages that claim to do "great circle" calculations are actually doing ellipsoidal geodesics.

LOL! I firmly stand behind the idea that the most common claim for why people struggle with science topics, that the concepts are too difficult to understand, is inaccurate. Outside if upper level content that most people would only learn if they were studying that particular field, most "difficult" concepts are only difficult because of the terminology. I frequently tell my students that understanding the vocabulary is the most critical step towards understanding the concepts. So not using the terminology correctly isn't surprising. The use of great circle is so common that people don't realize it isn't exactly a circle. Kind of like how people continually refer to their educated & untested guesses as theories when they are really hypothesis (another topic in my classes when we learn about doing scientific investigations). A theory implies that the concept is backed up through repeated testing & data collected.

 

But the distance you should use for TB distances is definitely the Vincenty distance.

 

I agree with you whole-heartedly on that. Which is what lead me to start this topic into understanding how GS calculates its distances. As originally mentioned, the error for the distances logically increases as the distance between the two caches increases. With small distances, the error is easily under 1 mile. Large distances (over 1000 miles), and the error can be between 1.5 - 2.0 miles. HUGE distances (like jumping from North America to Australia), can show errors over 2.0 miles. Of course, it isn't an error within a single system, only when compared to a more accurate measurement system.

 

Hmmm...is it a bit odd that we both seem engaged in this topic at this hour, between Christmas Eve and Christmas morning (depending on where we live)? And...I'm actually wide awake enough to still be interested. By the way, thanks for the conversation. I said I'm an inquisitive person and this has been in interesting deviation into the concept of geodesy.

Link to comment

I have no interest in the competition, but for sake of argument does it really matter which site is used as long as the same site and format is used consistently on all questions?

 

If you mean with regards to my original intention, to help recalculate information for my race, then that's exactly right. Using Google Maps is what I've done, but it is more time consuming. I was looking for an easier method of getting the information. GPS Visualizer did EXACTLY what I wanted. It gave the distance between the two points and could produce a map with the path between them plotted. One problem...the method it employs to calculate and plot the map is the Vincenty method. Groundspeak doesn't use this method (which is well regarded as being highly accurate). Since the only times we need to recalculate are when a travel bug has been dipped, we primarily use the mileage posted on the travel bug page. So using an online distance calculator like GPS Visualizer, and many others, produces different mileage than what Groundspeak would produce.

 

Using several items, I tested this. I took a single cache-to-cache jump from a travel bugs history. Using an outside distance calculator, I entered the latitude/longitude for cache A and cache B. I consistantly got the same answer on several distance calculators, and that answer was not what Groundspeak listed. Through all my testing, I found one setting that matched what Groundspeak lists as a distance, and it involved a method that I saw mentioned as less accurate by several sources.

 

And with these differences, I can't use those sites because like your argument mentions, they aren't the same format. This means that items that we have to do this on will get a small boost in their mileage as a result in differences in measuring methods. So I'm back to Google Maps, where any error in distance usually is negligible (1/100th or 1/100th of a mile) and usually a result of having to plot everything by hand. But otherwise, the same method is used.

 

I'm not trying to get Groundspeak to change their method. I'm just wondering why they use the method they do...and better understand what that method is. Knowing what method means I can start searching for off-site programs to meet my need that will produce results in the same format.

Link to comment

Fizzymagic,

 

Even though I get the feeling that you think its inaccurate, is there any chance adding the same formula as the gc site as a 4th option?

 

I kind of hinted at it, but I'll add a vote for this. I like how simple your program is. I'll add one more. How hard would it be to add an option to export the results onto, say, Google Maps with the Point A and Point B plotted with a line drawn between them, based on which method you used to calculate the distance (High Accuracy, Great Circle, Rhumb Line, or the potential 4th option: Groundspeak)?

Link to comment

What might be a better option is get someone to create a webpage specifically for racing TBs with the options of deleting waypoints and instantly recalculating the distances. The hard part would be getting the data into the system. The race manager could create a bookmark of all of the used caches to get the coords, but figuring the TB through which cache sequence would a different problem. I've not looked into it, but I'm sure there's a more automated way to do it.

 

That way custom maps could be created and the results presented in various ways suited to the participants. Even RSS feeds, etc.

Link to comment

What might be a better option is get someone to create a webpage specifically for racing TBs with the options of deleting waypoints and instantly recalculating the distances. The hard part would be getting the data into the system. The race manager could create a bookmark of all of the used caches to get the coords, but figuring the TB through which cache sequence would a different problem. I've not looked into it, but I'm sure there's a more automated way to do it.

 

That way custom maps could be created and the results presented in various ways suited to the participants. Even RSS feeds, etc.

 

That would be AWESOME...but way beyond my limited web programming skills.

Link to comment

Fizzymagic,

 

Even though I get the feeling that you think its inaccurate, is there any chance adding the same formula as the gc site as a 4th option?

 

If I can figure out exactly what they use I would be glad to do so. I haven't had much luck with getting it to date...

I'm pretty sure Nate said what they were using here about 6 months ago or so, but I can't find the post. There were a couple threads at that time because they changed it and it was resulting in caches being reported as being further out than they used to. Maybe someone else will have better luck searching or Nate may chime in if he remembers.

Link to comment

I'm pretty sure Nate said what they were using here about 6 months ago or so, but I can't find the post. There were a couple threads at that time because they changed it and it was resulting in caches being reported as being further out than they used to. Maybe someone else will have better luck searching or Nate may chime in if he remembers.

 

"Haversine" - Raine

 

http://forums.Groundspeak.com/GC/index.php...t&p=3955173

Link to comment

I'm pretty sure Nate said what they were using here about 6 months ago or so, but I can't find the post. There were a couple threads at that time because they changed it and it was resulting in caches being reported as being further out than they used to. Maybe someone else will have better luck searching or Nate may chime in if he remembers.

 

"Haversine" - Raine

 

http://forums.Groundspeak.com/GC/index.php...t&p=3955173

 

Haversine == spherical, but they are using some weird radius for the Earth. I'll see if I can back it out... Can somebody give me a long distance calculated by the site?

 

ETA: Hmm... I am seeing a radius of 6372798 m used here and there. Maybe it's what the site is using. I could modify FizzyCalc to let you put in your own radius for the spherical calculations.

Edited by fizzymagic
Link to comment

I'm pretty sure Nate said what they were using here about 6 months ago or so, but I can't find the post. There were a couple threads at that time because they changed it and it was resulting in caches being reported as being further out than they used to. Maybe someone else will have better luck searching or Nate may chime in if he remembers.

 

"Haversine" - Raine

 

http://forums.Groundspeak.com/GC/index.php...t&p=3955173

 

Haversine == spherical, but they are using some weird radius for the Earth. I'll see if I can back it out... Can somebody give me a long distance calculated by the site?

 

ETA: Hmm... I am seeing a radius of 6372798 m used here and there. Maybe it's what the site is using. I could modify FizzyCalc to let you put in your own radius for the spherical calculations.

 

If you get it working out to match Groundspeaks numbers, let me know. I might have to see about making FizzyCalc the Official Great TB Race Distance Calculator. LOL!

Link to comment
Haversine == spherical, but they are using some weird radius for the Earth. I'll see if I can back it out... Can somebody give me a long distance calculated by the site?

Don't know if you ever got the data you need. TB1NF9E your karma ran over my dogma recently jumped from Nevada to New South Wales, roughly 7500 miles.

 

Great! Give me the endpoints and the mileage and I'll figure out the radius!

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...