# DeliveryVehicleLocation

- [JSON representation](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#SCHEMA_REPRESENTATION)
- [DeliveryVehicleLocationSensor](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor)

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

| JSON representation |
|---|
| ``` { "location": { object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/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 (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`), "isRoadSnapped": boolean, "isGpsSensorEnabled": boolean, "timeSinceUpdate": integer, "numStaleUpdates": integer, "rawLocation": { object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`) }, "rawLocationTime": string, "rawLocationSensor": enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`), "rawLocationAccuracy": number, "flpLocation": { object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`) }, "flpUpdateTime": string, "flpLatlngAccuracyMeters": number, "flpHeadingDegrees": integer, "supplementalLocation": { object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`) }, "supplementalLocationTime": string, "supplementalLocationSensor": enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`), "supplementalLocationAccuracy": number, "roadSnapped": boolean } ``` |

| Fields ||
|---|---|
| `location` | ``object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/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` > [!WARNING] > This item is deprecated! 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` > [!WARNING] > This item is deprecated! Deprecated: Use `headingAccuracy` instead. |
| `headingAccuracy` | `number` Accuracy of `heading` in degrees. |
| `altitude` | `number` Altitude in meters above WGS84. |
| `verticalAccuracy (deprecated)` | `number` > [!WARNING] > This item is deprecated! Deprecated: Use `altitudeAccuracy` instead. |
| `altitudeAccuracy` | `number` Accuracy of `altitude` in meters. |
| `speedKmph (deprecated)` | `integer` > [!WARNING] > This item is deprecated! 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 (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The time when `location` was reported by the sensor according to the sensor's clock. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `serverTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the server received the location information. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `locationSensor` | ``enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`)`` 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 (deprecated)` | `integer` > [!WARNING] > This item is deprecated! Input only. Deprecated: Other signals are now used to determine if a location is stale. |
| `rawLocation` | ``object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`)`` Raw vehicle location (unprocessed by road-snapper). |
| `rawLocationTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Timestamp associated with the raw location. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `rawLocationSensor` | ``enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`)`` Source of the raw location. Defaults to `GPS`. |
| `rawLocationAccuracy` | `number` Accuracy of `rawLocation` as a radius, in meters. |
| `flpLocation` | ``object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`)`` The location from Android's Fused Location Provider. |
| `flpUpdateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Update timestamp of `flpLocation` Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `flpLatlngAccuracyMeters` | `number` Accuracy of `flpLocation` in meters as a radius. |
| `flpHeadingDegrees` | `integer` Direction the vehicle is moving in degrees, as determined by the Fused Location Provider. 0 represents North. The valid range is \[0,360). |
| `supplementalLocation` | ``object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/LatLng`)`` Supplemental location provided by the integrating app. |
| `supplementalLocationTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Timestamp associated with the supplemental location. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `supplementalLocationSensor` | ``enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryVehicleLocation#DeliveryVehicleLocationSensor`)`` Source of the supplemental location. Defaults to `CUSTOMER_SUPPLIED_LOCATION`. |
| `supplementalLocationAccuracy` | `number` Accuracy of `supplementalLocation` as a radius, in meters. |
| `roadSnapped (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! Deprecated: Use `isRoadSnapped` instead. |

## DeliveryVehicleLocationSensor

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 determined by the mobile device to be the most likely road position. |
| `CUSTOMER_SUPPLIED_LOCATION` | A customer-supplied location from an independent source. Typically, this value is used for a location provided from sources other than the mobile device running Driver SDK. If the original source is described by one of the other enum values, use that value. Locations marked CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's `lastLocation.supplemental_location_sensor`. |
| `FLEET_ENGINE_LOCATION` | A location calculated by Fleet Engine based on the signals available to it. Output only. This value will be rejected if it is received in a request. |
| `FUSED_LOCATION_PROVIDER` | Android's Fused Location Provider. |
| `CORE_LOCATION` | The location provider on Apple operating systems. |