Difference between revisions of "The Algorithm"

From Geohashing
imported>Tjtrumpet2323
m
imported>Sentodude
(Added link for online md5 generator)
Line 12: Line 12:
 
* Each half of the "hash" is prepended with a decimal point (so as to represent a hexadecimal fraction) and is converted to a base-10 fraction.
 
* Each half of the "hash" is prepended with a decimal point (so as to represent a hexadecimal fraction) and is converted to a base-10 fraction.
 
* The resulting decimal fractions are appended to the integral (lat,lon) values of any given [[graticule]] to produce that graticule's geohash target for the day.
 
* The resulting decimal fractions are appended to the integral (lat,lon) values of any given [[graticule]] to produce that graticule's geohash target for the day.
 +
 +
== Online md5 generator ==
 +
* [http://www.iwebtool.com/md5 iWebTool.com]
  
 
== Fractional hexadecimal to decimal calculation ==
 
== Fractional hexadecimal to decimal calculation ==
 
Many online hex-to-dec converters do not support hexadecimal fractions.  Here is one that does:
 
Many online hex-to-dec converters do not support hexadecimal fractions.  Here is one that does:
 
* [http://www.easysurf.cc/cnver17.htm#bf16tobf10 EasySurf.cc]
 
* [http://www.easysurf.cc/cnver17.htm#bf16tobf10 EasySurf.cc]

Revision as of 14:18, 7 June 2008

Template:30w

The Algorithm

This time, we did invent the algorithm!

  • Strings of the current date (in yyyy-mm-dd format) and the daily opening price of the Dow Jones Industrial Average (as quoted at finance.google.com) are concatenated, with a hyphen separating the two.
    • West of -30° longitude: If there is no opening price for the Dow on the desired day, the opening price from its previous day of active trading is used instead.
    • East of -30° longitude: Same as west, except the Dow's opening price for the previous day is used, even if a new one becomes available later in the day in your time zone. That is, Thursday uses Wednesday's open, Friday uses Thursday's open, and Saturday through Monday all use Friday's open. (see 30W Time Zone Rule)
  • The resulting string is then fed through the well-documented MD5 cryptographic algorithm to generate as pseudo-random (yet easily verifiable) "hash" of 32 hexadecimal digits.
  • The "hash" is then split into two halves of 16 hexadecimal digits each.
  • Each half of the "hash" is prepended with a decimal point (so as to represent a hexadecimal fraction) and is converted to a base-10 fraction.
  • The resulting decimal fractions are appended to the integral (lat,lon) values of any given graticule to produce that graticule's geohash target for the day.

Online md5 generator

Fractional hexadecimal to decimal calculation

Many online hex-to-dec converters do not support hexadecimal fractions. Here is one that does: