LOST  0.0.1
LOST: Open-source Star Tracker
attitude-utils.hpp File Reference
#include <memory>
#include <vector>
#include "serialize-helpers.hpp"
#include "decimal.hpp"
Include dependency graph for attitude-utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lost::Vec2
 A two dimensional vector with decimaling point components. More...
 
class  lost::Vec3
 Three dimensional vector with decimaling point components. More...
 
class  lost::Mat3
 3x3 vector with decimaling point components More...
 
class  lost::EulerAngles
 A "human-readable" way to represent a 3d rotation or orientation. More...
 
class  lost::Quaternion
 A quaternion is a common way to represent a 3d rotation. More...
 
class  lost::Attitude
 The attitude (orientation) of a spacecraft. More...
 

Namespaces

 lost
 LOST starting point.
 

Functions

void lost::SerializeVec3 (SerializeContext *ser, const Vec3 &vec)
 Serialize a Vec3 to buffer. Takes up space according to SerializeLengthVec3. More...
 
Vec3 lost::DeserializeVec3 (DeserializeContext *des)
 
decimal lost::Distance (const Vec2 &, const Vec2 &)
 
decimal lost::Distance (const Vec3 &, const Vec3 &)
 
Mat3 lost::QuaternionToDCM (const Quaternion &quat)
 Convert a quaternion to a rotation matrix (Direction Cosine Matrix) More...
 
Quaternion lost::DCMToQuaternion (const Mat3 &dcm)
 Convert a rotation matrix (Direction Cosine Matrix) to a quaternion representing the same rotation. More...
 
Quaternion lost::SphericalToQuaternion (decimal ra, decimal dec, decimal roll)
 Return a quaternion that will reorient the coordinate axes so that the x-axis points at the given right ascension and declination, then roll the coordinate axes counterclockwise (i.e., the stars will appear to rotate clockwise). More...
 
Vec3 lost::SphericalToSpatial (decimal ra, decimal de)
 Convert from right ascension & declination to a 3d point on the unit sphere. More...
 
void lost::SpatialToSpherical (const Vec3 &vec, decimal *ra, decimal *de)
 Convert from a 3d point on the unit sphere to right ascension & declination. More...
 
decimal lost::Angle (const Vec3 &vec1, const Vec3 &vec2)
 Calculate the inner angle, in radians, between two vectors. More...
 
decimal lost::AngleUnit (const Vec3 &vec1, const Vec3 &vec2)
 Calculate the inner angle, in radians, between two /unit/ vectors. More...
 
decimal lost::RadToDeg (decimal rad)
 
decimal lost::DegToRad (decimal deg)
 
decimal lost::RadToArcSec (decimal rad)
 
decimal lost::ArcSecToRad (decimal arcSec)
 
decimal lost::DecimalModulo (decimal x, decimal mod)
 Given a decimal, find it "modulo" another decimal, in the true mathematical sense (not remainder). More...