naqsha-0.3.0.1: A library for working with anything map related.

Safe HaskellNone
LanguageHaskell2010

Naqsha.Geometry.Spherical

Contents

Description

Geometric operations on earth surface assuming that earth is a sphere of radius 6371008 m.

TODO: Port some calculations from http://www.movable-type.co.uk/scripts/latlong.html

Synopsis

Distance calculation.

distance Source #

Arguments

:: Geo 
-> Geo 
-> Double

Distance in meters.

This combinator computes the distance (in meters) between two geo-locations using the haversine distance between two points. For Position which have an

distance' Source #

Arguments

:: Double

Radius (in whatever unit)

-> Geo 
-> Geo 
-> Double 

A generalisation of distance that takes the radius as argument. Will work on Mars for example once we set up a latitude longitude system there. For this function units does not matter --- the computed distance is in the same unit as the input radius. We have

distance = distance' rMean

rMean :: Double Source #

Mean earth radius in meters. This is the radius used in the haversine formula of dHvs.