|
| Linear< 3 > | difference () const |
|
template<typename Derived> |
| void | normalize (Eigen::MatrixBase< Derived > const &block) const |
| | Scales each column of block, a value (x, y, z, w) per column, to unit norm with \( w \ge 0 \), writing through the const reference as writable() does.
|
|
template<typename X, typename D, typename Out> |
| void | plus (Eigen::MatrixBase< X > const &x, Eigen::MatrixBase< D > const &d, Eigen::MatrixBase< Out > const &out) const |
| | Writes \( x \boxplus d = x \otimes \mathrm{Exp}(d) \) through out, column by column, normalized.
|
|
template<typename A, typename B, typename Out> |
| void | minus (Eigen::MatrixBase< A > const &a, Eigen::MatrixBase< B > const &b, Eigen::MatrixBase< Out > const &out) const |
| | Writes \( a \boxminus b = \mathrm{Log}(b^{-1} \otimes a) \) through out, column by column.
|
| template<typename X, typename D, typename Out> |
| void | resetJacobian (Eigen::MatrixBase< X > const &, Eigen::MatrixBase< D > const &d, Eigen::MatrixBase< Out > const &out) const |
| | Writes the reset Jacobian at the step d through out: rightJacobian() of d, whatever the value.
|
|
| static constexpr Eigen::Index | valueDimension () |
| template<typename Derived> |
| static Eigen::Quaternion< typename Derived::Scalar > | exponential (Eigen::MatrixBase< Derived > const &d) |
| template<typename Derived> |
| static Eigen::Matrix< typename Derived::Scalar, 3, 1 > | logarithm (Eigen::QuaternionBase< Derived > const &q) |
| template<typename Derived> |
| static Eigen::Matrix< typename Derived::Scalar, 3, 3 > | rightJacobian (Eigen::MatrixBase< Derived > const &d) |
| template<typename Scalar = double> |
| static Eigen::Matrix< Scalar, 4, 1 > | identity () |
| template<typename Derived> |
| static Eigen::Matrix< typename Derived::Scalar, 4, 1 > | coefficientsOf (Eigen::QuaternionBase< Derived > const &q) |
| template<typename Block> |
| static auto | map (Block &&block) |
An attitude: a unit quaternion of four coordinates whose differences are three-coordinate rotation vectors in the body frame.
Values are stored as (x, y, z, w), the order of Eigen::Quaternion::coeffs(), so a state's attitude block is exactly what an Eigen::Quaternion stores and map() views it as one; the product is Eigen's, Hamilton's. normalize() scales a value to unit norm with \( w \ge 0 \), choosing one of the two quaternions of each rotation. Differences are rotation vectors in Linear<3>, applied on the right, in the body frame:
\[ q \boxplus \delta = q \otimes \mathrm{Exp}(\delta), \qquad
q \boxminus p = \mathrm{Log}(p^{-1} \otimes q), \]
the right \( \oplus \) and \( \ominus \) of Solà, Deray, and Atchuthan (2018) on SO(3), the group's \( \boxplus \) and \( \boxminus \) in the sense of Hertzberg, Wagner, Frese, and Schröder (2013). The logarithm takes the short way round, so a difference has norm at most \( \pi \). The reset Jacobian is the right Jacobian of SO(3) in closed form (rightJacobian()), so a covariance is carried to a moved mean without automatic differentiation (decisions.md [covariance-reset]).
Name the block with a tag, struct Attitude : UnitQuaternion {};, and view it in model code with UnitQuaternion::map(block<Attitude>(space, x)). Use Repeated for several.