References (iOS)

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 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
1
public enum StartMode: Int {
2
case gps = 1
3
case beacon = 2
4
case manual = 3
5
case geozone = 4
6
case bluetooth = 5
7
case unknown_bluetooth = 6
8
}
Copied!

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 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)
1
public enum CancelTrip {
2
case user, highspeed, noSpeed, noBeacon, missingConfiguration, noGPSData, reset, beaconNoSpeed
3
}
Copied!

TripPoint

TripPoint is an object that contains data for each location registered by the SDK.
1
public struct TripPoint {
2
let latitude: Double
3
let longitude: Double
4
let speed: Double
5
let accuracy: Double
6
let elevation: Double
7
let distance: Double
8
let heading: Double
9
let duration: Double
10
}
Copied!
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

Vehicle is an object that contains vehicle detailed characteristics.
1
public class Vehicle{
2
public var carTypeIndex: Int = 1
3
public var carEngineIndex: Int = 1
4
public var carPower: Double = 150.0
5
public var carMass: Double = 1400.0
6
public var carGearboxIndex: Int = 2
7
public var carConsumption: Double = 4.5
8
public var carAutoGearboxNumber: Int = 0
9
}
Copied!
Attribute
Type
Description
carTypeIndex
Int
carEngineIndex
Int
Engine type (1: gasoline, 2: Diesel, 3: electric vehicle)
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.7355P [hp] = P [kW] / 0.7355
(min: 40 hp, max 450 hp)
carMass
Double
Vehicle mass in kg (min: 700 kg, max: 3500 kg)
carGearboxIndex
Int
carConsumption
Double
Combined fuel consumption [l/100km] measured during the New European Driving Cycle (NEDC). (min: 3 l/100km, max: 20 l/100km)
carAutoGearboxNumber
Int
Number of gear ratios for the automatic gearbox. This parameter is taken into account only if carGearboxIndex is set to 1.

Vehicle body type

Value
Description
1
Compact
2
Sedan
3
Luxury vehicle
4
Estate car
5
Minivan
6
4x4, SUV
7
Sports car
8
Convertible
9
Commercial vehicle

Gearbox type

Value
Description
1
Automatic
2
Manual-5-speed
3
Manual-6-speed
4
Manual-7-speed
5
Manual-8-speed

Beacon

Beacon is an object that contains beacon characteristics.
1
public struct Beacon{
2
public let proximityUuid: String
3
public let major: Int
4
public let minor: Int
5
}
Copied!
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.
1
@objc public class BluetoothData : NSObject {
2
public var name: String
3
public var macAddress : String
4
5
@objc public init(name: String, macAddress: String) {
6
self.name = name
7
self.macAddress = macAddress
8
}
9
}
Copied!
Attribute
Type
Description
macAddress
String
Required MAC address of the device
name
String
Optional display name of the device
Last modified 1yr ago