Commit Graph

152 Commits

Author SHA1 Message Date
Klaus Basan
2519241da8 Ref T632, remove invalid callsigns 2019-05-13 11:20:43 +02:00
Klaus Basan
94a5741537 Ref T632, verify empty callsign
THis is the fix:
"if (!simulatedAircraft.hasCallsign()) { continue; } // removed in provider"
2019-05-13 11:20:42 +02:00
Klaus Basan
599064fe6c Use models from centralized model cache
* no copy needed
* cache is synchronized when loading models
2019-05-13 11:20:40 +02:00
Klaus Basan
a553dfc708 Ref T632, minor improvements for no callsign 2019-05-13 11:20:40 +02:00
Mat Sutcliffe
7e25360d3c Ref T603 Different message if xswiftbus version string is empty. 2019-05-13 11:20:32 +02:00
Roland Rossgotterer
ac90b3c069 Replace Q_ASSERT with BLACK_VERIFY 2019-04-11 22:12:07 +01:00
Roland Rossgotterer
6b17f847e9 Fix and improve xswiftbus version mismatch warning 2019-04-11 22:12:03 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
9d1299741e [GFS] Use Pressure at MSL instead of surface
Pressure at surface level was the wrong value. All barometers and
altimeters use pressure reduced to mean sea level. Reading that value
from GFS instead returns much more reasonable values.

ref T537
2019-02-22 20:36:20 +00:00
Roland Rossgotterer
9a7af86a5e Loop over the container itself instead of a temporary value list 2019-02-22 20:35:17 +00:00
Roland Rossgotterer
8df4024bde Regularly update X-Plane simulated aircraft
The simulated aircraft object has been set only once for each X-Plane aircraft as soon as adding to the simulator succeeded. Any updates to transponder codes, modes etc. were missed and never updated.
To make sure we always have the latest information available, we update all known X-Plane aircraft every second in the slow timer tasks.

Manifest Tasks: T502
2019-02-22 20:35:17 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Mat Sutcliffe
6c05c5249d When calling arg() on a QString constructed from a literal, use QStringLiteral. 2019-02-22 20:23:47 +00:00
Klaus Basan
40ae7174a7 Ref T470, detect NULL cg 2018-12-14 19:57:29 +01:00
Klaus Basan
f841d57448 Avoid crash by checking disconnected before requesting elevation 2018-12-11 21:34:14 +01:00
Roland Rossgotterer
74e084c6e8 Compare transponder and not only the transponder code
The last refactoring introduced a bug causing only X-Plane transponder code changes to be detected by swift - transponder modes were ignored.
2018-12-11 17:42:51 +01:00
Klaus Basan
c591728e88 Aircraft ICAO code of own model is wrong
Although the reverse lookup of a model is correct, it's aircraft ICAO code is wrong

Issues found

* in the driver the ICAO code is permanently overridden -> commented out
* there are two contexts, own aircraft and simulator, but only one uses reverse lookup -> now both
* using Qt::QueuedConnection for context -> GUI
2018-12-11 00:51:31 +01:00
Roland Rossgotterer
c27d401e70 Remove SystemBus from XSwiftBus connection options 2018-11-29 20:54:26 +01:00
Roland Rossgotterer
db7ed76bc5 Refactor listening for and connecting to XSwiftBus
- Use common function for Session and P2P connections
- Don't use the DBus service watcher as it did not allow to test in regular intervals
- Add a XSwiftBus version check to X-Plane listener
- Try to initialize and acquire multiplayer planes in checkConnection() already and warn the user if any of those failed. The plugin will be loaded only if everything succeeded.
2018-11-29 20:54:26 +01:00
Roland Rossgotterer
ec8245ea53 [XSwiftBus] Give PQ variables a unit
ref T313
2018-11-29 20:54:26 +01:00
Klaus Basan
64b0ec87b1 Ref T423, changed strategy to force position updates
* force update for "some time", and remove all sent information
* no longer update some cycles, but for some time
* updated FSX/P3D/XPlane drivers
2018-11-16 02:49:52 +01:00
Klaus Basan
2b8e388ba1 Ref T423, force update if simulator was paused or interrupted before
* force full updates for some cycles "m_updateAllRemoteAircraftCycles"
* only use "emitSimulatorCombinedStatus" to emit changed simulator status
* renamed to "finishUpdateRemoteAircraftAndSetStatistics"
* override "forced" in "getInterpolationSetupConsolidated"

This addresses the issue that aircraft appear below ground after moving the aircraft
2018-11-06 01:41:47 +01:00
Klaus Basan
93bcbc0755 Ref T421, function to get interpolation messages from the simulator drivers 2018-11-04 17:42:47 +01:00
Roland Winklmeier
92790f1330 Refactor updateCockpit from X-Plane
X-Plane returns com frequencies in 10 kHz, so we don't have the necessary
precision for the 25 kHz spacing. By using CComSystem::setFrequencyActive
we get the rounding to the system wide spacing for free.
Without that correction we run into system wide issues in code that assumes
the correct frequency spacing is in place.

ref T399
2018-11-04 17:42:42 +01:00
Roland Winklmeier
c72742029b [XSwiftBus] Set transponder info for all rendered aircraft
Without setting the transponder, no TCAS rendering is possible.

ref T374
2018-10-05 17:39:44 +02:00
Roland Winklmeier
fe97276ee8 Set X-Plane major and minor version in simulator details
ref T339
2018-09-17 18:28:23 +02:00
Klaus Basan
7e9f3a6c7f Ref T342, distance of airport can be recalculated 2018-09-12 17:40:38 +02:00
Roland Winklmeier
3804612bed Fix the initial weather request in case last position is null
calculateGreatCircleDistance returns false immediately if any of the
arguments was null.

ref T324
2018-09-12 17:01:51 +02:00
Klaus Basan
68beaa6d9d Ref T312, added checkImpl/check in simulator listeners 2018-08-27 18:58:15 +02:00
Klaus Basan
15500c41db XPlane Clang/PQ integer fixes 2018-08-16 14:44:15 +02:00
Klaus Basan
359d56b6f6 Weather uses null altitude, https://swift-project.slack.com/archives/G7GD2UP9C/p1534378412000100 2018-08-16 14:44:14 +02:00
Roland Winklmeier
05e0480bb4 Move XPlane gnd flag handling from parts to situation
ref T276
2018-08-07 20:40:57 +02:00
Roland Winklmeier
488ff96ce6 Add DBus P2P support to XSwiftBus
ref T291
2018-08-07 20:40:43 +02:00
Klaus Basan
fbfbdedb65 Ref T294, display simulator internals correctly
* view rows not selectable
* added settings to ISimulator
* ISimulator implements initSimulatorInternals() and sets default values
* also display plugin name
* XPlane using initSimulatorInternals()
2018-07-31 01:43:27 +02:00
Klaus Basan
14faf5136a Ref T268, XPlane testing showed: height has an influence on the returned elevation result
* the most accurate value seems to be returned if the height is close to the elevation
* in normal scenarios there is no much difference of the results if 0 is used
* in Lukla (9200ft MSL) the difference between 0 and 9200 is around 1ft
* in the LOWW scenario using 50000ft MSL results in around 3ft too low elevation
2018-07-19 02:52:16 +02:00
Klaus Basan
88098dddf7 Ref T268, allow to log loopback situations
* those are situations reported back from simulator
* and can be logged
2018-07-19 02:52:06 +02:00
Klaus Basan
52513db63f Ref T290, XPlane refactoring
* typo getRemoteAircraftsData -> getRemoteAircraftData (no "s")
* typo getEelevationAtPosition (double "Ee")
* get functions "const"
* added unit for some variables such as latitudeDeg
2018-07-17 19:04:50 +02:00
Klaus Basan
80cee12fdb Ref T246, utility for 1st model set directory
* remove empty enries in directories
* allow to add directory
* detect same directories and avoid duplicates
2018-07-14 19:45:21 +02:00
Klaus Basan
a508ad4ccb Ref T268, check in XPlane driver 2018-07-12 18:29:40 +02:00
Klaus Basan
df869373e8 Ref T268, XPlane driver improvements
* 2 queues, one for pending "to be added" aircraft and one for "adding in progress" (easier timeout detection)
* disconnect DBus when unloading
* check if aircraft "are still in range" before adding
* adding to XPlane only in one place
* data for aircraft can be explicitly request and are requested directly when an aircraft has been added
2018-07-09 22:30:48 +02:00
Klaus Basan
79c1691fdc Ref T268, Xplane driver style/renaming 2018-07-09 22:30:47 +02:00
Klaus Basan
1ba99b5392 Ref T268, XPlane to do not request updates of values "not near ground" 2018-07-09 22:30:44 +02:00
Klaus Basan
ca87784509 Ref T275, remember CG per model string 2018-07-09 22:30:22 +02:00
Klaus Basan
0f931eeeb3 Ref T268, moved changeRemoteAircraftModel/Enabled to CSimulatorCommon and removed duplicated code 2018-06-13 14:00:09 +02:00
Klaus Basan
f3edf14186 Ref T273, Ref T275 XPlane uses simulator common function to skip sending equal parts/situations 2018-06-13 13:59:56 +02:00
Klaus Basan
181ed36f3d Ref T270, interpolator optimization by passing aircraft number
Rational: Except for FS9 we interpolate all aircraft in one loop at the same time. This can cause that some steps are always done at the same time for all aircraft of that loop. By passing the number we can more equally distribute such tasks, avoiding peaks.
2018-06-13 13:59:39 +02:00
Klaus Basan
aa7363dcad Ref T270, Ref T268, plugin common / simulator improvements
* connect with "about to quit"
* added interface declarations
* sim statistics, use common function setStatsRemoteAircraftUpdate and double for average values
2018-06-13 13:59:22 +02:00
Roland Winklmeier
c437c2eabd Simplify the X-Plane traffic plane positions and surfaces API 2018-06-13 13:59:14 +02:00
Roland Winklmeier
33963041cc Implement followAircraft for X-Plane
ref T266
2018-06-13 13:59:13 +02:00
Klaus Basan
8a522b5e6d Ref T270, signal requestedElevation 2018-05-29 00:56:37 +02:00