Copyright | (c) 2020 Cedric Liegeois |
---|---|
License | BSD3 |
Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Coordinates transformation parameters.
Synopsis
- data Tx a = Tx {}
- inverse :: Params a => Tx a -> Tx a
- class Params a where
- idParams :: a
- inverseParams :: a -> a
- data Params7
- data Rates
- data Params15 = Params15 Epoch Params7 Rates
- params7 :: (Double, Double, Double) -> Double -> (Double, Double, Double) -> Params7
- rates :: (Double, Double, Double) -> Double -> (Double, Double, Double) -> Rates
- paramsAt :: Epoch -> Params15 -> Params7
- data Graph a
- graph :: Params a => [Tx a] -> Graph a
- paramsBetween :: Params a => ModelId -> ModelId -> Graph a -> [a]
- apply :: V3 -> Params7 -> V3
transformation parameters.
Coordinate transformation between 2 models (A & B).
class for transformation parameters.
:: a | identity transformation parameters, i.e. |
:: a | |
-> a | inverse transformation parameters. |
7-parameter transformation (Helmert); use params7
to construct.
Transformation rates for the 15-parameter transformation (Helmert); use rates
to construct.
Epoch and 14-parameter transformation (Helmert).
:: (Double, Double, Double) | translation vector containing the three translations along the coordinate axes: tx, ty, tz in millimetres |
-> Double | scale factor (unitless) expressed in parts per billion |
-> (Double, Double, Double) | rotation matrix (orthogonal) consisting of the three axes rx, ry, rz in milliarcseconds |
-> Params7 |
7-parameter transformation (Helmert) from given translation vector, scale factor and rotation matrix.
:: (Double, Double, Double) | translation rate in millimetres per year. |
-> Double | scale factor rate in part per billion per year. |
-> (Double, Double, Double) | rotation rate in milliarcseconds per year. |
-> Rates |
rates of the 15-parameter translation (Helmert) from given translation rates, scale factor rate and rotation rates.
paramsAt :: Epoch -> Params15 -> Params7 Source #
paramsAt e tx15
returns the 7-parameter transformation corresponding to the
15-parameter transformation tx15
at epoch e
.
transformation graph.
Transformation graph: vertices are ModelId
and edges are transformation parameters.
graph :: Params a => [Tx a] -> Graph a Source #
graph ts
returns a transformation graph containing all given direct and inverse
(i.e. for each Tx
: params
& inverseParams
) transformations.
paramsBetween :: Params a => ModelId -> ModelId -> Graph a -> [a] Source #
paramsBetween m0 m1 g
computes the ordered list of transformation parameters to be
successively applied when transforming the coordinates of a position in model m0
to model m1
.
The returned list is empty, if either model is not in the graph (i.e. not a vertex) or if no
such transformation exists (i.e. model m1
cannot be reached from model m0
).