ElectricVehicleConsumption
public struct ElectricVehicleConsumption
Describes capacity and the consumption of the EV.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance of the
ElectricVehicleConsumption
.Throws
VehicleError.invalidVehicleSnapshot
if speed consumption is invalid.Declaration
Swift
public init ( auxiliaryPower: Measurement<UnitPower>? = nil, speedConsumption: [Measurement<UnitSpeed>: Measurement<TTUnitElectricEfficiency>] ) throws
Parameters
auxiliaryPower
Specifies the power consumed by sustaining auxiliary systems. It can specify consumption from devices and systems such as climate control (AC and heat), radio, etc. Applicable only for electric engines.
speedConsumption
Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in pairs. Applicable only for electric engines.
-
Specifies the amount of power consumed by auxiliary systems. It can specify consumption due to devices and systems such as climate control (AC and heat), radio, etc. Applicable only for electric engines.
Declaration
Swift
public let auxiliaryPower: Measurement<UnitPower>?
-
Specifies the maximum electric energy supply that may be stored in the vehicle’s battery. Provided as an unordered list of speed/consumption-rate in pairs. Applicable only for electric engines.
Declaration
Swift
public let speedConsumption: [Measurement<UnitSpeed> : Measurement<TTUnitElectricEfficiency>]