GGA Discussion Forums
GGA Forums
Technical Forum -- GPS Units and Various Software
Math Help|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
Geocacher![]() |
I know that we had a discussion at one time about the waypoint hexa-something when geocaching.com was going to run out of numbers.
I thought I saw a formula for the figuring out of the gc-waypoint and converting it to the actual cache number. I can't seem to find the formulas I kind of would like the pre- new waypointing system and the old waypoint system formulas and does anybody know when that whole thing occurred? |
||
|
Neutiquam erro.![]() |
quote:Yea, I do. However my notes are at home. ----- |
|||
|
|
Geocacher |
The "pre-new" numbering system was GC followed by a 4 digit hexadecimal value (hex for short). Hex is a base-16 number system that happens to work well as a way to represent binary computer memory. All true-computer-geeks can count and think in hex. In hex, the numbers 0-9 are the same as base-10 and 10=A, 11=B, 12=C, 13=D, 14=E and 15=F. To get the decimal number of a 4 digit hex number, multiply the first digit by 4096, second by 256, third by 16 and then add in the fourth. For example AC27 would be 10*4096 + 12*256 + 2*16 + 7 = 44071. A $12 scientific calculator may have a hex conversion function, which is a lot easier. The largest 4 digit hex number is FFFF which is 65535. When the number of caches got to that, they had to go to another system. But I think that all of the caches with numbers less than FFFF used the hex system.
FWIW, CharlieP |
|||
|
Neutiquam erro.![]() |
Obviously the GC in a waypoint has nothing to do with the numeric number so ignore it.
First you need to set up a translation table to get the "value" of each character. 0=0 1=1 2=2 3=3 4=4 5=5 6=6 7=7 8=8 9=9 A=10 B=11 C=12 D=13 E=14 F=15 G=16 H=17 J=18 K=19 M=20 N=21 P=22 Q=23 R=24 T=25 V=26 W=27 X=28 Y=29 Z=30 As you can see the first ten are simple they are simply the number. Now to convert a waypoint to a number Step 1 is to get each character of the up to four characters making up the waypoint, ignoring the first GC. I am going to label them C1, C2, C3 and C4, where C1 is the last character. That is I number them from right to left. The reason for this is the oldest geocaches didn't have four characters. For example my Lake Lanier geocache is GC21. So for it C1=1, and C2=2. Now the GGA Feb meeting is GCMJ34 so C1=4, C2=3, C3=J, and C4=M. So let's use it. Step 2 is to convert each character to its value based on the translation table. I'll label them V1, V2, V3, V4. So C1=4, therefore V1=4, then V2=3, V3=18, and V4=20. Now there are two similar formulas depending on if C1 is the Letter G or higher. Since C1 in this case is M. So we use what I call the 31 formula. Which is id=V1+V2*31+V3*31^2+V4*31^3 - 411120. So id of GCMJ34= 4+3*31+18*31^2+20*31^3 - 411120 = 4+93+17298+595820 - 411120 = 202095 You can check this by going to the cache page with the waypoint. http://www.geocaching.com/seek/cache_details.aspx?wp=GCMJ34 and the id http://www.geocaching.com/seek/cache_details.aspx?id=202095 You will see they are the same. Now lets go to and older geocache. For example GC38B3 Ok C1=3, C2=B, C3=8, C4=3, V1=3, V2=11, V3=8, V4=3 Now since C4 is less than G we use what I call the 16 formula. Which is id=V1+V2*16+V3*16^2+V4*16^3 So for GC38B3 id=3+11*16+8*16^2+3*16^3 =3+176+2048+12288 =14515 Once again test it http://www.geocaching.com/seek/cache_details.aspx?wp=GC38B3 http://www.geocaching.com/seek/cache_details.aspx?id=14515 Now for GC21 C1=1, C2=2, C3 doesn't exist, C4 doesn't exist V1=1, V2=2, V3=0,V4=0 (Because they don't exist) There id = 1+2*16+0*16^2+0*16^3 = 1+32 =33 Again the test http://www.geocaching.com/seek/cache_details.aspx?wp=GC21 http://www.geocaching.com/seek/cache_details.aspx?id=33 I was writing this as CharlieP was posting, and yes the 16 formula is the formula to convert hex digits to decimal digits. The 31 formula converts the special base 31 that geocaching uses for waypoints. The special part is they skip some letters and the minus 411120. ----- |
|||
|
Geocacher![]() |
Thanks Guys. This will help alot.
I knew I could count on you! |
|||
|
Neutiquam erro.![]() |
I'll leave it as an exercise for student to figure out how convert the number to a Waypoint.
----- |
|||
|
|
Geocacher |
quote: Sounds like a pi eating contest to me. |
|||
|
|
Geocacher |
Found a prog that Fizzymagic wrote that would be useful if you're wanting to convert GC numbers:
http://www.fizzymagic.net/Geocaching/GeoCalc/GeoCalc.html The prog will perform the following: Coord conversion Distance calculation between two points Waypoint projection GC Waypoint Numbering conversion (converts from GC8012 50 32786 or vice versa |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

