37 QML_VALUE_TYPE(volumeFlow)
49 result.m_volumeFlowInLPH = volumeFlowInLPH;
62 result.m_volumeFlowInLPH = LitersPerGallon*volumeFlowInGPH;
70 [[nodiscard]] Q_INVOKABLE
bool isFinite()
const
72 return std::isfinite(m_volumeFlowInLPH);
87 [[nodiscard]] Q_INVOKABLE
double toLPH()
const
89 return m_volumeFlowInLPH;
96 [[nodiscard]] Q_INVOKABLE
double toGPH()
const
98 return m_volumeFlowInLPH/LitersPerGallon;
102 static constexpr double LitersPerGallon = 4.54609;
105 double m_volumeFlowInLPH{ NAN };
Convenience class for volume flow computations.
static Q_INVOKABLE constexpr Units::VolumeFlow fromGPH(double volumeFlowInGPH)
Constructs a volume flow.
Q_INVOKABLE double toGPH() const
Convert to gallons per hour.
Q_INVOKABLE std::partial_ordering operator<=>(const Units::VolumeFlow &rhs) const =default
Comparison.
static Q_INVOKABLE constexpr Units::VolumeFlow fromLPH(double volumeFlowInLPH)
Constructs a volume flow.
Q_INVOKABLE double toLPH() const
Convert to liters per hour.
Q_INVOKABLE bool isFinite() const
Checks if the volume is valid.
Conversion between units used in aviation.