sensor_event_get_heading()

Retrieve the compass heading.

Synopsis:

#include <bps/sensor.h>
 
BPS_API float sensor_event_get_heading(bps_event_t *event)

Since:

BlackBerry 10.2.0

Arguments:

event

The SENSOR_COMPASS_READING event to get the value from.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

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.

Returns:

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.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus