Rotations

TrajectoryOptimization.UnitQuaternionType
struct UnitQuaternion{T, D<:TrajectoryOptimization.DifferentialRotation} <: Rotation

4-parameter attitute representation that is singularity-free. Quaternions with unit norm represent a double-cover of SO(3). The UnitQuaternion does NOT strictly enforce the unit norm constraint, but certain methods will assume you have a unit quaternion. The UnitQuaternion type is parameterized by the linearization method, which maps quaternions to the 3D plane tangent to the 4D unit sphere. Follows the Hamilton convention for quaternions.

There are currently 4 methods supported:

  • VectorPart - uses the vector (or imaginary) part of the quaternion
  • ExponentialMap - the most common approach, uses the exponential and logarithmic maps
  • CayleyMap - or Rodrigues parameters (aka Gibbs vectors).
  • MRPMap - or Modified Rodrigues Parameter, is a sterographic projection of the 4D unit sphere

onto the plane tangent to either the positive or negative real poles.

Constructors

UnitQuaternion(s,x,y,z)  # defaults to `VectorPart`
UnitQuaternion{D}(s,x,y,z)
UnitQuaternion{D}(q::SVector{4})
UnitQuaternion{D}(r::SVector{3})  # quaternion with 0 real part
source
TrajectoryOptimization.MRPType
struct MRP{T} <: Rotation

Modified Rodrigues Parameter. Is a 3D parameterization of attitude, and is a sterographic projection of the 4D unit sphere onto the plane tangent to the negative real pole. They have a singularity at θ = ±180°.

Constructors

MRP(x, y, z) MRP(r::SVector{3})

source