naqsha-0.1.0.0: A library for working with geospatial data types.

Naqsha.Geometry.Spherical

Contents

Description

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

Synopsis

# Distance calculation.

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

Arguments

 :: Double Radius (in whatever unit) -> Geo -> Geo -> Double

A generalisation of dHvS 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

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