Retrieve the compass heading.
#include <bps/sensor.h>
BPS_API float sensor_event_get_heading(bps_event_t *event)
BlackBerry 10.2.0
The SENSOR_COMPASS_READING event to get the value from.
The sensor_event_get_heading() function returns the compass heading relative to magnetic north, from 0 to 359 degrees. The value is retrieved from a SENSOR_COMPASS_READING event.
On success, a compass heading of 0 to 359 degrees relative to magnetic north. If the event passed in is not a SENSOR_COMPASS_EVENT, NaN will be returned with errno set appropriately.