jord-0.4.0.0: Geographical Position Calculations

Copyright(c) 2018 Cedric Liegeois
LicenseBSD3
MaintainerCedric Liegeois <ofmooseandmen@yahoo.fr>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Geo.Jord.LatLong

Contents

Description

Geodetic latitude and longitude.

Synopsis

The LatLong type

data LatLong Source #

Horizontal position defined by its geodetic latitude and longitude.

Instances
Eq LatLong Source # 
Instance details

Defined in Data.Geo.Jord.LatLong

Methods

(==) :: LatLong -> LatLong -> Bool #

(/=) :: LatLong -> LatLong -> Bool #

Read LatLong Source #

See readLatLong.

Instance details

Defined in Data.Geo.Jord.LatLong

Show LatLong Source # 
Instance details

Defined in Data.Geo.Jord.LatLong

ETransform LatLong Source #

LatLong - EcefPosition.

Instance details

Defined in Data.Geo.Jord.Transformation

NTransform LatLong Source #

LatLong - AngularPosition of NVector.

Instance details

Defined in Data.Geo.Jord.Transformation

ETransform (AngularPosition LatLong) Source #

AngularPosition of LatLong - EcefPosition.

Instance details

Defined in Data.Geo.Jord.Transformation

NTransform (AngularPosition LatLong) Source #

AngularPosition of LatLong - AngularPosition of NVector.

Instance details

Defined in Data.Geo.Jord.Transformation

Smart constructors

latLong :: Angle -> Angle -> LatLong Source #

LatLong from given latitude and longitude. errors if given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

latLongE :: Angle -> Angle -> Either String LatLong Source #

LatLong from given latitude and longitude. A Left indicates that the given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

latLongF :: MonadFail m => Angle -> Angle -> m LatLong Source #

LatLong from given latitude and longitude. fails if given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

decimalLatLong :: Double -> Double -> LatLong Source #

LatLong from given latitude and longitude in decimal degrees. errors if given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

decimalLatLongE :: Double -> Double -> Either String LatLong Source #

LatLong from given latitude and longitude in decimal degrees. A Left indicates that the given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

decimalLatLongF :: MonadFail m => Double -> Double -> m LatLong Source #

LatLong from given latitude and longitude in decimal degrees. fails if given latitude is outisde [-90..90]° and/or given longitude is outisde [-180..180]°.

read

readLatLong :: String -> LatLong Source #

Obtains a LatLong from the given string formatted as either:

  • DD(MM)(SS)[N|S]DDD(MM)(SS)[E|W] - e.g. 553621N0130002E or 0116S03649E or 47N122W
  • Angle[N|S] Angle[E|W] - e.g. 55°36'21''N 13°0'02''E or 11°16'S 36°49'E or 47°N 122°W

This simply calls read s :: GeoPos so error should be handled at the call site.

readLatLongF :: MonadFail m => String -> m LatLong Source #

Same as readLatLong but returns a MonadFail.

Misc.

toDecimalDegrees' :: LatLong -> (Double, Double) Source #

Converts the given LatLong to tuple of latitude and longitude in decimal degrees.