To add the Trip Simulator module to your app, add this dependency in the Podfile:
This component has been designed to facilitate preliminary testing and should never remain in your production app.
DriveQuant offers the possibility of running simulations from a list of preset trips. After integrating and activating the trip simulation component, you can select a preset trip from those described in the table below. Once the simulation is launched, the Trip Analysis SDK will receive the configured callbacks automatically.
Trip too short that does not allow to rate the driver's behavior
A 15-minute mixed trip in urban and suburban areas
A 20-minute city trip
A 30-minute trip performed in a suburban environment mostly
A 55-minute highway trip
Trip recorded in a train to test the alternative transportation modes detection
Trip recorded in a boat to test the alternative transportation modes detection
A trip dedicated to simulate a crash.
Simulate a trip
To simulate a trip, you just need to send the desired trip to the start method:
To stop the simulation of a trip, it is necessary to call the stop() method:
Simulate a crash during a trip
In order to mock a crash to check your integration, you must call the startCrashTrip function with a PresetCrashConfiguration item as parameter. Possible values for PresetCrashConfiguration enumeration are described in the table below:
A short trip with a collision at 30 km/h that occurs 137 seconds after the trip begins and that corresponds to a confirmed accident.
A short trip with a collision at 20 km/h that occurs 141 seconds after the trip begins and that corresponds to a confirmed accident.
A short trip with a collision at 10 km/h that occurs 146 seconds after the trip begins and that corresponds to a confirmed accident.
A short trip with a collision during a vehicle stop that occurs 159 seconds after the trip begins and that corresponds to an unconfirmed accident.