Class Attitude

Inheritance Relationships

Base Type

Class Documentation

class Attitude : public lupnt::State

Public Functions

inline Attitude()

Construct an identity-attitude state: zero rotation (q = [1,0,0,0]) and zero angular velocity.

inline Attitude(int rows, int cols)

Construct a zero-initialized attitude state of the given shape; cols must be 1 (see State(int, int)).

inline Attitude(const State &x)

Reinterpret a generic State as an Attitude state, checking its size and type tag.

Parameters:

x – 7-element state of type Attitude::TYPE (quaternion + angular velocity).

inline Attitude(const Vec7 &qw)

Construct from a stacked 7-element [quaternion; angular velocity] vector.

Parameters:

qw – [q0, q1, q2, q3, wx, wy, wz] in [-, -, -, -, rad/s, rad/s, rad/s].

inline Attitude(const Vec4 &q, const Vec3 &w, Frame f)

Construct from a separate attitude quaternion and angular velocity.

Parameters:
  • qAttitude quaternion [-] (scalar-first: q0, q1, q2, q3).

  • w – Angular velocity [rad/s].

  • f – Reference frame the quaternion/angular velocity are expressed in.

inline Eigen::Ref<Vec4> q()

Mutable view of the attitude quaternion.

Returns:

Quaternion [-] (q0,q1,q2,q3).

inline Eigen::Ref<Vec3> w()

Mutable view of the angular velocity.

Returns:

Angular velocity [rad/s].

inline Vec4 q() const

Attitude quaternion.

Returns:

Quaternion [-] (q0,q1,q2,q3).

inline Vec3 w() const

Angular velocity.

Returns:

Angular velocity [rad/s].

Public Static Attributes

static StateType TYPE = "AttitudeState"