refs #865, hints get ground elevation from provider or from set value

* using CAltitude for elevation provider
* null() for CAltitude
* formatting of members
* fixme in fs9 client
This commit is contained in:
Klaus Basan
2017-01-22 00:18:09 +01:00
committed by Mathew Sutcliffe
parent 0a99c82ddc
commit 38585d10b2
6 changed files with 45 additions and 16 deletions

View File

@@ -106,5 +106,11 @@ namespace BlackMisc
return BlackMisc::CIcon::iconByIndex(CIcons::GeoPosition);
}
const CAltitude &CAltitude::null()
{
static const CAltitude null(0, CAltitude::MeanSeaLevel, CLengthUnit::nullUnit());
return null;
}
} // namespace
} // namespace

View File

@@ -63,7 +63,7 @@ namespace BlackMisc
/*!
* Enum type to distinguish between MSL and AGL
*/
enum ReferenceDatum : uint
enum ReferenceDatum
{
MeanSeaLevel = 0, //!< MSL
AboveGround, //!< AGL
@@ -115,6 +115,9 @@ namespace BlackMisc
//! \copydoc BlackMisc::Mixin::Icon::toIcon
BlackMisc::CIcon toIcon() const;
//! Null altitude (MSL)
static const CAltitude &null();
private:
ReferenceDatum m_datum; //!< MSL or AGL?