mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Ref T261, unify unit handling in situation altitude related values
* this is an optimization, it would work without that, but there are numerous calculations in interpolation which are faster and easier to debug in the same unit * PQ switch unit functions use "const &PQUnit"
This commit is contained in:
committed by
Roland Winklmeier
parent
337f661499
commit
23c54938ea
@@ -108,6 +108,12 @@ namespace BlackMisc
|
||||
//! Add offset value
|
||||
void addOffset(const CLength &offset);
|
||||
|
||||
//! Value in switched unit
|
||||
CAltitude &switchUnit(const PhysicalQuantities::CLengthUnit &newUnit);
|
||||
|
||||
//! Value in switched unit
|
||||
CAltitude switchedUnit(const PhysicalQuantities::CLengthUnit &newUnit) const;
|
||||
|
||||
//! AGL Above ground level?
|
||||
bool isAboveGroundLevel() const { return AboveGround == this->m_datum; }
|
||||
|
||||
@@ -176,6 +182,10 @@ namespace BlackMisc
|
||||
//! Null altitude (MSL)
|
||||
static const CAltitude &null();
|
||||
|
||||
//! Default unit for calculations
|
||||
//! \remark using this is optional and will simplify debugging and calculations
|
||||
static const PhysicalQuantities::CLengthUnit &defaultUnit();
|
||||
|
||||
//! Standard pressure 1013.25mbar/hPa
|
||||
static const PhysicalQuantities::CPressure &standardISASeaLevelPressure();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user