Commit Graph

48 Commits

Author SHA1 Message Date
Klaus Basan
8f5e24fe0b [FS9] Preparation for sending parts
* function sendMultiplayerPositionAndPartsFromInterpolation sending parts and positions
* bogus function MPParam aircraftPartsToFS9 (needs to be implemented)
* changed to sendMultiplayerParts(const CAircraftParts &parts) - like for positions
* fixed some smaller bugs
2020-06-12 18:42:51 +01:00
Klaus Basan
41f28ea858 [FS9] Fixes
* guards like "if (!m_fs9Host.data()) return"
* bogus function "sendMultiplayerParts" (at least ot have it in place)
* fixed "testSendSituationAndParts"
2020-06-12 18:42:51 +01:00
Klaus Basan
a3f646a792 [FS9] Function for at least halfway correct engine type 2020-06-12 18:42:46 +01:00
Klaus Basan
a0b8fbd158 [FS9] Style 2020-06-12 18:42:45 +01:00
Roland Rossgotterer
f60a44ea1e [FS9] Fix double deletion of CFs9Host
CFs9Host was guarded by a QSharedPointer plus it had a QObject parent.
2020-06-12 18:42:29 +01:00
Roland Rossgotterer
b7c2775ea2 [FS9] Let IDirectPlay8Client::Connect process request asynchronously 2020-01-07 19:57:23 +00:00
Klaus Basan
22d8b52fe8 [FS9] Minor style fixes 2020-01-07 19:57:20 +00:00
Klaus Basan
441ca41ee3 [FS9] Log. messages 2020-01-07 19:46:18 +00:00
Klaus Basan
f80e093a0a Ref T717, function to send parts/situation for testing and in the model browser 2019-09-16 22:41:37 +01:00
Klaus Basan
daeea07090 Ref T683, style 2019-09-16 22:39:49 +01:00
Roland Rossgotterer
99bcee87aa [FS9] Properly set onground flag when converting situation to FS9 2019-05-13 11:21:04 +02:00
Roland Rossgotterer
464528da9a [FS9] Send position and params update right after client is connected 2019-04-11 22:11:51 +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
d6d2c0cc80 [FS9] Stop using Fs9Host and Fs9Client as CContinuousWorkers
Both were continuous workers since a blocking IDirectPlay8Peer::SendTo()
method was used. Since we use the default async method now, we don't need
the threaded implementation any longer. It still could happen that GUI
blocks for too long, but that would happen also for other simulator drivers.

ref T433
2019-02-22 20:36:21 +00: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
4ff531c6c4 Fixed CLANG warnings for FS9 2018-11-04 17:43:06 +01:00
Klaus Basan
93bcbc0755 Ref T421, function to get interpolation messages from the simulator drivers 2018-11-04 17:42:47 +01: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
2ae8f5b03f Ref T270, added CSimulatorPluginCommon as base class in driver project
* unlike BlackCore::CSimulatorCommon we can add also UI aspects here
* used by emulated driver, XP and the FS series
2018-05-18 00:25:11 +02:00
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
a7f1e15f39 Ref T259, Ref T243 pass the providers along the hierarchy 2018-04-13 23:37:49 +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
b8de29201a Ref T259, Ref T243 adjusted simulator classes to use new setup provider 2018-04-13 23:36:42 +02:00
Klaus Basan
fae5e6ac0a Ref T229, FS9 and XPlane adjustments for changed CInterpolationStatus
Ref T207, maybe MS should review the XP part
2018-01-30 20:29:56 +01:00
Klaus Basan
61a23d700b Ref T171, driver formatting 2017-10-18 22:58:22 +02:00
Roland Winklmeier
f0bfad40b7 Remove outdated todos
Summary: This commits removes todos which are done or obsolete.

Reviewers: kbasan, msutcliffe

Reviewed By: kbasan

Differential Revision: https://dev.swift-project.org/D6
2017-05-05 22:40:01 +01:00
Mathew Sutcliffe
04ddd3bfa5 refs #863 Move interpolator logging into a separate class.
A single logger instance can be shared between multiple interpolator instances.
2017-02-24 15:22:34 +00:00
Mathew Sutcliffe
e67b5fccc4 refs #863 Change callsign parameter to be a member instead. 2017-02-24 15:22:32 +00:00
Mathew Sutcliffe
1c2533f5d2 refs #863 Moved nested status classes to namespace scope. 2017-02-24 15:22:25 +00:00
Mathew Sutcliffe
a167cc8e43 refs #863 Each aircraft gets its own interpolator instance,
so each one can cache calculations from one frame to the next.
The recent situations and parts are members of the interpolator.
2017-02-24 15:22:22 +00:00
Mathew Sutcliffe
2181702c5c refs #863 Change interpolation setup member to be a method parameter instead. 2017-02-24 15:22:21 +00:00
Klaus Basan
62d4a94106 refs #865, further improved logging
* set log flag in hints, so no lock for each aircraft is needed
* as a result log functions have a bool log parameter now
* highlight situation and parts changed
2017-02-24 00:19:18 +00:00
Klaus Basan
38585d10b2 refs #865, hints get ground elevation from provider or from set value
* using CAltitude for elevation provider
* null() for CAltitude
* formatting of members
* fixme in fs9 client
2017-02-24 00:18:40 +00:00
Klaus Basan
667009c85e refs #840, moved interpolator classes into Simulation namespace 2017-01-10 23:45:27 +00:00
Klaus Basan
46fafde7a0 refs #840, add support for interpolation hints 2017-01-10 23:45:25 +00:00
Klaus Basan
534b9fb09e refs #840, style and const-correctness 2017-01-10 23:45:24 +00:00
Klaus Basan
9deedf1e10 refs #789, improvements when addressing FSX driver issue
* added new utility funtion is model list / aircraft list
* added setters/getters for CSimConnectObject
* added setters/getters for InterpolationStatus / PartsStatus
* added CSimConnectObjects (better encapsulation)
2016-12-06 09:47:04 +01:00
Mathew Sutcliffe
b5dfd15d66 When dealing with pitch and bank as signed ints, it is desirable to
round down, rather than toward zero, to get a linear distribution.

refs #790
2016-12-06 09:46:51 +01:00
Roland Winklmeier
55b19d2f74 [FS9] Move MPChangePlayerPlane sending into its own member function 2016-12-06 09:46:45 +01:00
Roland Winklmeier
a13f7eb1d4 [FS9] Add missing null termination when serializing QStrings
The produced QByteArray was missing the null terminating character,
since QByteArray::append() only added up to and not including '\0'.
This was also the reason why sometimes planes did not change their
aircraft models properly.
2016-12-06 09:46:44 +01:00
Roland Winklmeier
7f90652b2f Use bitwise negation operator to invert integer pitch and bank angles
refs #790
2016-12-06 09:46:41 +01:00
Roland Winklmeier
42737faf2c Fix wrong pitch and bank value interpolation
Pitch and bank angle in CAircraftSituation are according to the
common aeronautical convention:
* Bank in degrees, positive = roll right
* Pitch in degrees, positive = pitch up

Microsoft Flight Simulator is using inverted angles, which was incorrectly
adjusted in the interpolator. This caused wrong values for X-Plane.
This angle correction is now moved into the MSFS specific plugins.
Additionally, so far the pitch and bank angles from own aircraft were
not yet corrected for MSFS. So we did send wrong values to the network.

refs #790
2016-12-06 09:34:24 +01:00
Mathew Sutcliffe
7ae453b532 refs #666 Moved interpolator to BlackMisc so xbus doesn't need to link BlackCore. 2016-06-08 23:54:13 +01:00
Roland Winklmeier
a7e74ea64a Move DirectPlay log function into directplayerror.h/cpp
refs #564
2016-01-05 14:10:45 +01:00
Roland Winklmeier
41da652b96 Increase usage of safe delete and release templates
refs #564
2016-01-05 14:10:38 +01:00
Roland Winklmeier
4d6c92e6c8 Move DirectPlay templates into directplayutils.h
refs #564
2016-01-05 14:10:30 +01:00
Roland Winklmeier
ba4b4dbf95 Move conversion functions to local source files
refs #564
2016-01-04 15:54:01 +01:00
Michał Garapich
1b06e15b61 refs #510 Remove underscores from all the source file names 2015-11-22 12:53:09 +01:00