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:
status
TripResponseStatusType
Can be tripValid
or tripError.
- tripValid
means that the analyzed trip is valid.
- tripError
means that the trip has been analyzed but an error occurred and data is not valid.
itinId
String?
The id of the trip if status
equals tripValid
, otherwise nil
.
localTripId
String?
Local and unique trip identifier generated by DriveKit SDK
⚠️ It is different from the itinId
property returned in the Trip object.
hasSafetyAndEcoDrivingScore
Bool
If false
, it means that the trip is valid but too short to be analyzed.
In this case, there is no safety or eco-driving score.
It cannot be equals to true
if status is not tripValid
.
info
If status
equals tripValid
, the DriveQuant servers returns a list of information codes. These are not errors.
error
If status
equals tripError
, error gives you more information about the error that occurred.
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
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 vehicleId
provided to the API request.
TripResponseError
noAccountSet
The account
block is not set in the trip data.
noRouteObjectFound
The route
block is not available in the trip data.
invalidRouteDefinition
Error when parsing the route
block
noVelocityData
The vehicle or GPS velocity is not available
invalidSamplingPeriod
The input variables have an invalid acquisition period.
invalidCustomerId
Unknown account
value. Unauthorised access.
noDateFound
The field vehicleDate
or gpsDate
is not available.
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 route
vectors are not of the same size, the service cannot perform the analysis
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
insufficientGpsData
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
itinId
String?
Trip unique identifier.
endDate
Date?
The end date of the trip.
startDate
Date?
The start date of the trip.
vehicleId
String?
The identifier of the vehicle used for this trip, if known.
transportationMode
Int32
The transportation mode used for this trip, see Transportation Mode for the description of the possible values.
declaredTransportationMode
DeclaredTransportationMode?
The transportation mode declared by the user. See DeclaredTransportationMode.
departureCity
String?
The city of the departure of the trip.
arrivalCity
String?
The city of the arrival of the trip.
departureAddress
String?
The full address of the departure of the trip.
arrivalAddress
String?
The full address of the arrival of the trip.
unscored
Bool
true
if has no safety and eco-driving score.
tripStatistics
TripStatistics?
Indicators that characterize the trip conditions. See ItineraryStatistics.
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:
transportationMode
Int32
The transportation mode declared by the user for this trip. See Transportation Mode for the description of the possible values.
passenger
Boolean?
true
if the trip was made as a passenger, false
if the trip was made as the driver.
comment
String?
The comment associated to this declaration.
DKTripRecordingStartedState
This object is returned in the TripListener
's tripRecordingStarted()
callback.
localTripId
String
Local and unique trip identifier generated by DriveKit SDK
⚠️ It is different from the itinId
property returned in the Trip object, which corresponds to the unique trip identifier generated after the data analysis.
recordingStartDate
Date
Date when DriveKit has started the trip recording. ⚠️ It is not the recalculated trip start date returned in TripResponseStatus after DriveQuant platform's analysis.
DKTripRecordingConfirmedState
This object is returned in the TripListener
's tripRecordingConfirmed()
callback.
localTripId
String
Local and unique trip identifier generated by DriveKit SDK
⚠️ It is different from the itinId
property returned in the Trip object, which corresponds to the unique trip identifier generated after the data analysis.
recordingStartDate
Date
Date when DriveKit has started the trip recording. ⚠️ It is not the recalculated trip start date returned in TripResponseStatus after DriveQuant platform's analysis.
recordingConfirmationDate
Date
Date when the trip entered into the confirmation state.
DKTripRecordingCanceledState
This object is returned in the TripListener
's tripRecordingCanceled()
callback.
localTripId
String
Local and unique trip identifier generated by DriveKit SDK
⚠️ It is different from the itinId
property returned in the Trip object, which corresponds to the unique trip identifier generated after the data analysis.
recordingStartDate
Date
Date when DriveKit has started the trip recording. ⚠️ It is not the recalculated trip start date returned in TripResponseStatus after DriveQuant platform's analysis.
recordingConfirmationDate
Date?
Date when the trip was confirmed if the trip entered into the confirmation state.
cancelationReason
DKTripCancelationReason
Indicates how the trip was canceled.
Possible values are described here.
DKTripRecordingFinishedState
This object is returned in the TripListener
's tripRecordingFinished()
callback.
localTripId
String
Local and unique trip identifier generated by DriveKit SDK
⚠️ It is different from the itinId
property returned in the Trip object, which corresponds to the unique trip identifier generated after the data analysis.
recordingStartDate
Date
Date when DriveKit has started the trip recording. ⚠️ It is not the recalculated trip start date returned in TripResponseStatus after DriveQuant platform's analysis.
recordingConfirmationDate
Date
Date when the trip was confirmed if the trip entered into the confirmation state.
recordingEndDate
Date
Date when DriveKit has terminated the trip recording. ⚠️ It is not the trip end date returned in TripResponseStatus after DriveQuant platform's analysis..
StartMode
StartMode indicates how the trip is started. It is an enum with the following values:
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 startTrip
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
DKTripCancelationReason
user
Trip canceled by calling the method cancelTrip
highSpeed
Trip canceled because speed was too high (train, airplane)
noSpeed
Trip canceled because speed was too slow to be made in a vehicle
noBeacon
Trip canceled because the beacon was not detected while it was required
noBluetoothDevice
Trip canceled because the Bluetooth device was not detected while it was required.
missingConfiguration
Trip canceled because DriveKit was not configured
noLocationData
Trip canceled because no location data was recorded
reset
Trip canceled because SDK configuration has been reset.
beaconNoSpeed
Trip canceled because the beacon is near the smartphone but there was no movement (zero or low speed)
bluetoothDeviceNoSpeed
Trip canceled because the Bluetooth device is connected to the smartphone but there was no movement (zero or low speed)
appKilled
The trip recording has been canceled due to an app termination. 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.
TripPoint
TripPoint is an object that contains data for each location registered by the SDK.
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.
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: (min: 40 hp, max 450 hp)
150
carMass
Double
Vehicle mass in kg (min: 700 kg, max: 3500 kg)
1400
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
BeaconData
BeaconData is an object that contains beacon characteristics.
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.
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
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
Crash status enum. Two possible values: confirmed
or unconfirmed
DKCrashFeedbackConfig
DKCrashFeedbackConfig
is an object used to configure the Crash Detection feedback feature.
notification
DKCrashFeedbackNotification
Configuration of the notification
crashVelocityThreshold
Double
Minimal speed when the crash occurred.
For example, if crashVelocityThreshold
is set at 20 km/h and a crash occurred at 10 km/h, feedback will not be sent to the user.
Default value: 0.0 km/h
DKCrashFeedbackNotification
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: silence
DKCrashAlert
silence
Device will not vibrate nor ring
vibration
Device will vibrate
soundAndVibration
Device will ring and vibrate
CrashFeedbackType
noCrash
User said that no crash occurred
confirmed
User confirmed a crash
noFeedback
User did not provide any feedback
CrashFeedbackSeverity
none
User said that no crash occurred
minor
User confirmed a minor crash
critical
User confirmed a critical crash
CancelTrip (Deprecated)
CancelTrip indicates how the trip was cancelled. It is an enum with the following values:
user
Trip cancelled by calling the method cancelTrip
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)
Last updated