* 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
* remove is handled by context call logicallyRemoveRemoteAircraft
* so far no need to use the remote provider function
* can be used again whenever needed
* Unlike in other cases, the remote aircraft provider slots are also very frequently called. So besides "style", it might be also useful here to avoid the extra MOC layers.
* Also renamed 2 web service signals and made web service connections Qt::QueuedConnection
Summary:
When unloading a sim driver, first its threads are killed, then the driver object is destroyed.
This means that when the `QDBusServiceWatcher` child object is destroyed, it deadlocks waiting for a thread that was already killed (T147).
This change causes the `QDBusServiceWatcher` to be deleted before the driver is unloaded.
Reviewers: #swift_pilot_client, kbasan, rwinklmeier
Reviewed By: #swift_pilot_client, kbasan, rwinklmeier
Subscribers: kbasan, jenkins
Tags: #swift_pilot_client
Differential Revision: https://dev.swift-project.org/D50
Summary:
Refactored parts of CAircraftModelLoaderXPlane::parseFlyableAirplanes into static method extractAcfProperties that can be called by xswiftbus.
Used extractAcfProperties in xswiftbus to provide the model string to the driver. Implemented CSimulatorXPlane::ps_emitOwnAircraftModelChanged.
Implements T74.
Reviewers: rwinklmeier
Reviewed By: rwinklmeier
Subscribers: jenkins
Tags: #swift_pilot_client
Differential Revision: https://dev.swift-project.org/D23
Summary:
I wanted to rename xbus because its relation to //swift// is not immediately clear from the name.
xswiftbus seems reasonable.
Reviewers: #swift_pilot_client, kbasan
Reviewed By: kbasan
Subscribers: kbasan, jenkins
Tags: #swift_pilot_client
Differential Revision: https://dev.swift-project.org/D14
* utility function if web data are already available
* moved setOwnAircraftModel as reverseLookupAndUpdateOwnAircraftModel to CSimulatorCommon
* reverseLookupAndUpdateOwnAircraftModel also handles async lookup when data are not yet available
* removed context ps_allSwiftWebDataRead reverse lookup, done in CSimulatorCommon now
* only emit aircraft as rendered when object id is received, not before
* added CSimualtedAircraft to CSimConnectObject (so it can be used as signal argument)
* some utility functions to get callsign/simobject by id
* changed signature of ownAircraftModelChanged to model
* added function for a reverse lookup of a model (string->model) and use it when model changed
* renamed function to updateByLocalFileNames
All model matching will be done simulator independent in
CContextSimulator. The simulator specific part is kept in the model
set.
This also caused the signal modelMatchingCompleted to be renamed to
aircraftRenderingChanged, since the name wasn't accurate anymore.
Both getInstalledModels(), getInstalledModelsCount() and iconForModel()
were removed from the ISimulator interface.
refs #765
Physically removing an aircraft which was not yet rendered or known is
undefined behavior.
In this particular case, adding an aircraft the first time caused
its model to be updated, which called slot
ISimulator::changeRemoteAircraftModel, trying to remove an aircraft
which was not yet added and adding it again. This ends up
in an endless loop.
Up to know, the initial weather injection was done in the constructor
of ISimulator implementation. This was to early, since in the best case
the injection was not doing anything and in the worst case, crashed
the application because the plugin wasn't ready yet.
This change also replaces ps_reloadSettings with a specific non-slot
version to avoid code duplication.