LOST
0.0.1
LOST: Open-source Star Tracker
|
The attitude (orientation) of a spacecraft. More...
#include <attitude-utils.hpp>
Public Member Functions | |
Attitude ()=default | |
constructs unknown attitude: More... | |
Attitude (const Quaternion &) | |
Attitude (const Mat3 &dcm) | |
Quaternion | GetQuaternion () const |
Get the quaternion representing the attitude, converting from whatever format is stored. More... | |
Mat3 | GetDCM () const |
Get the rotation matrix (direction cosine matrix) representing the attitude, converting from whatever format is stored. More... | |
EulerAngles | ToSpherical () const |
Get the euler angles from the attitude, converting from whatever format is stored. More... | |
Vec3 | Rotate (const Vec3 &) const |
Convert a vector from the reference frame to the body frame. More... | |
bool | IsKnown () const |
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. Importantly, an attitude may also be "unknown", representing for example if there weren't enough stars to determine an attitude. When set to unknown, it is illegal to try and convert it to anything, so check IsKnown first!
Definition at line 138 of file attitude-utils.hpp.
|
default |
constructs unknown attitude:
|
explicit |
Definition at line 348 of file attitude-utils.cpp.
|
explicit |
Definition at line 351 of file attitude-utils.cpp.
Mat3 lost::Attitude::GetDCM | ( | ) | const |
Get the rotation matrix (direction cosine matrix) representing the attitude, converting from whatever format is stored.
Definition at line 408 of file attitude-utils.cpp.
Quaternion lost::Attitude::GetQuaternion | ( | ) | const |
Get the quaternion representing the attitude, converting from whatever format is stored.
Definition at line 396 of file attitude-utils.cpp.
bool lost::Attitude::IsKnown | ( | ) | const |
Definition at line 443 of file attitude-utils.cpp.
Convert a vector from the reference frame to the body frame.
Definition at line 420 of file attitude-utils.cpp.
EulerAngles lost::Attitude::ToSpherical | ( | ) | const |
Get the euler angles from the attitude, converting from whatever format is stored.
Definition at line 432 of file attitude-utils.cpp.