-
Notifications
You must be signed in to change notification settings - Fork 0
/
attitude.h
25 lines (19 loc) · 765 Bytes
/
attitude.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include "sophus/so3.hpp"
#include <iostream>
/// \brief Attitude represented as a raw set of Euler angles.
struct Attitude
{
double x_rot; /// Angle around x-axis in radians.
double y_rot; /// Angle around y-axis in radians.
double z_rot; /// Angle around z-axis in radians.
/// \brief Convert to quaternion representation.
Eigen::Quaterniond toQuaternion() const;
/// \brief Convert to SO3 representation.
Sophus::SO3d toSO3() const;
};
/// \brief Operator for reading data from stream.
std::istream& operator>>(std::istream& is, Attitude& att);
/// \brief Operator for printing data to stream.
/// Meant for showing data, and is not compatible with the reader.
std::ostream& operator<<(std::ostream& os, const Attitude& att);