Retrieve the azimuth, pitch, and roll data values from a sensor event.
#include <bps/sensor.h>
BPS_API int sensor_event_get_apr(bps_event_t *event,
float *azimuth,
float *pitch,
float *roll)
BlackBerry 10.0.0
The sensor event to get the azimuth, pitch, and roll data values from.
The device's azimuth value (in degrees). Valid values can range from 0 to 359 degrees.
The device's pitch value (in degrees). Valid values can range from -180 to 180 degrees.
The device's roll value (in degrees). Valid values can range from -90 and 90 degrees.
The sensor_event_get_apr() function gets the azimuth, pitch, and roll data values from the specified sensor event. The sensor event that you pass to this function must be SENSOR_AZIMUTH_PITCH_ROLL_READING.
Azimuth refers to the angle between magnetic north (not true north) and the y-axis, around the z-axis. If you require the azimuth relative to true north, you must apply magnetic declination manually. Pitch refers to the rotation around the x-axis. Positive values indicate that the z-axis is moving towards the y-axis. Roll refers to the rotation around the y-axis. Positive values indicate that the x-axis is moving toward the z-axis.
BPS_SUCCESS when the function completes successfully, BPS_FAILURE with errno value set otherwise.