WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
IMU Functions

Functions

void HAL_GetIMUAcceleration (HAL_Acceleration3d *accel, int32_t *status)
 Get the acceleration along the axes of the IMU in meters per second squared.
 
void HAL_GetIMUGyroRates (HAL_GyroRate3d *rates, int32_t *status)
 Get the angular rate about the axes of the IMU in radians per second.
 
void HAL_GetIMUEulerAnglesFlat (HAL_EulerAngles3d *angles, int32_t *status)
 Get the angle, in radians, about the axes of the IMU in the "flat" orientation.
 
void HAL_GetIMUEulerAnglesLandscape (HAL_EulerAngles3d *angles, int32_t *status)
 Get the angle, in radians, about the axes of the IMU in the "landscape" orientation.
 
void HAL_GetIMUEulerAnglesPortrait (HAL_EulerAngles3d *angles, int32_t *status)
 Get the angle, in radians, about the axes of the IMU in the "portrait" orientation.
 
void HAL_GetIMUQuaternion (HAL_Quaternion *quat, int32_t *status)
 Get the orientation of the IMU as a quaternion.
 
double HAL_GetIMUYawFlat (int64_t *timestamp)
 Get the yaw value, in radians, of the IMU in the "flat" orientation.
 
double HAL_GetIMUYawLandscape (int64_t *timestamp)
 Get the yaw value, in radians, of the IMU in the "landscape" orientation.
 
double HAL_GetIMUYawPortrait (int64_t *timestamp)
 Get the yaw value, in radians, of the IMU in the "portrait" orientation.
 

Detailed Description

Function Documentation

◆ HAL_GetIMUAcceleration()

void HAL_GetIMUAcceleration ( HAL_Acceleration3d * accel,
int32_t * status )

Get the acceleration along the axes of the IMU in meters per second squared.

Parameters
[out]accelthe acceleration data
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUEulerAnglesFlat()

void HAL_GetIMUEulerAnglesFlat ( HAL_EulerAngles3d * angles,
int32_t * status )

Get the angle, in radians, about the axes of the IMU in the "flat" orientation.

Parameters
[out]anglesthe angle data
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUEulerAnglesLandscape()

void HAL_GetIMUEulerAnglesLandscape ( HAL_EulerAngles3d * angles,
int32_t * status )

Get the angle, in radians, about the axes of the IMU in the "landscape" orientation.

Parameters
[out]anglesthe angle data
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUEulerAnglesPortrait()

void HAL_GetIMUEulerAnglesPortrait ( HAL_EulerAngles3d * angles,
int32_t * status )

Get the angle, in radians, about the axes of the IMU in the "portrait" orientation.

Parameters
[out]anglesthe angle data
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUGyroRates()

void HAL_GetIMUGyroRates ( HAL_GyroRate3d * rates,
int32_t * status )

Get the angular rate about the axes of the IMU in radians per second.

Parameters
[out]ratesthe angular rate data
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUQuaternion()

void HAL_GetIMUQuaternion ( HAL_Quaternion * quat,
int32_t * status )

Get the orientation of the IMU as a quaternion.

Parameters
[out]quatthe quaternion
[out]statusthe error code, or 0 for success

◆ HAL_GetIMUYawFlat()

double HAL_GetIMUYawFlat ( int64_t * timestamp)

Get the yaw value, in radians, of the IMU in the "flat" orientation.

Parameters
[out]timestampthe timestamp of the sample
Returns
flat orientation yaw

◆ HAL_GetIMUYawLandscape()

double HAL_GetIMUYawLandscape ( int64_t * timestamp)

Get the yaw value, in radians, of the IMU in the "landscape" orientation.

Parameters
[out]timestampthe timestamp of the sample
Returns
landscape orientation yaw

◆ HAL_GetIMUYawPortrait()

double HAL_GetIMUYawPortrait ( int64_t * timestamp)

Get the yaw value, in radians, of the IMU in the "portrait" orientation.

Parameters
[out]timestampthe timestamp of the sample
Returns
portrait orientation yaw