Commit Graph

96 Commits

Author SHA1 Message Date
Klaus Basan
0808cdb223 Ref T261, further unify interpolator handling
* return interpolation results parts/situation in one step
* base class init for each interpolation step, less redundant code
* removed old interpolation/parts function
* adjusted unit tests and simulator objects (such as SimObject)
2018-05-08 16:06:52 +02:00
Klaus Basan
3d2a74a652 Ref T261, interpolator mode is now part of setup
* added attribute in setup
* adjusted UI
* adjusted interpolator / simulator functions
2018-05-08 16:06:49 +02:00
Klaus Basan
3031e5b648 Ref T261, set client provider in simulator
Needed to obtain client capabilities
2018-05-08 16:06:48 +02:00
Klaus Basan
1f3e5c6abf Formatting, minor tweaks 2018-05-08 16:06:43 +02:00
Klaus Basan
94a334ad75 Ref T259, Ref T243 use "getInterpolatedOrGuessedParts" in XPlane 2018-05-08 16:06:36 +02:00
Klaus Basan
6061a61d50 Ref T260, changed elevation handling in provider, simulator and FSX common driver
* split functions, added findClosestElevationWithinRangeOrRequest
* obtain elevation ids (separate ids are easier to track)
* also added experimental "physicallyAddAITerrainProbe" (FSX) for the FSX elevation probing
* callback / signal when requested elevation is received (async)
2018-05-08 16:06:35 +02:00
Klaus Basan
f1faeef84a Ref T259, Ref T243 added functions to use guessed parts in
* sim object
* XPlane aircraft
* forward aircraft model to interpolator for guessing
2018-05-08 16:06:32 +02:00
Roland Winklmeier
6a8ae67e06 [xswiftbus] Make xswiftbus completely Qt free 2018-05-08 16:06:30 +02:00
Roland Winklmeier
b278d9ee2f Group own aircraft DBus calls together
Previously all own aircraft values were request via single DBus calls.
Since DBus allows up to 8 values in its reply, use this mechanism
to group the requests and reduce the amount of single calls.
2018-05-08 16:06:29 +02:00
Klaus Basan
225d05d22f Ref T259, Ref T243 prepared sim.env.provider to request elevations 2018-05-04 23:03:28 +02:00
Klaus Basan
52dd7a754c Ref T259, Ref T243 access to last interpolated situation to check if near ground 2018-05-04 23:03:08 +02:00
Klaus Basan
a7f1e15f39 Ref T259, Ref T243 pass the providers along the hierarchy 2018-04-13 23:37:49 +02:00
Roland Winklmeier
e1538573fe Remove old xswiftbus interpolator code
ref T259
2018-04-13 23:37:45 +02:00
Klaus Basan
9abc57bb3d Ref T259, Ref T243 remove aircraft parts and situations from interpolator
* no longer using the add parts/situations signals
* will use the remote aircraft provider parts directly

Result: all parts/situations are stored only once in memory and in one single place
2018-04-13 23:37:37 +02:00
Klaus Basan
4248c1b689 Ref T259, Ref T243 improved utility function to store elevations in multiple providers 2018-04-13 23:37:36 +02:00
Klaus Basan
3f9ec92fb4 Ref T259, Ref T243 removed guessing from sim classes 2018-04-13 23:37:22 +02:00
Klaus Basan
0c06ac26f7 Ref T259, Ref T243 removed interpolation hints
* no longer needed with providers in that form
* pure refactoring commit, just guarantees compilation
* already minor adjustments to use providers
2018-04-13 23:37:18 +02:00
Klaus Basan
06b07ac4c6 Formatting 2018-04-13 23:36:58 +02:00
Klaus Basan
b8de29201a Ref T259, Ref T243 adjusted simulator classes to use new setup provider 2018-04-13 23:36:42 +02:00
Klaus Basan
4b7237ce1b Ref T259, Ref T243 adjusted providers to use common base classes 2018-04-06 02:56:57 +02:00
Klaus Basan
3346a92b56 Ref T259, Ref T243 simulator environment provider
* access to elevation
* future: more data such as airport info
2018-04-05 02:54:32 +02:00
Klaus Basan
8021cf76fd Ref T259, Ref T243 formatting 2018-04-05 02:54:30 +02:00
Klaus Basan
03af49348b Ref T259, Ref T243 formatting 2018-04-05 02:53:55 +02:00
Roland Winklmeier
d4e4cc2dad Always use cyan color for X-Plane messages 2018-04-05 02:53:15 +02:00
Klaus Basan
9517ce7d7c Ref T259, formatting 2018-04-05 02:52:50 +02:00
Klaus Basan
34502b6b76 Ref T259, renamed CXPlaneMPAircrafts to CXPlaneMPAircraftObjects
* there is no plural for aircraft
* so the same style as for simObjects was used
2018-04-05 02:52:48 +02:00
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