mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 18:55:38 +08:00
Ref T299, pitch bank heading info
This commit is contained in:
@@ -36,6 +36,7 @@ namespace BlackGui
|
|||||||
m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexLatitude, new CLatLonFormatter()));
|
m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexLatitude, new CLatLonFormatter()));
|
||||||
m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexLongitude, new CLatLonFormatter()));
|
m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexLongitude, new CLatLonFormatter()));
|
||||||
m_columns.addColumn(CColumn("gs.", CAircraftSituation::IndexGroundSpeed, new CSpeedKtsFormatter()));
|
m_columns.addColumn(CColumn("gs.", CAircraftSituation::IndexGroundSpeed, new CSpeedKtsFormatter()));
|
||||||
|
m_columns.addColumn(CColumn::standardString("PBH", "pitch bank heading", CAircraftSituation::IndexPBHInfo));
|
||||||
m_columns.addColumn(CColumn("on gnd.", "is on gnd.", CAircraftSituation::IndexIsOnGround, new CBoolIconFormatter("yes", "no"), true));
|
m_columns.addColumn(CColumn("on gnd.", "is on gnd.", CAircraftSituation::IndexIsOnGround, new CBoolIconFormatter("yes", "no"), true));
|
||||||
m_columns.addColumn(CColumn::standardString("reliability", CAircraftSituation::IndexOnGroundReliabilityString));
|
m_columns.addColumn(CColumn::standardString("reliability", CAircraftSituation::IndexOnGroundReliabilityString));
|
||||||
m_columns.addColumn(CColumn::standardString("gnd.elv.", CAircraftSituation::IndexGroundElevationPlusInfo));
|
m_columns.addColumn(CColumn::standardString("gnd.elv.", CAircraftSituation::IndexGroundElevationPlusInfo));
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ namespace BlackMisc
|
|||||||
case IndexAltitude: return this->getAltitude().propertyByIndex(index.copyFrontRemoved());
|
case IndexAltitude: return this->getAltitude().propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexHeading: return m_heading.propertyByIndex(index.copyFrontRemoved());
|
case IndexHeading: return m_heading.propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexPitch: return m_pitch.propertyByIndex(index.copyFrontRemoved());
|
case IndexPitch: return m_pitch.propertyByIndex(index.copyFrontRemoved());
|
||||||
|
case IndexPBHInfo: return CVariant::fromValue(this->getPBHInfo());
|
||||||
case IndexBank: return m_bank.propertyByIndex(index.copyFrontRemoved());
|
case IndexBank: return m_bank.propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexCG: return m_cg.propertyByIndex(index.copyFrontRemoved());
|
case IndexCG: return m_cg.propertyByIndex(index.copyFrontRemoved());
|
||||||
case IndexSceneryOffset: return m_sceneryOffset.propertyByIndex(index.copyFrontRemoved());
|
case IndexSceneryOffset: return m_sceneryOffset.propertyByIndex(index.copyFrontRemoved());
|
||||||
@@ -357,6 +358,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
case IndexPosition: return m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition());
|
case IndexPosition: return m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition());
|
||||||
case IndexAltitude: return this->getAltitude().comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getAltitude());
|
case IndexAltitude: return this->getAltitude().comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getAltitude());
|
||||||
|
case IndexPBHInfo: // fall through
|
||||||
case IndexPitch: return m_pitch.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPitch());
|
case IndexPitch: return m_pitch.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPitch());
|
||||||
case IndexBank: return m_bank.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getBank());
|
case IndexBank: return m_bank.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getBank());
|
||||||
case IndexCG: return m_cg.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCG());
|
case IndexCG: return m_cg.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCG());
|
||||||
@@ -381,7 +383,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
const int c = Compare::compare(this->getGroundElevationInfo(), compareValue.getGroundElevationInfo());
|
const int c = Compare::compare(this->getGroundElevationInfo(), compareValue.getGroundElevationInfo());
|
||||||
if (c != 0) { return c; }
|
if (c != 0) { return c; }
|
||||||
// fall thrue, compare flag
|
// fall through, compare flag
|
||||||
}
|
}
|
||||||
case IndexGroundElevationInfoTransferred: return Compare::compare(m_isElvInfoTransferred, compareValue.m_isElvInfoTransferred);
|
case IndexGroundElevationInfoTransferred: return Compare::compare(m_isElvInfoTransferred, compareValue.m_isElvInfoTransferred);
|
||||||
case IndexCanLikelySkipNearGroundInterpolation: return Compare::compare(this->canLikelySkipNearGroundInterpolation(), compareValue.canLikelySkipNearGroundInterpolation());
|
case IndexCanLikelySkipNearGroundInterpolation: return Compare::compare(this->canLikelySkipNearGroundInterpolation(), compareValue.canLikelySkipNearGroundInterpolation());
|
||||||
@@ -960,6 +962,16 @@ namespace BlackMisc
|
|||||||
m_pressureAltitude = altitude;
|
m_pressureAltitude = altitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CAircraftSituation::getPBHInfo() const
|
||||||
|
{
|
||||||
|
static const QString pbh("P: %1 %2 B: %3 %4 H: %5 %6");
|
||||||
|
return pbh.arg(
|
||||||
|
this->getPitch().valueRoundedWithUnit(CAngleUnit::deg(), 1, true), this->getPitch().valueRoundedWithUnit(CAngleUnit::rad(), 5, true),
|
||||||
|
this->getBank().valueRoundedWithUnit(CAngleUnit::deg(), 1, true), this->getBank().valueRoundedWithUnit(CAngleUnit::rad(), 5, true),
|
||||||
|
this->getHeading().valueRoundedWithUnit(CAngleUnit::deg(), 1, true), this->getHeading().valueRoundedWithUnit(CAngleUnit::rad(), 5, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
bool CAircraftSituation::isMoving() const
|
bool CAircraftSituation::isMoving() const
|
||||||
{
|
{
|
||||||
const double gsKmh = this->getGroundSpeed().value(CSpeedUnit::km_h());
|
const double gsKmh = this->getGroundSpeed().value(CSpeedUnit::km_h());
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ namespace BlackMisc
|
|||||||
IndexOnGroundReliability,
|
IndexOnGroundReliability,
|
||||||
IndexOnGroundReliabilityString,
|
IndexOnGroundReliabilityString,
|
||||||
IndexPitch,
|
IndexPitch,
|
||||||
|
IndexPBHInfo,
|
||||||
IndexGroundSpeed,
|
IndexGroundSpeed,
|
||||||
IndexGroundElevationPlane,
|
IndexGroundElevationPlane,
|
||||||
IndexGroundElevationInfo,
|
IndexGroundElevationInfo,
|
||||||
@@ -409,6 +410,9 @@ namespace BlackMisc
|
|||||||
//! Set bank (angle)
|
//! Set bank (angle)
|
||||||
void setBank(const PhysicalQuantities::CAngle &bank) { m_bank = bank; }
|
void setBank(const PhysicalQuantities::CAngle &bank) { m_bank = bank; }
|
||||||
|
|
||||||
|
//! Get PBH info (all together)
|
||||||
|
QString getPBHInfo() const;
|
||||||
|
|
||||||
//! Get ground speed
|
//! Get ground speed
|
||||||
const PhysicalQuantities::CSpeed &getGroundSpeed() const { return m_groundSpeed; }
|
const PhysicalQuantities::CSpeed &getGroundSpeed() const { return m_groundSpeed; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user