Package elisa :: Package extern :: Package metar :: Module Datatypes :: Class position
[hide private]
[frames] | no frames]

Class position

source code


A class representing a location on the earth's surface.

Instance Methods [hide private]
 
__init__(self, latitude='frontend', longitude='frontend')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
getdistance(self, position2)
Calculate the great-circle distance to another location using the Haversine formula.
source code
 
getdirection(self, position2)
Calculate the initial direction to another location.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, latitude='frontend', longitude='frontend')
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

getdistance(self, position2)

source code 
Calculate the great-circle distance to another location using the Haversine formula. See <http://www.movable-type.co.uk/scripts/LatLong.html> and <http://mathforum.org/library/drmath/sets/select/dm_lat_long.html>

getdirection(self, position2)

source code 
Calculate the initial direction to another location. (The direction typically changes as you trace the great circle path to that location.) See <http://www.movable-type.co.uk/scripts/LatLong.html>.