Skip to content

Coords

public structCoords

Geographic coordinates attached to a LocationEvent.


Members

accuracy

public let accuracy: Double?

Horizontal accuracy radius in meters.

altitude

public let altitude: Double?

Altitude above a reference plane in meters.

iOS

Altitude above mean sea level.

Android

Altitude above the WGS84 reference ellipsoid. See also ellipsoidal_altitude.

altitudeAccuracy

public let altitudeAccuracy: Double?

Vertical accuracy in meters. Returns -1 if unavailable.

iOS

When positive, the altitude value is within ±altitude_accuracy meters. When negative, altitude is invalid. Determining altitude accuracy requires a GPS-capable device; on some devices this value is always negative.

Android

Defined as the 1-sigma vertical accuracy at 68% confidence — the half-width of the range above and below altitude within which the true altitude has a 68% probability of falling.

ellipsoidalAltitude

public let ellipsoidalAltitude: Double?

Altitude above the WGS84 reference ellipsoid in meters.

heading

public let heading: Double?

Direction of travel in degrees (0–360, clockwise from true north).

Note

Only present when the location came from GPS. Returns -1 otherwise.

headingAccuracy

public let headingAccuracy: Double?

Heading accuracy in degrees.

Note

Only present when the location came from GPS. Returns -1 otherwise.

latitude

public let latitude: Double

Latitude in decimal degrees.

longitude

public let longitude: Double

Longitude in decimal degrees.

speed

public let speed: Double?

Ground speed in meters per second.

Note

Only present when the location came from GPS. Returns -1 otherwise.

speedAccuracy

public let speedAccuracy: Double?

Speed accuracy in meters per second.

Note

Only present when the location came from GPS. Returns -1 otherwise.