mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Restored constexpr initialization and return-by-value of CMeasurementUnit constants
that were removed by commit787b54108e. For rationale, see the commitsfef2bc528e,c8d78ada65,07ec7e6bc1where these were originally introduced.
This commit is contained in:
@@ -906,7 +906,7 @@ namespace BlackMisc
|
||||
m_heading = heading.normalizedToPlusMinus180Degrees();
|
||||
}
|
||||
|
||||
const CLengthUnit &CAircraftSituation::getAltitudeOrDefaultUnit() const
|
||||
CLengthUnit CAircraftSituation::getAltitudeOrDefaultUnit() const
|
||||
{
|
||||
if (this->getAltitude().isNull()) { return CAltitude::defaultUnit(); }
|
||||
return m_position.geodeticHeight().getUnit();
|
||||
|
||||
@@ -367,10 +367,10 @@ namespace BlackMisc
|
||||
const CAltitude &getAltitude() const { return m_position.geodeticHeight(); }
|
||||
|
||||
//! Get altitude unit
|
||||
const PhysicalQuantities::CLengthUnit &getAltitudeUnit() const { return m_position.geodeticHeight().getUnit(); }
|
||||
PhysicalQuantities::CLengthUnit getAltitudeUnit() const { return m_position.geodeticHeight().getUnit(); }
|
||||
|
||||
//! Get altitude unit
|
||||
const PhysicalQuantities::CLengthUnit &getAltitudeOrDefaultUnit() const;
|
||||
PhysicalQuantities::CLengthUnit getAltitudeOrDefaultUnit() const;
|
||||
|
||||
//! Get altitude under consideration of ground elevation and ground flag
|
||||
//! \remark with dragToGround it will also compensate overflows, otherwise only underflow
|
||||
|
||||
@@ -394,7 +394,7 @@ namespace BlackMisc
|
||||
return null;
|
||||
}
|
||||
|
||||
const CLengthUnit &CAltitude::defaultUnit()
|
||||
CLengthUnit CAltitude::defaultUnit()
|
||||
{
|
||||
return CLengthUnit::ft();
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace BlackMisc
|
||||
|
||||
//! Default unit for calculations
|
||||
//! \remark using this is optional and will simplify debugging and calculations
|
||||
static const PhysicalQuantities::CLengthUnit &defaultUnit();
|
||||
static PhysicalQuantities::CLengthUnit defaultUnit();
|
||||
|
||||
//! Standard pressure 1013.25mbar/hPa
|
||||
static const PhysicalQuantities::CPressure &standardISASeaLevelPressure();
|
||||
|
||||
Reference in New Issue
Block a user