mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
refs #836, display elevation in UI
* added has hasGroundElevation * added elevation to sim.values
This commit is contained in:
committed by
Mathew Sutcliffe
parent
1a500340f0
commit
5adb86ae83
@@ -25,7 +25,7 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
CAircraftSituation::CAircraftSituation()
|
||||
: m_groundElevation({ 0, nullptr }, CAltitude::MeanSeaLevel) {}
|
||||
: m_groundElevation( { 0, nullptr }, CAltitude::MeanSeaLevel) {}
|
||||
|
||||
CAircraftSituation::CAircraftSituation(const CCoordinateGeodetic &position, const CHeading &heading, const CAngle &pitch, const CAngle &bank, const CSpeed &gs, const CAltitude &groundElevation)
|
||||
: m_position(position), m_heading(heading), m_pitch(pitch),
|
||||
@@ -179,6 +179,11 @@ namespace BlackMisc
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CAircraftSituation::hasGroundElevation() const
|
||||
{
|
||||
return !this->getGroundElevation().isNull();
|
||||
}
|
||||
|
||||
CLength CAircraftSituation::getHeightAboveGround() const
|
||||
{
|
||||
if (this->getAltitude().getReferenceDatum() == CAltitude::AboveGround)
|
||||
|
||||
@@ -113,6 +113,9 @@ namespace BlackMisc
|
||||
//! Elevation of the ground directly beneath
|
||||
const BlackMisc::Aviation::CAltitude &getGroundElevation() const { return this->m_groundElevation; }
|
||||
|
||||
//! Is ground elevation value available
|
||||
bool hasGroundElevation() const;
|
||||
|
||||
//! Elevation of the ground directly beneath
|
||||
void setGroundElevation(const BlackMisc::Aviation::CAltitude &elevation) { this->m_groundElevation = elevation; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user