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

◆ lwm2m_carrier_location_set()

int lwm2m_carrier_location_set ( double  latitude,
double  longitude,
float  altitude,
uint32_t  timestamp,
float  uncertainty 
)

#include <lib/bin/lwm2m_carrier/include/lwm2m_carrier.h>

Set your location in the OMA LwM2M Location object (/6/0).

  • The default all resource values of this object are set to 0.
Parameters
[in]latitudeLatitude (/6/0/0) in degrees. Must be between -90.0 and 90.0.
[in]longitudeLongitude (/6/0/1) in degrees. Must be between -180.0 and 180.0.
[in]altitudeAltitude (/6/0/2) is meters over sea level.
[in]timestampUnix timestamp of the current GPS measurement (/6/0/5). Must not be older than the previous timestamp passed to this function.
[in]uncertaintyPositioning uncertainty given as a radius in meters (/6/0/3).
Return values
0If the location data has been updated successfully.
-EINVALIf at least one input argument is incorrect.
-ENOENTIf the object is not yet initialized.