spatial-math-0.1.7: 3d math including quaternions/euler angles/dcms and utility functions

SpatialMath

Synopsis

# Documentation

module Xyz

module Quat

data Xyz a Source

Constructors

 Xyz a a a

Instances

 Functor Xyz Typeable1 Xyz Eq a => Eq (Xyz a) (Fractional (Xyz a), Floating a) => Floating (Xyz a) (Num (Xyz a), Fractional a) => Fractional (Xyz a) (Typeable (Xyz a), Data a) => Data (Xyz a) Num a => Num (Xyz a) Show a => Show (Xyz a) Random a => Random (Xyz a)

data Quat a Source

Constructors

 Quat a a a a

Instances

 Functor Quat Typeable1 Quat Eq a => Eq (Quat a) (Typeable (Quat a), Data a) => Data (Quat a) (Num a, Ord a) => Num (Quat a) Show a => Show (Quat a)

data Euler a Source

Constructors

 Euler a a a

Instances

 Functor Euler Typeable1 Euler Eq a => Eq (Euler a) (Typeable (Euler a), Data a) => Data (Euler a) Show a => Show (Euler a)

dcmOfQuat :: (Num a, Element a) => Quat a -> Matrix aSource

rotVecByDcm :: (Num a, Storable a) => Matrix a -> Xyz a -> Xyz aSource

vec_b = R_a2b * vec_a

rotVecByDcmB2A :: (Num a, Storable a) => Matrix a -> Xyz a -> Xyz aSource

vec_a = R_a2b^T * vec_b

rotVecByQuat :: (Num a, Element a) => Quat a -> Xyz a -> Xyz aSource

vec_b = q_a2b * vec_a * q_a2b^(-1) vec_b = R(q_a2b) * vec_a

rotVecByQuatB2A :: (Num a, Element a) => Quat a -> Xyz a -> Xyz aSource

rotVecByEuler :: (Floating a, Element a, Ord a) => Euler a -> Xyz a -> Xyz aSource

rotVecByEulerB2A :: (Floating a, Element a, Ord a) => Euler a -> Xyz a -> Xyz aSource