AltitudeChangeEfficiency

public struct AltitudeChangeEfficiency : Equatable, Hashable

Specifies the ratio by which energy is converted for altitude changes.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Creates an instance of AltitudeChangeEfficiency.

    Throws

    VehicleError.invalidVehicleSnapshot if uphill or downhill efficiency are negative.

    Throws

    VehicleError.invalidVehicleSnapshot if the product of uphill or downhill efficiency is greated than zero.

    Declaration

    Swift

    public init
        (
            uphill: Measurement<TTUnitRatio>,
            downhill: Measurement<TTUnitRatio>
        ) throws

    Parameters

    uphill

    Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation, (i.e., PotentialEnergyGained/ChemicalEnergyConsumed).

    downhill

    Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation, (i.e., ChemicalEnergySaved/PotentialEnergyLost).

  • Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation, (i.e., PotentialEnergyGained/ChemicalEnergyConsumed).

    Declaration

    Swift

    public let uphill: Measurement<TTUnitRatio>
  • Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation, (i.e.,ChemicalEnergySaved/PotentialEnergyLost).

    Declaration

    Swift

    public let downhill: Measurement<TTUnitRatio>