Positioning

The Positioning Service can be used to obtain geolocation and time information from satellite navigation systems.

Getting Started

This service is automatically included in the Legato Framework by including default.sdef in your system and loads automatically on startup.

apps:
{
    // Platform services.
    $LEGATO_ROOT/apps/platformServices/positioningService
}

API Guide

The Positioning Service exposes two APIs that will manage connecting to Global Navigation Satellite Systems.

API Guide API Reference File Name Description
GNSS le_gnss API Reference le_gnss.api GNSS device control
Positioning le_pos API Reference le_pos.api Device physical position/movement

To bind to these APIs customize the following bindings for your App's .adef:

bindings:
{
<myExecutable>.<myComponentClient>.le_gnss -> positioningService.le_gnss
<myExecutable>.<myComponentClient>.le_pos -> positioningService.le_pos
}

Sample App

The GPS App provides examples of:

  • Obtaining current latitude and longitude
  • Converting coordinates to physical addresses using reverse geocoding
  • Finding nearby points of intereset in the form of addresses