mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Ref T436, underflow detection for FSX
* utility functions * force gnd flag to avoid underflow
This commit is contained in:
@@ -149,6 +149,21 @@ namespace BlackMisc
|
||||
return unknown;
|
||||
}
|
||||
|
||||
bool CAircraftSituation::isCorrectedAltitude(CAircraftSituation::AltitudeCorrection correction)
|
||||
{
|
||||
switch (correction)
|
||||
{
|
||||
case Underflow:
|
||||
case DraggedToGround:
|
||||
return true;
|
||||
case NoElevation:
|
||||
case NoCorrection:
|
||||
case AGL:
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const QString &CAircraftSituation::gndElevationInfoToString(GndElevationInfo details)
|
||||
{
|
||||
static const QString noDetails("no details");
|
||||
|
||||
@@ -499,6 +499,9 @@ namespace BlackMisc
|
||||
//! Enum to string
|
||||
static const QString &altitudeCorrectionToString(AltitudeCorrection correction);
|
||||
|
||||
//! Means corrected altitude?
|
||||
static bool isCorrectedAltitude(AltitudeCorrection correction);
|
||||
|
||||
//! Enum to string
|
||||
static const QString &gndElevationInfoToString(GndElevationInfo details);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user