API Reference
Positioning Control Reference

This API provides access to the device's physical position and movement information.

Enabling and disabling the positioning system is a privileged operation available only through the Positioning Control API.

IPC interfaces binding

All the functions of this API are provided by the positioningService application service.

Here's a code sample binding to Positioning services:

   clientExe.clientComponent.le_pos -> positioningService.le_pos

Fix On Demand

The le_pos_Get2DLocation() function gets the last updated latitude, longitude and the horizontal accuracy values:

  • latitude is in degrees, positive North.
  • longitude is in degrees, positive East.
  • horizontal accuracy is in meters by default.

The latitude and longitude are given in degrees with 6 decimal places like:

  • Latitude +48858300 = 48.858300 degrees North
  • Longitude +2294400 = 2.294400 degrees East

The le_pos_Get3DLocation() function gets the last updated latitude, longitude, altitude and their associated accuracy values.

  • altitude is in meters by default, above Mean Sea Level, with 3 decimal places (3047 = 3.047 meters).
  • horizontal and vertical accuracies are in meters by default.

The le_pos_GetTime() function gets the time of last updated position:

  • Hours into the day [range 0..23].
  • Minutes into the hour [range 0..59].
  • Seconds into the minute [range 0..59].
  • Milliseconds into the second [range 0..999].

The le_pos_GetDate() function gets the date of last updated position:

  • Year A.D. [e.g. 2014].
  • Month into the year [range 1...12].
  • Days into the month [range 1...31].

The le_pos_GetMotion() function gets the last updated horizontal and vertical speed values and the associated accuracy values:

  • horizontal speed is in m/sec.
  • vertical speed is in m/sec, positive up.

The le_pos_GetHeading() function gets the last updated heading value in degrees and its associated accuracy value:

  • Heading in degrees, ranges from 0 to 359, 0 being True North. Heading is the direction that the vehicle or person is facing.

The le_pos_GetDirection() function gets the last updated direction value in degrees and its associated accuracy value:

  • Direction in degrees, ranges from 0 to 359, 0 being True North. Direction of movement is the direction that the vehicle or person is actually moving.

The le_pos_GetFixState() function gets the position fix state. The fix state allows the user to determine if it is a 2-Dimensional or a 3-Dimensional position fix.

The le_pos_SetDistanceResolution() function sets the resolution for the positioning distance values.

A sample code can be seen in the following page:


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 meters 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.

The le_pos_RemoveMovementHandler() API does not delete the Position Object. The caller has to delete it by calling the le_pos_sample_Release() function.

A sample code can be seen in the following page:

Positioning acquisition rate

The acquisition rate value can be set or get with le_pos_SetAcquisitionRate() and le_pos_GetAcquisitionRate(). It is also set when calling le_pos_AddMovementHandler(). The acquisition rate is calculated from the horizontal and vertical magnitude parameters set in this function. This calculated acquisition rate can be retrieved by calling le_pos_GetAcquisitionRate().

The acquisition rate set will take effect once a request of activation of the positioning service by le_posCtrl_Request() is done.
If the acquisition rate was not previously configured, it will be set to a default value of one second once le_posCtrl_Request() is called.