# VectorNav C++ Library: vn::math::AttitudeF Class Reference

vn::math::AttitudeF Class Reference

Representation of an orientation/attitude. More...

`#include <attitude.h>`

## Public Member Functions

vec3f | yprInDegs ()
| Returns the orientation as represented in yaw, pitch, roll in degrees. More...
vec3f | yprInRads ()
| Returns the orientation as represented in yaw, pitch, roll in radians. More...
vec4f | quat ()
| Returns the orientation as represented in quaternion. More...
mat3f | dcm ()
| Returns the orientation as represented by a direction cosine matrix. More...

## Static Public Member Functions

static AttitudeF | noRotation ()
| Returns an `AttitudeF` representing no rotation.
static AttitudeF | fromQuat (vec4f quat)
| Creates a new `AttitudeF` from a quaternion. More...
static AttitudeF | fromYprInDegs (vec3f yprInDegs)
| Creates a new `AttitudeF` from a yaw, pitch, roll in degrees. More...
static AttitudeF | fromYprInRads (vec3f yprInRads)
| Creates a new `AttitudeF` from a yaw, pitch, roll in radians. More...
static AttitudeF | fromDcm (mat3f dcm)
| Creates a new `AttitudeF` from a direction cosine matrix. More...

## Detailed Description

Representation of an orientation/attitude.

## Member Function Documentation

mat3f vn::math::AttitudeF::dcm | ( |  | ) |

Returns the orientation as represented by a direction cosine matrix.

Returns
  The orientation as a direction cosine matrix.

static AttitudeF vn::math::AttitudeF::fromDcm | ( | mat3f | dcm | ) |

static

Creates a new `AttitudeF` from a direction cosine matrix.

Parameters

  [in] | dcm | The direction cosine matrix.

Returns
  The new `AttitudeF`.

static AttitudeF vn::math::AttitudeF::fromQuat | ( | vec4f | quat | ) |

static

Creates a new `AttitudeF` from a quaternion.

Parameters

  [in] | quat | The orientation expressed as a quaternion.

Returns
  The new `AttitudeF`.

static AttitudeF vn::math::AttitudeF::fromYprInDegs | ( | vec3f | yprInDegs | ) |

static

Creates a new `AttitudeF` from a yaw, pitch, roll in degrees.

Parameters

  [in] | yprInDegs | The yaw, pitch, roll in degrees.

Returns
  The new `AttitudeF`.

static AttitudeF vn::math::AttitudeF::fromYprInRads | ( | vec3f | yprInRads | ) |

static

Creates a new `AttitudeF` from a yaw, pitch, roll in radians.

Parameters

  [in] | yprInRads | The yaw, pitch, roll in radians.

Returns
  The new `AttitudeF`.

vec4f vn::math::AttitudeF::quat | ( |  | ) |

Returns the orientation as represented in quaternion.

Returns
  The orientation in quaternion.

Examples:
  ez_async_data/main.cpp.

vec3f vn::math::AttitudeF::yprInDegs | ( |  | ) |

Returns the orientation as represented in yaw, pitch, roll in degrees.

Returns
  The orientation in yaw, pitch, roll in degrees.

vec3f vn::math::AttitudeF::yprInRads | ( |  | ) |

Returns the orientation as represented in yaw, pitch, roll in radians.

Returns
  The orientation in yaw, pitch, roll in radians.

The documentation for this class was generated from the following file:

- include/vn/attitude.h