Copyright | (c) 2020 Cedric Liegeois |
---|---|
License | BSD3 |
Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
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
- data Position a = Position {}
- coords :: Model a => Position a -> (Length -> Double) -> V3
- metresCoords :: Model a => Position a -> V3
- metresPos :: Model a => Double -> Double -> Double -> a -> Position a
- metresPos' :: Model a => V3 -> a -> Position a
- antipode :: Model a => Position a -> Position a
- northPole :: Model a => a -> Position a
- southPole :: Model a => a -> Position a
Documentation
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.
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
.