nRF Connect SDK API 2.8.99
|
int lwm2m_carrier_velocity_set | ( | int | heading, |
float | speed_h, | ||
float | speed_v, | ||
float | uncertainty_h, | ||
float | uncertainty_v ) |
#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>
Set the OMA LwM2M Location
object Velocity
resource (/6/0/4). The Speed
resource (/6/0/6) will be calculated from speed_h
and * speed_v
.
Optional float arguments shall be set to NAN if they are not available to the user.
[in] | heading | Horizontal direction of movement in degrees clockwise from North. Valid range is 0 to 359. |
[in] | speed_h | Horizontal speed in meters per second. Must be non-negative. |
[in] | speed_v | Optional. Vertical speed in meters per second. Positive value indicates upward motion. Negative value indicates downward motion. |
[in] | uncertainty_h | Optional. Horizontal uncertainty speed, i.e. maximal deviation from the true speed, given in meters per second. Must be non-negative. |
[in] | uncertainty_v | Optional. Vertical uncertainty speed in meters per second. Must be non-negative. |
0 | If the velocity data has been updated successfully. |
-EINVAL | If at least one input argument is incorrect. |
-ENOENT | If the object is not yet initialized. |
-ENOMEM | If it was not possible to allocate memory storage to hold the velocity data. |