Class Location

Hierarchy

  • Location

Methods

  • Returns

    Promise containing a new Location object

    Parameters

    • bus: DBusConnection
    • objectPath: string

    Returns Promise<Location>

  • Returns void

  • Returns void

  • Return current location information, if any. If the modem supports multiple location types it may return more than one. See the Location property for more information on the dictionary returned at location.

    This method may root authentication.

    Returns Promise<any>

  • Inject assistance data to the GNSS module, which will allow it to have a more accurate positioning information.

    The data files should be downloaded using external means from the URLs specified in the AssistanceDataServers property. The user does not need to specify the assistance data type being given.

    There is no maximum data size limit specified, default DBus system bus limits apply.

    This method may be used when the device does not have a mobile network connection by itself, and therefore it cannot use any A-GPS server to improve the accuracy of the position. In this case, the user can instead download the assistance data files using a WiFi or LAN network, and inject them to the GNSS engine manually.

    Parameters

    • data: any

      assistance data to be injected to the GNSS module, given as an array of bytes.

    Returns Promise<any>

  • Set the refresh rate of the GPS information in the API. If not explicitly set, a default of 30s will be used.

    The refresh rate can be set to 0 to disable it, so that every update reported by the modem is published in the interface.

    Parameters

    • rate: number

      Rate, in seconds.

    Returns Promise<any>

  • Configure the SUPL server for A-GPS.

    Parameters

    • server: string

      SUPL server configuration, given either as IP:PORT or as FQDN:PORT

    Returns Promise<any>

  • Configure the location sources to use when gathering location information. Adding new location sources may require to enable them in the device (e.g. the GNSS engine will need to be started explicitly if a GPS source is requested by the user). In the same way, removing location sources may require to disable them in the device (e.g. when no GPS sources are requested by the user, the GNSS engine will need to be stopped explicitly).

    This method may require the client to authenticate itself.

    When location signaling is enabled by the user, any client application (including malicious ones!) would be able to use the "Location" property to receive location updates. If further security is desired, the signal_location argument can be set to FALSE to disable location updates via D-Bus signals and require applications to call authenticated APIs (like GetLocation()) to get the location information.

    By default location signaling is disabled, and therefore the "Location" property will not be usable until explicitly enabled by the user.

    The optional MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB allow to request MSA/MSB A-GPS operation, and they must be given along with either MM_MODEM_LOCATION_SOURCE_GPS_RAW or MM_MODEM_LOCATION_SOURCE_GPS_NMEA.

    Both MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB cannot be given at the same time, and if none given, standalone GPS is assumed.

    Parameters

    • sources: number

      Bitmask of ModemLocationSource flags, specifying which sources should get enabled or disabled. MM_MODEM_LOCATION_SOURCE_NONE will disable all location gathering.

    • signal_location: boolean = false

      Flag to control whether the device emits signals with the new location information. This argument is ignored when disabling location information gathering. Defaults to false.

    Returns Promise<any>

Properties

_bus: DBusConnection
_locationInterface: DBusInterface<AnyInterfaceMethod>
_properties: LocationProperties
_propertiesInterface: DBusInterface<AnyInterfaceMethod>
_propertiesSubject: BehaviorSubject<LocationProperties>
properties$: Observable<LocationProperties>

Continuously updated Modem properties

Constructors

  • Parameters

    • bus: DBusConnection
    • locationInterface: DBusInterface<AnyInterfaceMethod>
    • propertiesInterface: DBusInterface<AnyInterfaceMethod>
    • initialProperties: any

    Returns Location

Accessors

Generated using TypeDoc