Click here for the positioning API reference documentation.
Fix On Demand
Navigation
Positioning Xtra injection
Positioning configuration tree
This API provides access to the device's physical position and movement information.
The le_pos_Get2DLocation()
function gets the last updated latitude, longitude and the horizontal accuracy values:
The latitude and longitude are given in degrees with 6 decimal places like:
The le_pos_Get3DLocation()
function gets the last updated latitude, longitude, altitude and their associated accuracy values.
The le_pos_GetMotion()
function gets the last updated horizontal and vertical speed values and the associated accuracy values:
The le_pos_GetHeading()
function gets the last updated heading value in degrees (where 0 is True North) and its associated accuracy value. Heading is the direction that the vehicle/person is facing.
The le_pos_GetDirection()
function gets the last updated direction value in degrees (where 0 is True North) and its associated accuracy value. Direction of movement is the direction that the vehicle/person is actually moving.
To be notified when the device is in motion, you must register an handler function to get the new position's data. The le_pos_AddMovementHandler()
API registers that handler. The horizontal and vertical change is measured in metres so only movement over the threshhold will trigger notification (0 means we don't care about changes).
The handler will give a reference to the position sample object that has triggered the notification. You can then access parameters using accessor functions, and release the object when done with it.
The accessor functions are:
le_pos_sample_Release()
releases the object.
You can uninstall the handler function by calling the le_pos_RemoveMovementHandler() API.
In the following code sample, the function InstallGeoFenceHandler() installs an handler function that triggers an alarm if the device leaves a designated location.
With le_pos_LoadXtra() , you can load a xtra.bin file from the filesystem. You have to download the file before loading it.
with le_pos_GetXtraValidity(), you will retrieve the date between the xtra is still validate.
Example:
The configuration database path for Positioning is:
/ positioning/ acquisitionRate<int> == 5
Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.