Commit Graph

70 Commits

Author SHA1 Message Date
Klaus Basan
13ede9fac1 Ref T259, only remove aircraft after data have been used, otherwise a dangling reference causes a crash 2018-04-05 02:52:45 +02:00
Klaus Basan
41109dd761 Ref T259, some adjustments to our latest style
* no private slots
* timers as members
2018-04-05 02:52:43 +02:00
Roland Winklmeier
09de945242 Add experimental X-Plane CG offset fetching
ref T231
2018-04-05 02:52:28 +02:00
Roland Winklmeier
72497fdefc Regularly request remote aircraft data from X-Plane
This includes
* ground elevation
* model offset (to be implemented)

ref T259
2018-04-05 02:52:26 +02:00
Roland Winklmeier
4db0b83310 Move X-Plane interpolation into driver
ref T259
2018-04-05 02:52:20 +02:00
Klaus Basan
897a6f301f Ref T232, aircraft can be re-added or removed via "dot-commands"
* can be used for testing
* utility functions to find inconsistent aircraft states
* reset highlight state
2018-01-30 20:31:59 +01:00
Roland Winklmeier
de4fe44156 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
2018-01-15 22:49:08 +01:00
Mathew Sutcliffe
c5a3db49b0 Request own aircraft info upon connecting to XSwiftBus
Summary:
Ref T83
Also removed an unused parameter of the "own aircraft changed" signal of XSwiftBus.

Reviewers: #swift_developers, rwinklmeier

Reviewed By: #swift_developers, rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Maniphest Tasks: T83

Differential Revision: https://dev.swift-project.org/D63
2017-11-23 22:15:41 +00:00
Mathew Sutcliffe
a7124ec589 Removed unused code. 2017-11-12 13:48:09 +00:00
Mathew Sutcliffe
3523944782 Ref #136 Restored asserts for preconditions in X-Plane driver
now that the precondition violations have been fixed.
2017-10-18 23:24:43 +01:00
Klaus Basan
418d0aa628 Ref T171, Ref T136, removed the remote provider's "remove aircraft part", as it is not used:
* remove is handled by context call logicallyRemoveRemoteAircraft
* so far no need to use the remote provider function
* can be used again whenever needed
2017-10-18 22:58:36 +02:00
Klaus Basan
b6333e69d8 Ref T171, made remote aircraft provider and web service "protected slots" -> "protected"
* 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
2017-10-18 22:58:24 +02:00
Mathew Sutcliffe
f1211d328e Delete QDBusServiceWatcher when unloading X-Plane driver.
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
2017-09-24 19:53:38 +01:00
Mathew Sutcliffe
2387edb5a0 Removed C++14 digit separator as it confuses doxygen.
See https://bugzilla.gnome.org/show_bug.cgi?id=786382
2017-09-24 19:52:54 +01:00
Mathew Sutcliffe
1888367e95 T37 T134 Removed asserts that reflect broken assumptions. 2017-09-24 19:52:53 +01:00
Mathew Sutcliffe
98e0f8c875 T37 T127 Send timestamps to XSwiftBus as separate timestamp and offset
as the offset is needed for reliable interpolation.
2017-09-24 19:52:46 +01:00
Mathew Sutcliffe
05c0d046aa Removed outdated todos. 2017-09-24 19:52:37 +01:00
Klaus Basan
66773d7593 Ref T111, allow to set SELCAL in simulator 2017-09-24 19:51:55 +01:00
Mathew Sutcliffe
bc80fd3bd5 [feature][XPlane] Set own aircraft model string when own aircraft changes.
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
2017-05-14 17:21:39 +01:00
Mathew Sutcliffe
f34c48cf6c T79 Improved log messages. 2017-05-11 16:37:54 +01:00
Mathew Sutcliffe
4a4dea8d4d Rename xbus to xswiftbus
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
2017-05-05 23:07:11 +01:00
Mathew Sutcliffe
3ea9e33e6b refs #937 Resolved clazy warnings: pass-by-value/reference. 2017-04-19 19:31:42 +01:00
Mathew Sutcliffe
488f42b0a1 refs #928 Parse and load OBJ8 CSL packages. 2017-04-19 19:31:33 +01:00
Mathew Sutcliffe
2f02cd30d9 refs #925 XP driver sends parts to xbus, and guesses gear and lights if parts not available. 2017-04-19 19:31:29 +01:00
Roland Winklmeier
aafe211b5c Make simulator listeners safe against multiple starts
refs #909
2017-04-18 00:06:03 +01:00
Klaus Basan
422e6626c8 refs #912, formatting, typos, const 2017-04-18 00:04:37 +01:00
Klaus Basan
304c552872 refs #916, interpolator mode for XP 2017-04-18 00:01:11 +01:00
Mathew Sutcliffe
47369c02d0 refs #852 Fixed wrong unit in X-Plane airport elevation. 2017-02-24 00:18:07 +00:00
Mathew Sutcliffe
2b76b27f97 refs #852 On each position update for aircraft not supporting parts,
X-Plane driver synthesizes a parts update with guessed onGround flag.
2017-02-24 00:18:06 +00:00
Mathew Sutcliffe
c9b1647e72 refs #852 Extend xbus traffic service to maintain a CAircraftPartsList with onGround flags. 2017-02-24 00:18:00 +00:00
Roland Winklmeier
1a6c7fa192 Add control button to activate and deactivate swift weather
- GUI changes
- Context and ISimulator APIs
- Refactored settings and static weather injection in CSimulatorCommon

refs #807
2017-01-10 23:47:39 +00:00
Mathew Sutcliffe
6c36cd202b refs #837 ICoordinateGeodetic::geodeticHeight is a CAltitude. 2017-01-10 23:44:34 +00:00
Mathew Sutcliffe
0beb7faf06 refs #824 Collect and load CSL packages upon connecting to xbus. 2016-12-13 18:33:19 +00:00
Klaus Basan
10d43798b0 refs #811, airports default implementation
* if no sim data are available use reader data
* merge airport data for FSX
* Added "network" in .pro (needed for network classes such as readers)
2016-12-13 19:01:15 +01:00
Mathew Sutcliffe
5080c47288 refs #802 Fixed Clang warnings. 2016-12-13 19:00:47 +01:00
Klaus Basan
4f447cd408 refs #791, further improve reverse lookup
* 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
2016-12-06 09:34:43 +01:00
Klaus Basan
f8c9782da4 refs #789, FSX errors OPERATION_INVALID and EXCEPTION_UNRECOGNIZED_ID
* 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
2016-12-06 09:34:20 +01:00
Klaus Basan
bf8198e2c2 refs #768, misc adjustments
* 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
2016-10-17 14:34:15 +01:00
Roland Winklmeier
fb3df51013 Move aircraft matching out of simulator plugins
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
2016-09-19 16:30:05 +02:00
Roland Winklmeier
2040ff21c5 Physically remove only physically rendered aircrafts
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.
2016-09-19 16:18:50 +02:00
Roland Winklmeier
4e6c4a076a Delay initial weather injection until simulator is connected
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.
2016-08-26 21:05:07 +01:00
Roland Winklmeier
82324d3246 Fix injection of static weather scenarios 2016-08-26 21:04:32 +01:00
Klaus Basan
86d85c6b60 refs #707, removed originator from some signatures
* not used in remote aircraft provider
* adjusted all using interfaces
2016-07-14 18:49:15 +02:00
Roland Winklmeier
10c4fa920d Add weather scenario settings to simulator plugins
refs #663
2016-06-17 10:46:31 +02:00
Mathew Sutcliffe
9666c02adc refs #666, #574 CSimulatorXPlane: fixed default model string to use the new schema. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
4c2bc31975 refs #666 XBus expects timestamp relative to current time, in case core and sim PCs run with different clock times. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
37b4b81b9b refs #666 XBus receives aircraft situations with timestamps. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
9bef6854ca Caches: rename "get" to "getThreadLocal" and rename "getCopy" to get. 2016-06-08 18:21:01 +02:00
Klaus Basan
54b1234f7f refs #649, refs #658 fixed includes to new subfolders "db"
some style changes in same step
2016-06-08 18:20:23 +02:00
Roland Winklmeier
602beb0da2 Remove obsolete plugin storage
Plugin storage was used before the value cache existed. With the
value cache this is no longer used and can be removed.

refs #660
2016-05-24 16:45:14 +02:00