TripLocation

Represents the user's location during an ongoing Trip. See startReceivingTripLocationUpdates(int, TripLocationUpdatesListener).

TripLocation API

getAccuracy()

Returns the location's accuracy in meters.

If this location does not have an accuracy, then null is returned.

@Nullable Float getAccuracy();

getAltitude()

Returns the altitude of this location in meters above the WGS84 reference ellipsoid.

If this location does not have an altitude available, then null is returned.

@Nullable Double getAltitude();

getBearing()

Returns the bearing at the time of this location in degrees.

Bearing is the horizontal direction of travel of this device and is unrelated to the device orientation. The bearing is guaranteed to be in the range [0, 360).

If this location does not have a bearing, then null is returned.

@Nullable Float getBearing();

getBearingAccuracy()

Returns the estimated bearing accuracy in degrees of this location at the 68th percentile confidence level. This means that there is 68% chance that the true bearing at the time of this location falls within the reported bearing, +/- this uncertainty.

If this location does not have a bearing accuracy, then null is returned.

getLatitude()

Returns the latitude in degrees.

getLongitude()

Returns the longitude in degrees.

getSpeed()

Returns the speed at the time of this location, in meters per second.

If this location does not have a speed, then null is returned.

getSpeedAccuracy()

Returns the estimated speed accuracy in meters per second of this location at the 68th percentile confidence level. This means that there is 68% chance that the true speed at the time of this location falls within the reported speed, +/- this uncertainty.

If this location does not have a speed accuracy, then null is returned.

getTimestamp()

Returns the UTC time of this trip location, in milliseconds since epoch (January 1, 1970).

getTransportMode()

Returns the most probable transport mode at the time of this location. See TransportMode.

getVerticalAccuracy()

Returns the estimated altitude accuracy in meters of this location at the 68th percentile confidence level. This means that there is 68% chance that the true altitude of this location falls within the reported altitude, +/- this uncertainty.

If this location does not have a vertical accuracy, then null is returned.

Last updated