Consumption

public struct Consumption

Describes parameters used to determine the vehicle power and consumption.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Creates an instance of Consumption.

    Throws

    VehicleError.invalidVehicleSnapshot if speed consumption is invalid.

    Declaration

    Swift

    public init
        (
            auxiliaryPower: Measurement<TTUnitFuelPerTime>? = nil,
            speedConsumption: [Measurement<UnitSpeed>: Measurement<UnitFuelEfficiency>]
        ) throws

    Parameters

    auxiliaryPower

    Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, for example in liters per hour. It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

    speedConsumption

    Map used to determine fuel consumption at different speeds.

Public

  • Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, for example in liters per hour. It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

    Declaration

    Swift

    public let auxiliaryPower: Measurement<TTUnitFuelPerTime>?
  • Map used to determine fuel consumption at different speeds.

    Declaration

    Swift

    public let speedConsumption: [Measurement<UnitSpeed> : Measurement<UnitFuelEfficiency>]