My Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
found::Attitude Class Reference

#include <attitude-utils.hpp>

Public Member Functions

 Attitude (const Quaternion &)
 
 Attitude (const Mat3 &dcm)
 
Quaternion GetQuaternion () const
 
Mat3 GetDCM () const
 
EulerAngles ToSpherical () const
 
Vec3 Rotate (const Vec3 &) const
 

Detailed Description

An Attitude is an immutable object that represents the orientation of a 3D point.

The attitude (orientation) of a spacecraft. The Attitude object stores either a rotation matrix (direction cosine matrix) or a quaternion, and converts automatically to the other format when needed.

Note
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.

Constructor & Destructor Documentation

◆ Attitude() [1/2]

found::Attitude::Attitude ( const Quaternion quat)
explicit

Constructs an Attitude object from Quaternion information

Parameters
quatThe quaternion to base the attitude off of

◆ Attitude() [2/2]

found::Attitude::Attitude ( const Mat3 matrix)
explicit

Constructs an Attitude object from a Direction Cosine Matrix (A matrix holding the direction cosines for an attitude)

Parameters
matrixThe matrix holding the direction cosines

Member Function Documentation

◆ 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

Provides the Quaternion corresponding to this Attitude

Returns
A Quaternion that holds the attitude information of this

◆ 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
vecThe vector to rotate
Returns
A new vector that is rotated from vec based on this

◆ ToSpherical()

EulerAngles found::Attitude::ToSpherical ( ) const

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: