Class: Toybox.Position.Info

Inherits:
Toybox.Lang.Object show all

Overview

The Position.Info class contains all of the information provided by the positioning system.

Position Info can be retrieved on every call of onUpdate() or it can be obtained on demand. Fields in this class may return null so should be checked for null values prior to use.

Since:

API Level 1.0.0

Supported Devices:

Instance Member Summary collapse

Instance Attribute Details

var accuracy as Position.Quality

The positional accuracy.

This is given as one of the following values: good, usable, poor, or not available, which corresponds with the Position.QUALITY_* constants. This cannot be null.

Since:

API Level 1.0.0

Returns:

var altitude as Lang.Float or Null

The elevation above mean sea level in meters (m).

Elevation is obtained from the GPS. If no GPS is present, then no valid elevation will be returned.

Since:

API Level 1.0.0

See Also:

Returns:

var heading as Lang.Float or Null

The true north referenced heading in radians.

This provides the direction of travel when moving. If supported by the device, it provides compass orientation when stopped.

Since:

API Level 1.0.0

Returns:

var position as Position.Location or Null

The latitude and longitude of the position.

If no GPS is available or is between GPS fix intervals (typically 1 second), the position is propagated (i.e. dead-reckoned) using the last known heading and last known speed. After a short period of time, the position will cease to be propagated to avoid excessive accumulation of position errors.

Since:

API Level 1.0.0

Returns:

var speed as Lang.Float or Null

The horizontal speed in meters per second (mps).

Speed is derived from the most accurate source in the following order:

  1. GPS

  2. Foot pod

  3. Accelerometer

Since:

API Level 1.0.0

Returns:

var when as Time.Moment or Null

The GPS time stamp of the obtained Location fix.

Since:

API Level 1.0.0

Returns:


Generated Sep 23, 2024, 3:32:49 PM