Difference between revisions of "Geonad"

From Geohashing
(Typo fix)
Line 6: Line 6:
 
Measure defined as the distance between a driver's outstretched fingertips and the ticket machine in an automatic car-park.<br/>
 
Measure defined as the distance between a driver's outstretched fingertips and the ticket machine in an automatic car-park.<br/>
 
1 nad = 18.4 cm<br/>
 
1 nad = 18.4 cm<br/>
--Definition of "Nad" in Douglas Adams` ''The Deeper Meaning of Liff''
+
--Definition of "Nad" in Douglas Adams` ''The Deeper Meaning of Life''
  
 
=== "manual" Geonad determination ===
 
=== "manual" Geonad determination ===

Revision as of 21:11, 6 August 2008

No matter how close you've come, you will never get exactly there.
Variation of Murphy's Law

The Geonad is the distance between a hasher and the geohash at the point of time the geohasher finds that (s)he is close enough. If you can determine the Geonad using a measuring tape, you are very lucky. Other people can probably use a map or ask their portable GPS devices, if it has that feature.

Definition of Nad

Nad (n.)
Measure defined as the distance between a driver's outstretched fingertips and the ticket machine in an automatic car-park.
1 nad = 18.4 cm
--Definition of "Nad" in Douglas Adams` The Deeper Meaning of Life

"manual" Geonad determination

Where are we?
We are about here...
And where is the hash?
These are the coordinates...
So how far is it from here to the hash?
It's... Hmm. Interesting. Maybe if you start with... No. Wait. Hmm... You could...
--Felix and Hermann on the way to a geohash.

Hermann then wrote this tool running on his smartphone with PythonCE:

'''Note: The earth IS a sphere.'''
import math
'''Get locations'''
input = raw_input("please enter lat lon lat lon: ")
try:
 input = input.split(" ")
 tlat = math.radians(float(input[0]))
 tlon = math.radians(float(input[1]))
 alat = math.radians(float(input[2]))
 alon = math.radians(float(input[3]))
except:
 print "invalid input"
 exit(1)
'''convert geographic coordinates into vectors'''
tx = math.cos(tlat)*math.cos(tlon)
ty = math.cos(tlat)*math.sin(tlon)
tz = math.sin(tlat)
ax = math.cos(alat)*math.cos(alon)
ay = math.cos(alat)*math.sin(alon)
az = math.sin(alat)
'''determine angle between vectors'''
nada = math.acos(tx*ax+ty*ay+tz*az)
'''print distance on surface*'''
raw_input("%f km" % (6378.1*nada))