AltitudeChangeEnergy

public struct AltitudeChangeEnergy : Equatable, Hashable

Specifies the energy that is gained or lost by altitude changes.

  • Creates an instance of AltitudeChangeEnergy.

    Throws

    VehicleError.invalidVehicleSnapshot if consumptionForAltitudeGain is outside of [recuperationForAltitudeLoss … 500.0 kWh/km] range.

    Throws

    VehicleError.invalidVehicleSnapshot if recuperationForAltitudeLoss is outside of [0.0 kWh/km … consumptionForAltitudeGain] range.

    Note

    Applicable only for electric engines.

    Declaration

    Swift

    public init
        (
            consumptionForAltitudeGain: Measurement<TTUnitElectricEfficiency>,
            recuperationForAltitudeLoss: Measurement<TTUnitElectricEfficiency>
        ) throws

    Parameters

    consumptionForAltitudeGain

    Specifies the electric energy the vehicle consumes by going uphill (gaining elevation), e.g., kilowatt hours per kilometer.

    recuperationForAltitudeLoss

    Specifies the energy recouped while going downhill (losing altitude), e.g., kilowatt hours per kilometer.

  • Specifies the electric energy the vehicle consumes through going uphill (gaining elevation), e.g., kilowatt hours per kilometer.

    Note

    Applicable only for electric engines.

    Declaration

    Swift

    public let consumptionForAltitudeGain: Measurement<TTUnitElectricEfficiency>
  • Specifies the energy recouped while going downhill (losing altitude), e.g., kilowatt hours per kilometer.

    Note

    Applicable only for electric engines.

    Declaration

    Swift

    public let recuperationForAltitudeLoss: Measurement<TTUnitElectricEfficiency>