An Attitude is an immutable object that represents the orientation of a 3D point.
More...
#include <attitude-utils.hpp>
An Attitude is an immutable object that represents the orientation of a 3D point.
Otherwise the attitude (orientation) of a spacecraft.
- Note
- This class wraps DCMs or Quaternions as the orientation
-
The Attitude object stores either a rotation matrix (direction cosine matrix) or a quaternion, and converts automatically to the other format when needed.
-
When porting to an embedded device, you'll probably want to get rid of this class and adapt to either quaternions or DCMs exclusively, depending on the natural output format of whatever attitude estimation algorithm you're using.
◆ AttitudeType
Represents what internal representation for attitude is being used.
Enumerator |
---|
NullType | No Internal representation.
|
QuaternionType | Quaternion Internal Representation.
|
DCMType | DCM Internal Representation.
|
◆ Attitude() [1/2]
found::Attitude::Attitude |
( |
const Quaternion & |
quat | ) |
|
|
inlineexplicit |
Constructs an Attitude object from Quaternion information.
- Parameters
-
quat | The quaternion to base the attitude off of
|
◆ Attitude() [2/2]
found::Attitude::Attitude |
( |
const Mat3 & |
matrix | ) |
|
|
inlineexplicit |
Constructs an Attitude object from a Direction Cosine Matrix (A matrix holding the direction cosines for an attitude)
- Parameters
-
matrix | The matrix holding the direction cosines |
◆ GetDCM()
Mat3 found::Attitude::GetDCM |
( |
| ) |
const |
Obtains the rotation matrix from this Attitude.
- Returns
- A matrix containing the direction cosines indicated by this
◆ GetQuaternion()
Quaternion found::Attitude::GetQuaternion |
( |
| ) |
const |
◆ Rotate()
Vec3 found::Attitude::Rotate |
( |
const Vec3 & |
vec | ) |
const |
Obtains a vector rotated to this Attitude from another vector (Convert a vector from the reference frame to the body frame.)
- Parameters
-
- Returns
- A new vector that is rotated from vec based on this
◆ ToSpherical()
Obtains the Euler Angles of this Attitude.
- Returns
- An EulerAngles object that holds the Euler Angles of this
The documentation for this class was generated from the following files: