# References (Android)

## TripResult

`TripResult` is a sealed class that indicates if the analyzed trip by the DriveQuant servers is valid or not, and it either provides information about the analyzed trip, or the cause of the error:

```kotlin
sealed class TripResult {
    data class TripValid(val itinId: String, val hasSafetyAndEcoDrivingScore: Boolean, val info: List<TripResponseInfo>) : TripResult() {
       fun getTrip(): Trip?
    }
    
    data class TripError(val tripResponseError: TripResponseError) : TripResult()
```

### TripValid

If [`TripResult`](#tripresult) is `TripValid`, it means that the analyzed trip is valid. Additional information are available:

<table><thead><tr><th width="241">Field</th><th width="269">Type</th><th>Description</th></tr></thead><tbody><tr><td>itinId</td><td><code>String</code></td><td>Unique trip identifier generated after the trip data analysis.</td></tr><tr><td>localTripId</td><td><code>String</code></td><td><p>Local and unique trip identifier generated by DriveKit SDK</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object.</p></td></tr><tr><td>hasSafetyAndEcoDrivingScore</td><td><code>Boolean</code></td><td>If <code>false</code>, it means that the trip is too short to be analyzed.<br>In this case, there is no safety or ecodriving score.</td></tr><tr><td>info</td><td><code>List&#x3C;</code><a href="#tripresponseinfo"><code>TripResponseInfo</code></a><code>></code></td><td>The DriveQuant servers returns a list of information codes. These are not errors.</td></tr></tbody></table>

This object also provides a method, `getTrip()`, to retrieve from the local database the saved [Trip](#trip).

#### TripResponseInfo

| Value                             | Description                                                                                                                                      |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| ENGINE\_SPEED\_NOT\_AVAILABLE     | The engine speed is not available. The trip analysis is performed with an estimated value of the engine speed.                                   |
| ENGINE\_SPEED\_IS\_NULL           | The engine speed is always at 0 rpm while the vehicle is moving. The trip analysis is performed but with an estimated value of the engine speed. |
| NO\_VEHICLE\_CHARACTERISTICS      | The vehicle characteristics are not set or some values are missing. The trip analysis is performed with generic vehicle model parameters.        |
| DATA\_LOSS                        | More than 25% of data loss is detected during the trip.                                                                                          |
| DISTANCE\_TOO\_SHORT              | The trip was analysed but the distance is not sufficient to provide an accurate energy analysis.                                                 |
| INVALID\_VEHICLE\_CHARACTERISTICS | The vehicle characteristics are not in the range of available values. See vehicle characteristics for range limits.                              |
| INVALID\_VEHICLE\_ID              | No vehicle found for the `vehicleId` provided to the API request.                                                                                |

### TripError

If [`TripResult`](#tripresult) is `TripError`, it means that the trip has been analyzed but an error occurred and data is not valid. Additional error information are available:

| Property          | Type                | Description                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| localTripId       | `String`            | <p>Local and unique trip identifier generated by DriveKit SDK.</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object. <code>itinId</code> corresponds to the unique trip identifier generated after the data analysis.</p> |
| tripResponseError | `TripResponseError` | The reason why the trip is analyzed as invalid.                                                                                                                                                                                                                                     |

#### TripResponseError

| Value                                | Description                                                                                                             |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| NO\_ACCOUNT\_SET                     | The `account` block is not set in the trip data.                                                                        |
| NO\_ROUTE\_OBJECT\_FOUND             | The `route` block is not available in the trip data.                                                                    |
| INVALID\_ROUTE\_DEFINITION           | Error when parsing the `route` block                                                                                    |
| NO\_VELOCITY\_DATA                   | The vehicle or GPS velocity is not available                                                                            |
| INVALID\_SAMPLING\_PERIOD            | The input variables have an invalid acquisition period.                                                                 |
| INVALID\_CUSTOMER\_ID                | Unknown `account` value. Unauthorised access.                                                                           |
| NO\_DATE\_FOUND                      | The field `vehicleDate` or `gpsDate` is not available.                                                                  |
| MAX\_DAILY\_REQUEST\_NUMBER\_REACHED | The trip could not be analyzed because you exceeded your daily request quota.                                           |
| DATA\_ERROR                          | The service failed to process your data. There is a need to diagnose your data to determine the origin of this problem. |
| INVALID\_ROUTE\_VECTORS              | The `route` vectors are not of the same size, the service cannot perform the analysis                                   |
| MISSING\_BEACON                      | The beacon has not been detected and it is required to validate the trip analysis.                                      |
| INVALID\_BEACON                      | A beacon was detected during the trip but it does not have the correct identifiers                                      |
| DUPLICATE\_TRIP                      | The duplicate trip feature is enabled and the trip has already been analysed                                            |
| INSUFFICIENT\_GPS\_DATA              | The number of GPS points is too low                                                                                     |
| USER\_DISABLED                       | The driver is disabled, the service cannot perform the analysis                                                         |
| INVALID\_USER                        | The user identifier is not valid.                                                                                       |
| INVALID\_GPS\_DATA                   | The dates are inconstistent, the service cannot perform the analysis                                                    |
| INVALID\_TRIP                        | The trip has already been analysed by the service and considered as invalid                                             |
| ACCOUNT\_LIMIT\_REACHED              | The maximum number of user account reached for the customer                                                             |
| UNKNOWN\_ERROR                       | The error is not yet handled by the DriveKit SDK.                                                                       |

## Trip

<table><thead><tr><th width="261.66666666666663">Field</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>itinId</td><td><code>String</code></td><td>Trip unique identifier.</td></tr><tr><td>endDate</td><td><code>Date</code></td><td>The end date of the trip.</td></tr><tr><td>startDate</td><td><code>Date?</code></td><td>The start date of the trip.</td></tr><tr><td>vehicleId</td><td><code>String?</code></td><td>The identifier of the vehicle used for this trip, if known.</td></tr><tr><td>transportationMode</td><td><code>TransportationMode</code></td><td>The transportation mode used for this trip, among: <code>CAR</code>, <code>MOTO</code>, <code>TRUCK</code>, <code>BUS</code>, <code>TRAIN</code>, <code>BOAT</code>, <code>BIKE</code>, <code>FLIGHT</code>, <code>SKIING</code>, <code>ON_FOOT</code>, <code>IDLE</code>, <code>OTHER</code>, <code>UNKNOWN</code>.</td></tr><tr><td>declaredTransportationMode</td><td><code>DeclaredTransportationMode?</code></td><td>The transportation mode declared by the user. See <a href="#declaredtransportationmode">DeclaredTransportationMode</a>.</td></tr><tr><td>departureAddress</td><td><code>String</code></td><td>The full address of the departure of the trip.</td></tr><tr><td>departureCity</td><td><code>String</code></td><td>The city of the departure of the trip.</td></tr><tr><td>departurePostalCode</td><td><code>String</code></td><td>The postal code of the trip departure.</td></tr><tr><td>departureState</td><td><code>String</code></td><td>The state of the trip departure.</td></tr><tr><td>departureCountry</td><td><code>String</code></td><td>The country of the trip departure</td></tr><tr><td>arrivalAddress</td><td><code>String</code></td><td>The full address of the arrival of the trip.</td></tr><tr><td>arrivalCity</td><td><code>String</code></td><td>The city of the arrival of the trip.</td></tr><tr><td>arrivalPostalCode</td><td><code>String</code></td><td>The postal code of the trip arrival.</td></tr><tr><td>arrivalState</td><td><code>String</code></td><td>The state of the trip arrival.</td></tr><tr><td>arrivalCountry</td><td><code>String</code></td><td>The country of the trip arrival.</td></tr><tr><td>unscored</td><td><code>Boolean</code></td><td><code>true</code> if has no safety and eco-driving score.</td></tr><tr><td>occupantInfo</td><td><code>OccupantInfo?</code></td><td><p>Indicating whether the occupant was the driver or a passenger. </p><p>See <a href="#occupantinfo">OccupantInfo</a>.</p></td></tr><tr><td>metaData</td><td><code>Map&#x3C;String, String></code></td><td>Your specific data attached to the trip.  See <a href="custom-metadata">Custom metadata</a>.</td></tr><tr><td>tripStatistics</td><td><code>TripStatistics?</code></td><td>Indicators that characterize the trip conditions. See <a href="../../rest-services/trip#itinerarystatistics">ItineraryStatistics</a>.</td></tr><tr><td>brakeWear</td><td><code>BrakeWear?</code></td><td>See <a href="../../rest-services/trip#tire-and-brake-wear-estimates">BrakeWear</a>.</td></tr><tr><td>tireWear</td><td><code>TireWear?</code></td><td>See <a href="../../rest-services/trip#tire-and-brake-wear-estimates">TireWear</a>.</td></tr><tr><td>ecoDriving</td><td><code>EcoDriving?</code></td><td>See <a href="../../rest-services/trip#eco-driving">EcoDriving</a>.</td></tr><tr><td>ecoDrivingContexts</td><td><code>List&#x3C;EcoDrivingContext></code></td><td>See <a href="../../rest-services/trip#advanced-eco-driving">AdvancedEcoDriving</a>.</td></tr><tr><td>fuelEstimation</td><td><code>FuelEstimation?</code></td><td>See <a href="../../rest-services/trip#fuel-estimation">FuelEstimation</a>.</td></tr><tr><td>fuelEstimationDrivingContexts</td><td><code>List&#x3C;FuelEstimationDrivingContext></code></td><td>See <a href="../../rest-services/trip#advanced-fuel-estimation">Advanced fuel estimation</a>.</td></tr><tr><td>safety</td><td><code>Safety?</code></td><td>See <a href="../../rest-services/trip#safety">Safety</a>.</td></tr><tr><td>safetyContexts</td><td><code>List&#x3C;SafetyContext></code></td><td>See <a href="../../rest-services/trip#advanced-safety">AdvancedSafety</a>.</td></tr><tr><td>safetyEvents</td><td><code>List&#x3C;SafetyEvent>?</code></td><td>See <a href="../../rest-services/trip#safetyevents">SafetyEvents</a>.</td></tr><tr><td>driverDistraction</td><td><code>DriverDistraction?</code></td><td>See <a href="../../rest-services/trip#driver-distraction-score">DriverDistraction</a>.</td></tr><tr><td>pollutants</td><td><code>Pollutants?</code></td><td>See <a href="../../rest-services/trip#pollutants">Pollutants</a>.</td></tr><tr><td>speedingStatistics</td><td><code>SpeedingStatistics?</code></td><td>See <a href="../../rest-services/trip#speed-limit">Speed Limit</a>.</td></tr><tr><td>speedLimitContexts</td><td><code>List&#x3C;SpeedLimitContext>?</code></td><td>See <a href="../../rest-services/trip#speedlimitcontexts">SpeedLimitContexts</a>.</td></tr><tr><td>calls</td><td><code>List&#x3C;Call>?</code></td><td>See <a href="../../rest-services/trip#call">CallEvent</a>.</td></tr><tr><td>energyEstimation</td><td><code>EnergyEstimation?</code></td><td>See <a href="../../rest-services/trip#energyestimation">EnergyEstimation</a>.</td></tr><tr><td>advancedEnergyEstimations</td><td><code>List&#x3C;AdvancedEnergyEstimation>?</code></td><td>See <a href="../../rest-services/trip#advancedenergyestimation">AdvancedEnergyEstimation</a>.</td></tr></tbody></table>

### OccupantInfo

<table><thead><tr><th width="188">Field</th><th width="159">Type</th><th>Description</th></tr></thead><tbody><tr><td>role</td><td><code>OccupantRole</code></td><td><p>Indicates the role of the occupant.</p><p>See <a href="#occupantrole">OccupantRole</a>.</p></td></tr><tr><td>passengerProbability</td><td>Int</td><td>Probability, expressed as a percentage, that the vehicle occupant is a passenger.</td></tr></tbody></table>

### OccupantRole

<table><thead><tr><th width="206">Value</th><th>Description</th></tr></thead><tbody><tr><td>DRIVER</td><td>The vehicle occupant is very likely to be a driver.</td></tr><tr><td>PASSENGER</td><td>The vehicle occupant is very likely to be a passenger.</td></tr><tr><td>UNAVAILABLE</td><td>The trip data and historical information about the user's habits do not allow determining whether the occupant is a driver or a passenger. In this case, we recommend considering the occupant as the driver for this trip.</td></tr><tr><td>NOT_APPLICABLE</td><td>The trip was made using public transportation (such as train or bus) or by a mode of transport other than a car (e.g., bicycle, boat, plane). In these cases, driver/passenger detection is not performed.</td></tr></tbody></table>

### DeclaredTransportationMode

The user has the possibility to declare the transportation mode that was used during a trip to confirm the one detected or to change it, and to declare whether the trip was made as a passenger or as the driver.

Here is the description of the corresponding object:

<table><thead><tr><th width="197">Field</th><th width="214">Type</th><th>Description</th></tr></thead><tbody><tr><td>transportationMode</td><td><code>TransportationMode</code></td><td>The transportation mode declared by the user for this trip, among: <code>CAR</code>, <code>MOTO</code>, <code>TRUCK</code>, <code>BUS</code>, <code>TRAIN</code>, <code>BOAT</code>, <code>BIKE</code>, <code>FLIGHT</code>, <code>SKIING</code>, <code>ON_FOOT</code>, <code>IDLE</code>, <code>OTHER</code>, <code>UNKNOWN</code>.</td></tr><tr><td>passenger</td><td><code>Boolean?</code></td><td><code>true</code> if the trip was made as a passenger, <code>false</code> if the trip was made as the driver.</td></tr><tr><td>comment</td><td><code>String?</code></td><td>The comment associated to this declaration.</td></tr></tbody></table>

## DKTripRecordingStartedState

This object is returned in the [`TripListener`](https://docs.drivequant.com/trip-analysis/android/triplistener)'s `tripRecordingStarted()` callback.

<table><thead><tr><th width="205">Field</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>localTripId</td><td>String</td><td><p>Local and unique trip identifier generated by DriveKit SDK</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object, which corresponds to the unique trip identifier generated after the data analysis.</p></td></tr><tr><td>startMode</td><td>StartMode</td><td>Indicates how the trip started. Possible values are describe <a href="#startmode">here</a>.</td></tr><tr><td>recordingStartDate</td><td>Date</td><td>Date when DriveKit has started the trip recording.<br>⚠️  It is not the recalculated trip start date returned in <a href="#tripresult">TripResult</a> after DriveQuant platform's analysis.</td></tr></tbody></table>

## DKTripRecordingConfirmedState

This object is returned in the [`TripListener`](https://docs.drivequant.com/trip-analysis/android/triplistener)'s `tripRecordingConfirmed()` callback.

<table><thead><tr><th width="205">Field</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>localTripId</td><td>String</td><td><p>Local and unique trip identifier generated by DriveKit SDK</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object, which corresponds to the unique trip identifier generated after the data analysis.</p></td></tr><tr><td>startMode</td><td>StartMode</td><td>Indicates how the trip started. Possible values are describe <a href="#startmode">here</a>.</td></tr><tr><td>recordingStartDate</td><td>Date</td><td>Date when DriveKit has started the trip recording.<br>⚠️  It is not the recalculated trip start date returned in <a href="#tripresult">TripResult</a> after DriveQuant platform's analysis.</td></tr><tr><td>recordingConfirmationDate</td><td>Date</td><td>Date when the trip entered into the confirmation state.</td></tr></tbody></table>

## DKTripRecordingCanceledState

This object is returned in the [`TripListener`](https://docs.drivequant.com/trip-analysis/android/triplistener)'s `tripRecordingCanceled()` callback.

<table><thead><tr><th width="205">Field</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>localTripId</td><td>String</td><td><p>Local and unique trip identifier generated by DriveKit SDK</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object, which corresponds to the unique trip identifier generated after the data analysis.</p></td></tr><tr><td>startMode</td><td>StartMode</td><td>Indicates how the trip started. Possible values are describe <a href="#startmode">here</a>.</td></tr><tr><td>recordingStartDate</td><td>Date</td><td>Date when DriveKit has started the trip recording.<br>⚠️  It is not the recalculated trip start date returned in <a href="#tripresult">TripResult</a> after DriveQuant platform's analysis.</td></tr><tr><td>recordingConfirmationDate</td><td>Date?</td><td>Date when the trip was confirmed if the trip entered into the confirmation state.</td></tr><tr><td>cancelationReason</td><td>DKTripCancelationReason</td><td><p>Indicates how the trip was canceled.</p><p>Possible values are described <a href="#dktripcancelationreason">here</a>.</p></td></tr></tbody></table>

## DKTripRecordingFinishedState

This object is returned in the [`TripListener`](https://docs.drivequant.com/trip-analysis/android/triplistener)'s `tripRecordingFinished()` callback.

<table><thead><tr><th width="205">Field</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>localTripId</td><td>String</td><td><p>Local and unique trip identifier generated by DriveKit SDK</p><p>⚠️ It is different from the <code>itinId</code> property returned in the <a href="#trip">Trip</a> object, which corresponds to the unique trip identifier generated after the data analysis.</p></td></tr><tr><td>startMode</td><td>StartMode</td><td>Indicates how the trip started. Possible values are describe <a href="#startmode">here</a>.</td></tr><tr><td>recordingStartDate</td><td>Date</td><td>Date when DriveKit has started the trip recording.<br>⚠️  It is not the trip start date returned in <a href="#tripresult">TripResult</a> after DriveQuant platform's analysis.</td></tr><tr><td>recordingConfirmationDate</td><td>Date</td><td>Date when the trip entered into the confirmation state.</td></tr><tr><td>recordingEndDate</td><td>Date</td><td>Date when DriveKit has terminated the trip recording.<br>⚠️  It is not the trip end date returned in <a href="#tripresult">TripResult</a> after DriveQuant platform's analysis.</td></tr></tbody></table>

## StartMode

`StartMode` indicates how the trip is started. It is an enum with the following values:

| Value              | Description                                                                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Value              | Description                                                                                                                                |
| GPS                | Automatic start when the SDK detects a change in user position                                                                             |
| BEACON             | Automatic start due to the presence of a beacon                                                                                            |
| MANUAL             | Trip started manually by calling the method [startTrip()](https://docs.drivequant.com/trip-analysis/trip-management#manually-start-a-trip) |
| GEOZONE            | Automatic start when the SDK detects that you exit the zone where your vehicle may be parked                                               |
| BLUETOOTH          | Automatic start by detecting a connection to a vehicle's Bluetooth system                                                                  |
| UNKNOWN\_BLUETOOTH | Automatic start by detecting a connection to a unknown vehicle's Bluetooth system                                                          |
| BICYCLE\_ACTIVITY  | Automatic start by detecting a bicycle activity                                                                                            |
| CONNECTED\_CAR     | Automatic start when the SDK detects that your smartphone has been connected to an Android Auto or Automotive OS system                    |

## DKTripCancelationReason

| Value                        | Description                                                                                                                                                                                                                                                        |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| USER                         | Trip canceled by calling the method [`cancelTrip`](https://docs.drivequant.com/trip-analysis/trip-management#cancel-a-trip)                                                                                                                                        |
| HIGH\_SPEED                  | Trip canceled because speed was too high (train, airplane)                                                                                                                                                                                                         |
| NO\_SPEED                    | Trip canceled because speed was too slow to be made in a vehicle                                                                                                                                                                                                   |
| NO\_BEACON                   | Trip canceled because the beacon was not detected while it was [required](https://docs.drivequant.com/trip-analysis/beacon-usage#beacon-required)                                                                                                                  |
| NO\_BLUETOOTH\_DEVICE        | Trip canceled because the Bluetooth device was not detected while it was [required](https://docs.drivequant.com/trip-analysis/bluetooth-usage#bluetooth-device-required).                                                                                          |
| MISSING\_CONFIGURATION       | Trip canceled because DriveKit was not configured                                                                                                                                                                                                                  |
| NO\_LOCATION\_DATA           | Trip canceled because no location data was recorded                                                                                                                                                                                                                |
| RESET                        | Trip canceled because SDK configuration has been [reset](https://docs.drivequant.com/get-started-drivekit/android/advanced-configurations#reset).                                                                                                                  |
| BEACON\_NO\_SPEED            | Trip canceled because the beacon is near the smartphone but there was no movement (zero or low speed)                                                                                                                                                              |
| BLUETOOTH\_DEVICE\_NO\_SPEED | Trip canceled because the Bluetooth device is connected to the smartphone but there was no movement (zero or low speed)                                                                                                                                            |
| APP\_KILLED                  | <p>The trip recording has been canceled due to an app termination.<br>The trip is not sent to the DriveQuant's platform for analysis because it has never entered in confirmation state, or the Bluetooth device/Beacon is required but has not been detected.</p> |

## TripPoint

TripPoint is an object that contains data for each location registered by the SDK.

| Attribute | Type   | Description                                        |
| --------- | ------ | -------------------------------------------------- |
| latitude  | Double | Latitude                                           |
| longitude | Double | Longitude                                          |
| speed     | Double | Speed in km/h                                      |
| accuracy  | Double | Accuracy of the GPS data in meter                  |
| elevation | Double | Elevation in meter                                 |
| distance  | Double | Distance since the beginning of the trip in meter  |
| heading   | Double | Heading                                            |
| duration  | Double | Duration since the beginning of the trip in second |

## TripVehicle

TripVehicle is an object that contains vehicle detailed characteristics.

```kotlin
data class TripVehicle (
    val carTypeIndex: Int = 1,
    val carEngineIndex: Int = 1,
    val carPower: Double = 150.0,
    val carMass: Double = 1400.0,
    val carGearboxIndex: Int = 2,
    val carConsumption: Double = 4.5,
    val carAutoGearboxNumber: Int = 0,
    val engineDisplacement: Double = 1200.0,
    val frontTireSize: String? = null,
    val rearTireSize: String? = null,
    val length: Double? = null,
    val width: Double? = null,
    val height: Double? = null,
    val engineCylinderNb: Int? = null,
    val driveWheels: Int? = null
)
```

| Attribute            | Type    | Description                                                                                                                                                                                              | Default value, if not specified |
| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| carTypeIndex         | Int     | [Vehicle body type](https://docs.drivequant.com/rest-services/references#vehicle-body-type)                                                                                                              | 1                               |
| carEngineIndex       | Int     | [Engine type](https://docs.drivequant.com/rest-services/references#engine-type)                                                                                                                          | 1                               |
| carPower             | Double  | Vehicle power in hp. This value must be entered in horsepower. In case you only have the engine power in kW you can apply the following formula: $$P \[hp] = P \[kW] / 0.7355$$ (min: 40 hp, max 450 hp) | 150                             |
| carMass              | Double  | Vehicle mass in kg (min: 700 kg, max: 3500 kg)                                                                                                                                                           | 1400                            |
| carGearboxIndex      | Int     | [Gearbox type](https://docs.drivequant.com/rest-services/references#gearbox-type)                                                                                                                        | 2                               |
| carConsumption       | Double  | Combined fuel consumption \[l/100km] measured during the New European Driving Cycle (NEDC). (min: 3 l/100km, max: 20 l/100km)                                                                            | 4.5                             |
| carAutoGearboxNumber | Int     | Number of gear ratios for the automatic gearbox. This parameter is taken into account only if `carGearboxIndex` is set to 1.                                                                             | 6                               |
| engineDisplacement   | Double  | Engine displacement in liters                                                                                                                                                                            | 1200                            |
| frontTireSize        | String? | Front tire size                                                                                                                                                                                          | "205/55/16"                     |
| rearTireSize         | String? | Rear tire size                                                                                                                                                                                           | "205/55/16"                     |
| length               | Double? | Vehicle length in meter                                                                                                                                                                                  | 4.5                             |
| width                | Double? | Vehicle width in meter                                                                                                                                                                                   | 1.8                             |
| height               | Double? | Vehicle height in meter                                                                                                                                                                                  | 1.45                            |
| engineCylinderNb     | Int?    | Number of cylinders                                                                                                                                                                                      | 4                               |
| driveWheels          | Int?    | [Drive wheels type](https://docs.drivequant.com/rest-services/references#drive-wheels-type)                                                                                                              | 0                               |

## BeaconData

BeaconData is an object that contains beacon characteristics.

| Attribute     | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| proximityUuid | String | Beacon proximity UUID                          |
| major         | Int    | Beacon major value (set to -1 to ignore value) |
| minor         | Int    | Beacon minor value (set to -1 to ignore value) |

## BluetoothData

BluetoothData is an object that contains the Bluetooth device characteristics.

<table><thead><tr><th>Attribute</th><th width="264.3333333333333">Type</th><th>Description</th></tr></thead><tbody><tr><td>macAddress</td><td>String</td><td>Required MAC address of the device</td></tr><tr><td>name</td><td>String</td><td>Optional display name of the device</td></tr></tbody></table>

## DKCrashInfo

Crash information object have the following structure:

| Attribute       | Type            | Description                                                                                                                                                                                                                       |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| crashId         | String          | Crash unique identifier                                                                                                                                                                                                           |
| date            | Date            | <p>Crash date</p><p>Example: <code>2023-03-07T09:13:22.461+0200</code></p>                                                                                                                                                        |
| probability     | Short           | Crash probability (in %)                                                                                                                                                                                                          |
| latitude        | Double          | Coordinates (latitude) of the crash                                                                                                                                                                                               |
| longitude       | Double          | Coordinates (longitude) of the crash                                                                                                                                                                                              |
| velocity        | Double          | Velocity at time of  crash                                                                                                                                                                                                        |
| crashStatus     | `DKCrashStatus` | Crash status enum. Two possible values: `CONFIRMED` or `UNCONFIRMED`                                                                                                                                                              |
| userLocationUrl | String?         | <p>When a crash is confirmed and <a href="../../push-services/push-crash-data">push crash data</a> is activated, an URL of the map that will display the location data is returned.</p><p>Otherwise, it is <code>null</code>.</p> |

## DKCrashFeedbackConfig

`DKCrashFeedbackConfig` is an object used to configure the Crash Detection feedback feature.

| Attribute              | Type                          | Description                                                                                                                                                                                                                                        |
| ---------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| notification           | `DKCrashFeedbackNotification` | Configuration of the notification                                                                                                                                                                                                                  |
| crashVelocityThreshold | Double                        | <p>Minimal speed when the crash occurred.</p><p>For example, if <code>crashVelocityThreshold</code> is set at 20 km/h and a crash occurred at 10 km/h, feedback will not be sent to the user. </p><p><strong>Default value</strong> : 0.0 km/h</p> |

## DKCrashFeedbackNotification

<table><thead><tr><th>Attribute</th><th width="270.3333333333333">Type</th><th>Description</th></tr></thead><tbody><tr><td>icon</td><td>Int</td><td>Resource identifier of the  notification icon</td></tr><tr><td>channelId</td><td>String</td><td>Android channel identifier.<br><strong>Default value:</strong> <code>dq_sdk_crash_channel</code></td></tr><tr><td>notificationId</td><td>Int</td><td>Android notification identifier</td></tr><tr><td>title</td><td>String</td><td>Title that appears on the notification</td></tr><tr><td>message</td><td>String</td><td>Message that appears on the notification</td></tr><tr><td>activity</td><td>Class&#x3C;*></td><td>Activity to display</td></tr><tr><td>crashAlert</td><td><code>DKCrashAlert</code></td><td>Object that describes how the user will be noticed when a feedback is asked <strong>Default value</strong> : <code>SILENCE</code></td></tr></tbody></table>

## DKCrashAlert

| Attribute             | Description                     |
| --------------------- | ------------------------------- |
| SILENCE               | Device will not vibrate or ring |
| VIBRATION             | Device will vibrate             |
| SOUND\_AND\_VIBRATION | Device will ring and vibrate    |

## CrashFeedbackType

| Enum value       | Description                       |
| ---------------- | --------------------------------- |
| NO\_CRASH        | User said that no crash occurred  |
| CRASH\_CONFIRMED | User confirmed a crash            |
| NO\_FEEDBACK     | User did not provide any feedback |

## CrashFeedbackSeverity

| Enum value | Description                      |
| ---------- | -------------------------------- |
| NONE       | User said that no crash occurred |
| MINOR      | User confirmed a minor crash     |
| CRITICAL   | User confirmed a critical crash  |

### DKTripLocation

<table data-full-width="false"><thead><tr><th>Property/Method</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>date</td><td>Date</td><td>Date of the end of trip.</td></tr><tr><td>latitude</td><td>Double</td><td>Latitude of the end of the trip.</td></tr><tr><td>longitude</td><td>Double</td><td>Longitude of the end of the trip.</td></tr><tr><td>accuracyMeter</td><td>Double</td><td>GPS data accuracy value in meters.</td></tr><tr><td>fun getAccuracyLevel()</td><td>DKCoordinateAccuracy</td><td>GPS data accuracy level. Possible values are described below.</td></tr></tbody></table>

### DKCoordinateAccuracy

For ease of use, this function provides a position accuracy indicator with a 3-level scale.

| Name | Description                                   |
| ---- | --------------------------------------------- |
| GOOD | The GPS accuracy is strictly below 10 meters. |
| FAIR | The GPS accuracy is between 10 and 30 meters. |
| POOR | The GPS accuracy is strictly above 30 meters. |

## TripResponseStatus (Deprecated)

`TripResponseStatus` is a sealed class that indicates if the analyzed trip by the DriveQuant servers is valid or not:

### TripValid

If [`TripResponseStatus`](#tripresponsestatus-deprecated) is `TripValid`, it means that the analyzed trip is valid. Additional information are available:

| Field                       | Type                                        | Description                                                                                                                                |
| --------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| hasSafetyAndEcoDrivingScore | Boolean                                     | <p>If <code>false</code>, it means that the trip is too short to be analyzed.<br>In this case, there is no safety or ecodriving score.</p> |
| info                        | List<[TripResponseInfo](#tripresponseinfo)> | The DriveQuant servers returns a list of information codes. These are not errors.                                                          |

### TripResponseError

If [`TripResponseStatus`](#tripresponsestatus-deprecated) is `TripResponseError`, it means that the trip has been analyzed but an error occurred and data is not valid. Additional error information are available in the [`tripResponseError`](#tripresponseerror-enum) enum.

## CancelTrip (Deprecated)

CancelTrip indicates how the trip was cancelled. It is an enum with the following values:

| Value                        | Description                                                                                                                                        |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| USER                         | Trip cancelled by calling the method [`cancelTrip`](https://docs.drivequant.com/trip-analysis/trip-management#cancel-a-trip)                       |
| HIGHSPEED                    | Trip cancelled because speed was too high (train, airplane)                                                                                        |
| NO\_SPEED                    | Trip cancelled because speed was too slow to be made in a vehicle                                                                                  |
| NO\_BEACON                   | Trip cancelled because the beacon was not detected while it was [required](https://docs.drivequant.com/trip-analysis/beacon-usage#beacon-required) |
| MISSING\_CONFIGURATION       | Trip cancelled because DriveKit was not configured                                                                                                 |
| NO\_GPS\_DATA                | Trip cancelled because no GPS data was recorded                                                                                                    |
| RESET                        | Trip cancelled because SDK configuration has been [reset](https://docs.drivequant.com/get-started-drivekit/android/advanced-configurations#reset). |
| BEACON\_NO\_SPEED            | Trip cancelled because the beacon is near the smartphone but there was no movement (zero or low speed)                                             |
| BLUETOOTH\_DEVICE\_NO\_SPEED | Trip cancelled because the Bluetooth device is connected to the smartphone but there was no movement (zero or low speed)                           |

## DeviceConfigEvent (Deprecated) <a href="#deviceconfigevent" id="deviceconfigevent"></a>

`DeviceConfigEvent` indicates when the device configuration has been changed. It is a sealed class with the following values:

### BluetoothSensorStateChanged <a href="#bluetooth_sensor_state_changed" id="bluetooth_sensor_state_changed"></a>

This data class is called when the Bluetooth device sensor has been turned on or off.

* `btEnabled` : Equals `true` when the Bluetooth sensor has been turned on.
* `btRequired` : Equals `true` when the DriveKit configuration needs the Bluetooth sensor (when `beaconRequired` is set to `true` or when TripAnalysis component is configured with is at least one beacon or one Bluetooth device).

### GpsSensorStateChanged <a href="#bluetooth_sensor_state_changed" id="bluetooth_sensor_state_changed"></a>

This data class is called when the GPS sensor has been turned on or off

* `isEnabled`: Equals true when the GPS sensors has been turned on.
