Jump to content

Algorithm for GC-Code


sb1337

Recommended Posts

Hello,

 

I own a Garmin Etrex H which subdivides the waypoints into groups by starting letter.

The problem with transferring a gpx-file with waypoints is that all geocaches begin with GC.

 

I now want to edit the GPX file so that the "GC" at the beginning is cut off and the rest is reverse.

It must be reverse because the GC-codes are generated continously, so there will be many more caches starting with GC0 than with GCZ.

 

In the GPX-file there is an entry <Groundspeak:cache id="1400061" ..> but I can find no source where it is explained how to convert this id to a GC-code and back to change the GC-code. The support-page [1] is insufficient for this topic, particulary there is no information given about the letters left out.

 

Thanks in advance!

 

sb1337

 

[1] http://support.Groundspeak.com/index.php?pg=kb.page&id=221

Edited by sb1337
Link to comment

Hello,

 

I own a Garmin Etrex H which subdivides the waypoints into groups by starting letter.

The problem with transferring a gpx-file with waypoints is that all geocaches begin with GC.

 

I now want to edit the GPX file so that the "GC" at the beginning is cut off and the rest is reverse.

It must be reverse because the GC-codes are generated continously, so there will be many more caches starting with GC0 than with GCZ.

 

In the GPX-file there is an entry <Groundspeak:cache id="1400061" ..> but I can find no source where it is explained how to convert this id to a GC-code and back to change the GC-code. The support-page [1] is insufficient for this topic, particulary there is no information given about the letters left out.

 

Thanks in advance!

 

sb1337

 

[1] http://support.Groundspeak.com/index.php?pg=kb.page&id=221

 

At first they were hexadecimal. Then the obvious became apparent and they went to base 31(?). For conversion get a copy of fizzycalc, it does the needful. Fizzycalc is a two way conversion. But the most popular way of dealing with the problem you have is to simply drop the GC. The garmin will display by closest anyway so the sort order of the codes is irrelevant.

 

Edit: found in Geolex - The characters used for the base-31 conversion are 0123456789ABCDEFGHJKMNPQRTVWXYZ (the letters ILOSU are omitted).

Edited by jholly
Link to comment

For conversion get a copy of fizzycalc, it does the needful. Fizzycalc is a two way conversion. But the most popular way of dealing with the problem you have is to simply drop the GC. The garmin will display by closest anyway so the sort order of the codes is irrelavant.

 

Hello,

 

thank you for your information! fizzycalc does exactly what I want. But given that I want to convert hundreds of geocaches I need a way to do this automatically. So I'm writing my own program for that. All is working fine for now except the conversion from GC-code to decimal code.

 

The sort order is important for me because I always print out the geocache listings or use other devices for getting the GC-code and then just select the GC-code from my Garmin-waypoints.

 

What I found out for now:

 

0 - 65535		GC0 - GCFFFF (Hexadecimal, 4 digits)
65536 - 512400		GCG000 - GCZZZZ (base31, 4 digits)
512401 - 28218031	GC10000 - GCZZZZZ (base31, 5 digits)

 

The characters used for the base-31 conversion are 0123456789ABCDEFGHJKMNPQRTVWXYZ (the letters ILOSU are omitted)

 

Ah ok, this is the information I need! Thank you very much! :-) I didn't find it with google...

 

Edit: Yeehah, code works! :-)

Edited by sb1337
Link to comment

but if your happy, have fun.

 

Yes, I am, thank you! :-)

 

Now all caches saved on my Garmin are (more or less) equally distributed over the groups, and not all in group E-H because of starting with GC (I cut the GC of all caches away). So I can find a cache much faster in my Garmin when having the GC-code from the listing.

 

coords1.jpg

coords2.jpg

coords3.jpg

Edited by sb1337
Link to comment

but if your happy, have fun.

 

Yes, I am, thank you! :-)

 

Now all caches saved on my Garmin are (more or less) equally distributed over the groups, and not all in group E-H because of starting with GC (I cut the GC of all caches away). So I can find a cache much faster in my Garmin when having the GC-code from the listing.

 

coords1.jpg

coords2.jpg

coords3.jpg

How do you keep the garmin from re-arranging the list? They like to display by closest, or do you use display by name?

Link to comment

How do you keep the garmin from re-arranging the list? They like to display by closest, or do you use display by name?

 

When I select "Waypoints" from the menu they are displayed by name (like shown on the photos) by default.

Then I can select "Nearest" at the bottom to sort by distance but if I press the PAGE-Button I come back to the list sorted by name.

 

The Software I use is version 3.50.

 

Default view:

coords4.jpg

 

When selecting "NEAREST":

coords5.jpg

Edited by sb1337
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...