jord-2.0.0.0: Geographical Position Calculations

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

Data.Geo.Jord.Geocentric

Description

Geocentric coordinates of points (X, Y, and Z Cartesian coordinates) in specified models.

For the Earth the coordinate system is known as ECEF (acronym for earth-centered, earth-fixed), or ECR (initialism for earth-centered rotational).

In order to use this module you should start with the following imports:

import qualified Data.Geo.Jord.Geocentric as Geocentric
import qualified Data.Geo.Jord.Length as Length
import Data.Geo.Jord.Models

see Data.Geo.Jord.Models for supported models.

Synopsis

Documentation

data Position a Source #

Geocentric coordinates (cartesian X, Y, Z) of a position in a specified Model.

gx-gy plane is the equatorial plane, gx is on the prime meridian, and gz on the polar axis.

On a spherical celestial body, an n-vector is equivalent to a normalised version of a geocentric cartesian coordinate.

Constructors

Position 

Fields

Instances
Eq a => Eq (Position a) Source # 
Instance details

Defined in Data.Geo.Jord.Geocentric

Methods

(==) :: Position a -> Position a -> Bool #

(/=) :: Position a -> Position a -> Bool #

Show a => Show (Position a) Source # 
Instance details

Defined in Data.Geo.Jord.Geocentric

Methods

showsPrec :: Int -> Position a -> ShowS #

show :: Position a -> String #

showList :: [Position a] -> ShowS #

coords :: Model a => Position a -> (Length -> Double) -> V3 Source #

coords p f returns the 3d vector representing the (X, Y, Z) coordinates in the unit of f. For example:

>>> Geocentric.coords (Geocentric.metresPos 3194669.145061 3194669.145061 4487701.962256 WGS84) Length.toKilometres
V3 {vx = 3194.669145061, vy = 3194.669145061, vz = 4487.701962256}

metresCoords :: Model a => Position a -> V3 Source #

3d vector representing the (X, Y, Z) coordinates in metres of the given position.

metresPos :: Model a => Double -> Double -> Double -> a -> Position a Source #

Geocentric position from given (X, Y, Z) in metres an given Model.

metresPos' :: Model a => V3 -> a -> Position a Source #

Geocentric position from given 3d vector (X, Y, Z) in metres an given Model.

antipode :: Model a => Position a -> Position a Source #

antipode p computes the antipodal position of p: the position which is diametrically opposite to p.

northPole :: Model a => a -> Position a Source #

Surface position of the North Pole in the given model.

southPole :: Model a => a -> Position a Source #

Surface position of the South Pole in the given model.