mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
[FG] Getting ground elevation
This commit is contained in:
committed by
Mat Sutcliffe
parent
24f3750843
commit
8053504acb
@@ -407,5 +407,15 @@ namespace BlackSimPlugin
|
||||
{
|
||||
m_dbusInterface->callDBusAsync(QLatin1String("getSpeedBrakeRatio"), setterCallback(o_speedBrakeRatio));
|
||||
}
|
||||
|
||||
double CFGSwiftBusServiceProxy::getGroundElevation() const
|
||||
{
|
||||
return m_dbusInterface->callDBusRet<double>(QLatin1String("getGroundElevation"));
|
||||
}
|
||||
|
||||
void CFGSwiftBusServiceProxy::getGroundElevationAsync(double *o_groundElevation)
|
||||
{
|
||||
m_dbusInterface->callDBusAsync(QLatin1String("getGroundElevation"),setterCallback(o_groundElevation));
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -321,6 +321,12 @@ namespace BlackSimPlugin
|
||||
double getSpeedBrakeRatio() const;
|
||||
void getSpeedBrakeRatioAsync(double *o_speedBrakeRatio);
|
||||
//! @}
|
||||
|
||||
//! Get ground elevation [m] for current airplane position
|
||||
//! @{
|
||||
double getGroundElevation() const;
|
||||
void getGroundElevationAsync(double *o_groundElevation);
|
||||
//! @}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,6 +208,7 @@ namespace BlackSimPlugin
|
||||
m_serviceProxy->getTransponderModeAsync(&m_flightgearData.xpdrMode);
|
||||
m_serviceProxy->getTransponderIdentAsync(&m_flightgearData.xpdrIdent);
|
||||
m_serviceProxy->getAllWheelsOnGroundAsync(&m_flightgearData.onGroundAll);
|
||||
m_serviceProxy->getGroundElevationAsync(&m_flightgearData.groundElevation);
|
||||
|
||||
CAircraftSituation situation;
|
||||
situation.setPosition({ m_flightgearData.latitudeDeg, m_flightgearData.longitudeDeg, 0 });
|
||||
@@ -217,6 +218,7 @@ namespace BlackSimPlugin
|
||||
situation.setPitch({ m_flightgearData.pitchDeg, CAngleUnit::deg() });
|
||||
situation.setBank({ m_flightgearData.rollDeg, CAngleUnit::deg() });
|
||||
situation.setGroundSpeed({ m_flightgearData.groundspeedKts, CSpeedUnit::kts() });
|
||||
situation.setGroundElevation(CAltitude(m_flightgearData.groundElevation,CAltitude::MeanSeaLevel,CLengthUnit::m()),CAircraftSituation::FromProvider);
|
||||
|
||||
// Updates
|
||||
// Do not update ICAO codes, as this overrides reverse lookups
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace BlackSimPlugin
|
||||
QList<double> enginesN1Percentage; //!< N1 per engine [%]
|
||||
double speedBrakeRatio; //!< Speed break ratio [%]
|
||||
double pressureAltitudeFt; //!< Pressure altitude [inhg]
|
||||
double groundElevation; //!< Ground Elevation [m]
|
||||
};
|
||||
|
||||
//! Flightgear ISimulator implementation
|
||||
|
||||
Reference in New Issue
Block a user