On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

VehicleLocation

The location, speed, and heading of a vehicle at a point in time.

JSON representation
{
  "location": {
    object (LatLng)
  },
  "horizontalAccuracy": number,
  "latlngAccuracy": number,
  "heading": integer,
  "bearingAccuracy": number,
  "headingAccuracy": number,
  "altitude": number,
  "verticalAccuracy": number,
  "altitudeAccuracy": number,
  "speedKmph": integer,
  "speed": number,
  "speedAccuracy": number,
  "updateTime": string,
  "serverTime": string,
  "locationSensor": enum (LocationSensor),
  "isRoadSnapped": boolean,
  "isGpsSensorEnabled": boolean,
  "timeSinceUpdate": integer,
  "numStaleUpdates": integer,
  "rawLocation": {
    object (LatLng)
  },
  "rawLocationTime": string,
  "rawLocationSensor": enum (LocationSensor),
  "rawLocationAccuracy": number,
  "supplementalLocation": {
    object (LatLng)
  },
  "supplementalLocationTime": string,
  "supplementalLocationSensor": enum (LocationSensor),
  "supplementalLocationAccuracy": number,
  "roadSnapped": boolean
}
Fields
location

object (LatLng)

The location of the vehicle. When it is sent to Fleet Engine, the vehicle's location is a GPS location. When you receive it in a response, the vehicle's location can be either a GPS location, a supplemental location, or some other estimated location. The source is specified in locationSensor.

horizontalAccuracy
(deprecated)

number

Deprecated: Use latlngAccuracy instead.

latlngAccuracy

number

Accuracy of location in meters as a radius.

heading

integer

Direction the vehicle is moving in degrees. 0 represents North. The valid range is [0,360).

bearingAccuracy
(deprecated)

number

Deprecated: Use headingAccuracy instead.

headingAccuracy

number

Accuracy of heading in degrees.

altitude

number

Altitude in meters above WGS84.

verticalAccuracy
(deprecated)

number

Deprecated: Use altitudeAccuracy instead.

altitudeAccuracy

number

Accuracy of altitude in meters.

speedKmph
(deprecated)

integer

Speed of the vehicle in kilometers per hour. Deprecated: Use speed instead.

speed

number

Speed of the vehicle in meters/second

speedAccuracy

number

Accuracy of speed in meters/second.

updateTime

string (Timestamp format)

The time when location was reported by the sensor according to the sensor's clock.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

serverTime

string (Timestamp format)

Output only. The time when the server received the location information.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

locationSensor

enum (LocationSensor)

Provider of location data (for example, GPS).

isRoadSnapped

boolean

Whether location is snapped to a road.

isGpsSensorEnabled

boolean

Input only. Indicates whether the GPS sensor is enabled on the mobile device.

timeSinceUpdate

integer

Input only. Time (in seconds) since this location was first sent to the server. This will be zero for the first update. If the time is unknown (for example, when the app restarts), this value resets to zero.

numStaleUpdates

integer

Input only. Number of additional attempts to send this location to the server. If this value is zero, then it is not stale.

rawLocation

object (LatLng)

Raw vehicle location (unprocessed by road-snapper).

rawLocationTime

string (Timestamp format)

Input only. Timestamp associated with the raw location.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

rawLocationSensor

enum (LocationSensor)

Input only. Source of the raw location.

rawLocationAccuracy

number

Input only. Accuracy of rawLocation as a radius, in meters.

supplementalLocation

object (LatLng)

Input only. Supplemental location provided by the integrating app.

supplementalLocationTime

string (Timestamp format)

Input only. Timestamp associated with the supplemental location.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

supplementalLocationSensor

enum (LocationSensor)

Input only. Source of the supplemental location.

supplementalLocationAccuracy

number

Input only. Accuracy of supplementalLocation as a radius, in meters.

roadSnapped
(deprecated)

boolean

Deprecated: Use isRoadSnapped instead.

LocationSensor

The sensor or methodology used to determine the location.

Enums
UNKNOWN_SENSOR The sensor is unspecified or unknown.
GPS GPS or Assisted GPS.
NETWORK Assisted GPS, cell tower ID, or WiFi access point.
PASSIVE Cell tower ID or WiFi access point.
ROAD_SNAPPED_LOCATION_PROVIDER A location signal snapped to the best road position.
FUSED_LOCATION_PROVIDER The fused location provider in Google Play services.
CORE_LOCATION The location provider on Apple operating systems.