References (iOS)
TripResponseStatus
TripResponseStatus
indicates if the analyzed trip by the DriveQuant servers is valid or not (see status
property) and provides information on the analysis result:
Attribute | Type | Description |
---|---|---|
status |
| Can be |
itinId |
| The id of the trip if |
hasSafetyAndEcoDrivingScore |
| If |
info | If | |
error | If |
This object also provides a method, getTrip()
, to retrieve from the local database the saved Trip if status
is equal to tripValid
. In case of error, this method returns nil
.
TripResponseInfo
Value | Description |
---|---|
engineSpeedNotAvailable | The engine speed is not available. The trip analysis is performed with an estimated value of the engine speed. |
engineSpeedIsNull | 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. |
noVehicleCharacteristics | The vehicle characteristics are not set or some values are missing. The trip analysis is performed with generic vehicle model parameters. |
dataLoss | More than 25% of data loss is detected during the trip. |
distanceTooShort | The trip was analysed but the distance is not sufficient to provide an accurate energy analysis. |
invalidVehicleCharacteristics | The vehicle characteristics are not in the range of available values. See vehicle characteristics for range limits. |
invalidVehicleId | No vehicle found for the |
TripResponseError
Value | Description |
---|---|
noAccountSet | The |
noRouteObjectFound | The |
invalidRouteDefinition | Error when parsing the |
noVelocityData | The vehicle or GPS velocity is not available |
invalidSamplingPeriod | The input variables have an invalid acquisition period. |
invalidCustomerId | Unknown |
noDateFound | The field |
maxDailyRequestNumberReached | The trip could not be analyzed because you exceeded your daily request quota. |
dataError | The service failed to process your data. There is a need to diagnose your data to determine the origin of this problem. |
invalidRouteVectors | The |
missingBeacon | The beacon has not been detected and it is required to validate the trip analysis. |
invalidBeacon | A beacon was detected during the trip but it does not have the correct identifiers |
duplicateTrip | The duplicate trip feature is enabled and the trip has already been analysed |
| The number of GPS points is too low |
userDisabled | The driver is disabled, the service cannot perform the analysis |
invalidUser | The user identifier is not valid. |
invalidGpsData | The dates are inconstistent, the service cannot perform the analysis |
invalidTrip | The trip has already been analysed by the service and considered as invalid |
accountLimitReached | The maximum number of user account reached for the customer |
Trip
Field | Type | Description |
---|---|---|
itinId |
| Trip unique identifier. |
endDate |
| The end date of the trip. |
startDate |
| The start date of the trip. |
vehicleId |
| The identifier of the vehicle used for this trip, if known. |
transportationMode |
| The transportation mode used for this trip, see Transportation Mode for the description of the possible values. |
declaredTransportationMode |
| The transportation mode declared by the user. See DeclaredTransportationMode. |
departureCity |
| The city of the departure of the trip. |
arrivalCity |
| The city of the arrival of the trip. |
departureAddress |
| The full address of the departure of the trip. |
arrivalAddress |
| The full address of the arrival of the trip. |
unscored |
|
|
metadata |
| Your specific data attached to the trip. See Custom metadata. |
tripStatistics |
| Indicators that characterize the trip conditions. See ItineraryStatistics. |
brakeWear |
| See BrakeWear. |
tireWear |
| See TireWear. |
ecoDriving |
| See EcoDriving. |
ecoDrivingContexts |
| See AdvancedEcoDriving. |
fuelEstimation |
| See FuelEstimation. |
fuelEstimationContexts |
| |
safety |
| See Safety. |
safetyContexts |
| See AdvancedSafety. |
safetyEvents |
| See SafetyEvents. |
driverDistraction |
| See DriverDistraction. |
pollutants |
| See Pollutants. |
speedingStatistics |
| See Speed Limit. |
speedLimitContexts |
| See SpeedLimitContexts. |
calls |
| See CallEvent. |
energyEstimation |
| See EnergyEstimation. |
advancedEnergyEstimation |
|
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:
Field | Type | Description |
---|---|---|
transportationMode |
| The transportation mode declared by the user for this trip. See Transportation Mode for the description of the possible values. |
passenger |
|
|
comment |
| The comment associated to this declaration. |
StartMode
StartMode indicates how the trip is started. It is an enum with the following values:
Value | Description |
---|---|
gps | Automatic start when the SDK detects a change in user's position |
beacon | Automatic start due to the presence of a beacon |
manual | Trip started manually by calling the method |
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 known vehicle's Bluetooth system |
unknown_bluetooth | Automatic start by detecting a connection to an unknown vehicle's Bluetooth system |
CancelTrip
CancelTrip indicates how the trip was cancelled. It is an enum with the following values:
Value | Description |
---|---|
user | Trip cancelled by calling the method |
highspeed | Trip cancelled because speed was too high (train, airplane) |
noSpeed | Trip cancelled because speed was too slow to be in a vehicle |
noBeacon | Trip cancelled because the beacon was not detected while it was required |
missingConfiguration | Trip cancelled because DriveKit was not configured |
noGPSData | Trip cancelled because no GPS data was recorded |
reset | Trip cancelled because SDK configuration has been reset |
beaconNoSpeed | Trip cancelled because the beacon is near the smartphone but there is no movement (zero or low speed) |
bluetoothDeviceNoSpeed | Trip cancelled because the Bluetooth device is connected to the smartphone but there was no movement (zero or low speed) |
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.
Attribute | Type | Description | Default value, if not specified |
---|---|---|---|
carTypeIndex | Int | 1 | |
carEngineIndex | Int | 1 | |
carPower | Double | 150 | |
carMass | Double | Vehicle mass in kg (min: 700 kg, max: 3500 kg) | 1400 |
carGearboxIndex | Int | 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 | 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 |
driveWheels | Int | 0 | |
engineCylinderNb | Int | Number of cylinders | 4 |
BeaconData
BeaconData is an object that contains beacon characteristics.
Attribute | Type | Description |
---|---|---|
proximityUuid | String | Beacon proximity UUID |
major | Int | Beacon major value (optional) |
minor | Int | Beacon minor value (optional) |
BluetoothData
BluetoothData is an object that contains the Bluetooth device characteristics.
Attribute | Type | Description |
---|---|---|
macAddress | String | Required MAC address of the device |
name | String | Optional display name of the device |
DKCrashInfo
Crash information object have the following structure
with the following enumeration for crash status
Attribute | Type | Description |
---|---|---|
crashId | String | Crash unique identifier |
date | Date | Crash date Example: 2023-03-07T09:13:22.461+0200 |
probability | Int | 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 enum | Crash status. Two possible values: confirmed or unconfirmed |
DKCrashFeedbackConfig
DKCrashFeedbackConfig
is an object used to configure the Crash Detection feedback feature.
with the following class for DKCrashFeedbaclNotification
Attribute | Type | Description |
---|---|---|
notification | DKCrashFeedbackNotification | Configuration of the notification |
crashVelocityThreshold | Double | Minimal speed when the crash occurred. For example, if Default value: 0.0 km/h |
DKCrashFeedbackNotification
Attribute | Type | Description |
---|---|---|
title | String | Title that appears on the notification |
message | String | Message that appears on the notification |
crashAlert | DKCrashAlert | Enum value that describes how the user will be noticed when a feedback is asked Default value: |
DKCrashAlert
Enum value | Description |
---|---|
silence | Device will not vibrate nor ring |
vibration | Device will vibrate |
soundAndVibration | Device will ring and vibrate |
CrashFeedbackType
Enum value | Description |
---|---|
noCrash | User said that no crash occurred |
confirmed | User confirmed a crash |
noFeedback | 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 |
Last updated