mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T259, Ref T243 return unit by reference
This commit is contained in:
@@ -257,6 +257,9 @@ namespace BlackMisc
|
||||
//! Get altitude
|
||||
const CAltitude &getAltitude() const { return m_position.geodeticHeight(); }
|
||||
|
||||
//! Get altitude unit
|
||||
const PhysicalQuantities::CLengthUnit &getAltitudeUnit() const { return m_position.geodeticHeight().getUnit(); }
|
||||
|
||||
//! Get altitude under consideration of ground elevation and ground flag
|
||||
//! \remark with dragToGround it will also compensate overflows, otherwise ony underflow
|
||||
CAltitude getCorrectedAltitude(const PhysicalQuantities::CLength ¢erOfGravity = PhysicalQuantities::CLength::null(), bool enableDragToGround = true, AltitudeCorrection *correctetion = nullptr) const;
|
||||
|
||||
@@ -41,12 +41,6 @@ namespace BlackMisc
|
||||
{
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
template <class MU, class PQ>
|
||||
MU CPhysicalQuantity<MU, PQ>::getUnit() const
|
||||
{
|
||||
return m_unit;
|
||||
}
|
||||
|
||||
template <class MU, class PQ>
|
||||
void CPhysicalQuantity<MU, PQ>::setUnitBySymbol(const QString &unitName)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace BlackMisc
|
||||
//! Index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexUnit = BlackMisc::CPropertyIndex::GlobalIndexCPhysicalQuantity,
|
||||
IndexUnit = CPropertyIndex::GlobalIndexCPhysicalQuantity,
|
||||
IndexValue,
|
||||
IndexValueRounded0DigitsWithUnit,
|
||||
IndexValueRounded1DigitsWithUnit,
|
||||
@@ -70,11 +70,11 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
//! Unit
|
||||
MU getUnit() const;
|
||||
const MU &getUnit() const { return m_unit; }
|
||||
|
||||
//! Simply set unit, do no calclulate conversion
|
||||
//! \sa switchUnit
|
||||
void setUnit(MU unit) { this->m_unit = unit; }
|
||||
void setUnit(MU unit) { m_unit = unit; }
|
||||
|
||||
//! Set unit by string
|
||||
void setUnitBySymbol(const QString &unitName);
|
||||
|
||||
Reference in New Issue
Block a user