mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 00:25:35 +08:00
Fix sending the correct pressure altitude for a pilot position
* Before this commit, only the true altitude was known for an aircraft situation. The pressure altitude was not available anywhere yet. * This caused a wrong altitude in radar clients. * We fix this reading the pressure altitude from the simulators and set it in the own aircraft situation. * MS Flight Simulators have the pressure altitude in the APIs available. * For X-Plane and emulated simulator, we need to calculate it from the pressure at sea level. * Finally, we use the new available pressure altitude to send it to the FSD server. Maniphest Tasks: Ref T223
This commit is contained in:
committed by
Klaus Basan
parent
51a90a9a71
commit
de4fe44156
@@ -194,6 +194,9 @@ namespace XSwiftBus
|
||||
//! Get whether taxi lights are on
|
||||
bool getTaxiLightsOn() const { return m_taxiLightsOn.get(); }
|
||||
|
||||
//! Get barometric pressure at sea level in inches of mercury.
|
||||
double getQNH() const { return m_qnhInhg.get(); }
|
||||
|
||||
//! Set the current COM1 active frequency in kHz
|
||||
void setCom1Active(int freq) { m_com1Active.set(freq / 10); }
|
||||
|
||||
@@ -275,6 +278,7 @@ namespace XSwiftBus
|
||||
DataRef<xplane::data::sim::aircraft::engine::acf_num_engines> m_numberOfEngines;
|
||||
ArrayDataRef<xplane::data::sim::flightmodel::engine::ENGN_N1_> m_enginesN1Percentage;
|
||||
DataRef<xplane::data::sim::flightmodel2::controls::speedbrake_ratio> m_speedBrakeRatio;
|
||||
DataRef<xplane::data::sim::weather::barometer_sealevel_inhg> m_qnhInhg;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user