PX4 Firmware
PX4 Autopilot Software http://px4.io
rotation.cpp File Reference

Vector rotation library. More...

#include <px4_platform_common/defines.h>
#include "math.h"
#include "rotation.h"
Include dependency graph for rotation.cpp:

Go to the source code of this file.

Functions

__EXPORT matrix::Dcmf get_rot_matrix (enum Rotation rot)
 Get the rotation matrix. More...
 
__EXPORT matrix::Quatf get_rot_quaternion (enum Rotation rot)
 Get the rotation quaternion. More...
 
__EXPORT void rotate_3f (enum Rotation rot, float &x, float &y, float &z)
 rotate a 3 element float vector in-place More...
 

Detailed Description

Vector rotation library.

Definition in file rotation.cpp.

Function Documentation

◆ get_rot_matrix()

__EXPORT matrix::Dcmf get_rot_matrix ( enum Rotation  rot)

Get the rotation matrix.

Definition at line 45 of file rotation.cpp.

References math::radians(), and rot_lookup.

Referenced by DfAK8963Wrapper::DfAK8963Wrapper(), DfHmc5883Wrapper::DfHmc5883Wrapper(), DfLsm9ds1Wrapper::DfLsm9ds1Wrapper(), DfMPU6050Wrapper::DfMPU6050Wrapper(), do_accel_calibration(), VehicleAcceleration::ParametersUpdate(), VehicleAngularVelocity::ParametersUpdate(), sensors::VotedSensorsUpdate::parametersUpdate(), and read_accelerometer_avg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_rot_quaternion()

__EXPORT matrix::Quatf get_rot_quaternion ( enum Rotation  rot)

Get the rotation quaternion.

Definition at line 54 of file rotation.cpp.

References math::radians(), and rot_lookup.

Referenced by MavlinkStreamAttitudeQuaternion::send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate_3f()

__EXPORT void rotate_3f ( enum Rotation  rot,
float &  x,
float &  y,
float &  z 
)