Functions | Variables
helper Namespace Reference

Functions

void angle2quaternion (const double &roll, const double &pitch, const double &yaw, double *w, double *x, double *y, double *z)
 converts AscTec's attitude angles to a quaternion
template<typename T >
double asctecAccToSI (const T &val)
 converts AscTec acceleration values to m/s^2
template<typename T >
double asctecAttitudeToSI (const T &val)
 converts AscTec acceleration values to rad
template<typename T >
double asctecOmegaToSI (const T &val)
 converts AscTec turn rates to rad/s
template<typename T >
T clamp (const T &min, const T &max, const T &val)
 checks if val exceeds [min ... max] and returns a clamped value if necessary
template<typename T >
T clamp (const T &min, const T &max, const T &val, bool *clamped)
 checks if val exceeds [min ... max] and returns a clamped value if necessary.
double debug2Double (const int16_t &param)
 converts a debug value fixpoint (fp) representation needed by the SSDK running datafusion and position control to double (d)
double param2Double (const uint32_t &param)
 converts a parameter from fixpoint (fp) representation needed by the SSDK running datafusion and position control to double (d)
uint32_t param2Fixpoint (const double &param)
 converts a parameter from double (d) to fixpoint (fp) representation needed by the SSDK running datafusion and position control
uint16_t rateToPeriod (const double &rate)
 converts a rate in Hz to an integer period in ms.
template<typename T >
void setDiagonalCovariance (T &covariance_matrix, const double &covariance)
int yaw2asctec (const double &yaw)
 converts the yaw angle and range. AscTec uses 0...360° * 1000, we -pi...+pi

Variables

const double ASCTEC_ACC_TO_SI = 9.81e-3
 conversion from AscTec acceleration values to m/s^2
const double ASCTEC_ATTITUDE_TO_SI = 0.01 * M_PI / 180.0
 conversion from AscTec attitude angles to rad
const double ASCTEC_OMEGA_TO_SI = 0.015 * M_PI / 180.0
 conversion from AscTec turn rates to rad/s

Function Documentation

void helper::angle2quaternion ( const double &  roll,
const double &  pitch,
const double &  yaw,
double *  w,
double *  x,
double *  y,
double *  z 
) [inline]

converts AscTec's attitude angles to a quaternion

Definition at line 174 of file helper.h.

template<typename T >
double helper::asctecAccToSI ( const T val) [inline]

converts AscTec acceleration values to m/s^2

Definition at line 52 of file helper.h.

template<typename T >
double helper::asctecAttitudeToSI ( const T val) [inline]

converts AscTec acceleration values to rad

Definition at line 66 of file helper.h.

template<typename T >
double helper::asctecOmegaToSI ( const T val) [inline]

converts AscTec turn rates to rad/s

Definition at line 59 of file helper.h.

template<typename T >
T helper::clamp ( const T min,
const T max,
const T val 
) [inline]

checks if val exceeds [min ... max] and returns a clamped value if necessary

Definition at line 82 of file helper.h.

template<typename T >
T helper::clamp ( const T min,
const T max,
const T val,
bool *  clamped 
) [inline]

checks if val exceeds [min ... max] and returns a clamped value if necessary.

Definition at line 94 of file helper.h.

double helper::debug2Double ( const int16_t &  param) [inline]

converts a debug value fixpoint (fp) representation needed by the SSDK running datafusion and position control to double (d)

$ d = p/2^{15} $

Definition at line 136 of file helper.h.

double helper::param2Double ( const uint32_t &  param) [inline]

converts a parameter from fixpoint (fp) representation needed by the SSDK running datafusion and position control to double (d)

$ d = (p - 2^{31})/2^{15} $

Definition at line 127 of file helper.h.

uint32_t helper::param2Fixpoint ( const double &  param) [inline]

converts a parameter from double (d) to fixpoint (fp) representation needed by the SSDK running datafusion and position control

$ fp = d* 2^{15} + 2^{31} $; min 0, max $2^{32}$

Definition at line 117 of file helper.h.

uint16_t helper::rateToPeriod ( const double &  rate) [inline]

converts a rate in Hz to an integer period in ms.

Definition at line 72 of file helper.h.

template<typename T >
void helper::setDiagonalCovariance ( T covariance_matrix,
const double &  covariance 
) [inline]

Definition at line 197 of file helper.h.

int helper::yaw2asctec ( const double &  yaw) [inline]

converts the yaw angle and range. AscTec uses 0...360° * 1000, we -pi...+pi

Definition at line 143 of file helper.h.


Variable Documentation

const double helper::ASCTEC_ACC_TO_SI = 9.81e-3

conversion from AscTec acceleration values to m/s^2

Definition at line 42 of file helper.h.

const double helper::ASCTEC_ATTITUDE_TO_SI = 0.01 * M_PI / 180.0

conversion from AscTec attitude angles to rad

Definition at line 48 of file helper.h.

const double helper::ASCTEC_OMEGA_TO_SI = 0.015 * M_PI / 180.0

conversion from AscTec turn rates to rad/s

Definition at line 45 of file helper.h.



asctec_hl_interface
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Thu Jun 6 2019 20:57:17