Mapper  0.9.0
API documentation
Functions
OpenOrienteering::SensorHelpers Namespace Reference

Functions

void matrixMultiplication (float *A, float *B, float *result)
 
void getOrientation (float *R, float *values)
 Ported from android.hardware.SensorManager.getOrientation(). More...
 
void getRotationMatrixFromOrientation (float *orientation, float *result)
 From http://www.thousand-thoughts.com/2012/03/android-sensor-fusion-tutorial/2/ Should be optimized ... More...
 
bool getRotationMatrix (float *R, float *gravity, float *geomagnetic)
 Ported from android.hardware.SensorManager.getRotationMatrix(). More...
 
void getRotationMatrixFromVector (float *R, float *rotationVector)
 Ported from android.hardware.SensorManager.getRotationMatrixFromVector(). More...
 

Function Documentation

◆ getOrientation()

void OpenOrienteering::SensorHelpers::getOrientation ( float *  R,
float *  values 
)

Ported from android.hardware.SensorManager.getOrientation().

Computes the device's orientation based on the rotation matrix.

When it returns, the array values is filled with the result:

  • values[0]: azimuth, rotation around the Z axis.
  • values[1]: pitch, rotation around the X axis.
  • values[2]: roll, rotation around the Y axis.

◆ getRotationMatrix()

bool OpenOrienteering::SensorHelpers::getRotationMatrix ( float *  R,
float *  gravity,
float *  geomagnetic 
)

Ported from android.hardware.SensorManager.getRotationMatrix().

Computes the inclination matrix I as well as the rotation matrix R transforming a vector from the device coordinate system to the world's coordinate system [...]

◆ getRotationMatrixFromOrientation()

void OpenOrienteering::SensorHelpers::getRotationMatrixFromOrientation ( float *  orientation,
float *  result 
)

◆ getRotationMatrixFromVector()

void OpenOrienteering::SensorHelpers::getRotationMatrixFromVector ( float *  R,
float *  rotationVector 
)

Ported from android.hardware.SensorManager.getRotationMatrixFromVector().

Helper function to convert a rotation vector to a rotation matrix.

◆ matrixMultiplication()

void OpenOrienteering::SensorHelpers::matrixMultiplication ( float *  A,
float *  B,
float *  result 
)