mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
refs #865, use CG for on ground estimation
This commit is contained in:
committed by
Mathew Sutcliffe
parent
818cdfba59
commit
8fb79f613c
@@ -241,17 +241,15 @@ namespace BlackMisc
|
||||
|
||||
CLength CAircraftSituation::getHeightAboveGround() const
|
||||
{
|
||||
if (this->getAltitude().isNull()) { return { 0, nullptr }; }
|
||||
if (this->getAltitude().getReferenceDatum() == CAltitude::AboveGround)
|
||||
{
|
||||
// we have a sure value explicitly set
|
||||
return this->getAltitude();
|
||||
}
|
||||
const CLength gh(this->getGroundElevation());
|
||||
if (!gh.isNull() && !getAltitude().isNull())
|
||||
{
|
||||
return this->getAltitude() - gh;
|
||||
}
|
||||
return { 0, nullptr };
|
||||
if (gh.isNull()) { return { 0, nullptr }; }
|
||||
return this->getAltitude() - gh;
|
||||
}
|
||||
|
||||
CAltitude CAircraftSituation::getCorrectedAltitude() const
|
||||
|
||||
@@ -73,9 +73,10 @@ namespace BlackMisc
|
||||
//! Reliability of on ground information
|
||||
enum OnGroundReliability
|
||||
{
|
||||
OnGroundByGuessing,
|
||||
OnGroundByInterpolation, //!< strongest
|
||||
OnGroundByElevationAndCG,
|
||||
OnGroundByElevation,
|
||||
OnGroundByInterpolation,
|
||||
OnGroundByGuessing, //!< weakest
|
||||
OnGroundReliabilityNoSet
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user