# VectorNav C++ Library: include/vn/attitude.h Source File

attitude.h
#ifndef _VNMATH_ATTITUDE_H_
#define _VNMATH_ATTITUDE_H_
#include "vector.h"
#include "matrix.h"
#include "export.h"
namespace vn {
namespace math {
class vn_proglib_DLLEXPORT AttitudeF
{
private:
enum AttitudeType
{
ATT_YprRads,
ATT_YprDegs,
ATT_Quat,
ATT_Dcm
};
public:
static AttitudeF noRotation();
static AttitudeF fromQuat(vec4f quat);
static AttitudeF fromYprInDegs(vec3f yprInDegs);
static AttitudeF fromYprInRads(vec3f yprInRads);
static AttitudeF fromDcm(mat3f dcm);
// TEMP
AttitudeF() { }
private:
AttitudeF(AttitudeType type, void* attitude);
public:
vec3f yprInDegs();
vec3f yprInRads();
vec4f quat();
mat3f dcm();
private:
AttitudeType _underlyingType;
uint8_t _data[sizeof(mat3f)];
};
}
}
#endif
vn::math::vec
Template for a Euclidean vector.
Definition: vector.h:22
vn::math::mat
Template for a matrix.
Definition: matrix.h:20
matrix.h
vector.h
vn
Definition: attitude.h:8
vn::math::AttitudeF
Representation of an orientation/attitude.
Definition: attitude.h:12