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