nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ lwm2m_carrier_velocity_set()

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.

Parameters
[in]headingHorizontal direction of movement in degrees clockwise from North. Valid range is 0 to 359.
[in]speed_hHorizontal speed in meters per second. Must be non-negative.
[in]speed_vOptional. Vertical speed in meters per second. Positive value indicates upward motion. Negative value indicates downward motion.
[in]uncertainty_hOptional. Horizontal uncertainty speed, i.e. maximal deviation from the true speed, given in meters per second. Must be non-negative.
[in]uncertainty_vOptional. Vertical uncertainty speed in meters per second. Must be non-negative.
Return values
0If the velocity data has been updated successfully.
-EINVALIf at least one input argument is incorrect.
-ENOENTIf the object is not yet initialized.
-ENOMEMIf it was not possible to allocate memory storage to hold the velocity data.