Commit Graph

39 Commits

Author SHA1 Message Date
Roland Winklmeier
aafe211b5c Make simulator listeners safe against multiple starts
refs #909
2017-04-18 00:06:03 +01:00
Klaus Basan
e2849f171e refs #916, interpolator mode for FS9 2017-04-18 00:01:07 +01:00
Klaus Basan
e2b573b850 refs #891, formatting 2017-04-17 23:57:10 +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
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
Klaus Basan
68dccbefa6 Formatting, renaming, Doxygen, minor UI adjustments 2017-02-24 00:18:51 +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
Klaus Basan
4f1dc00d67 refs #848, check flags for FSUIPC parts before using them 2017-01-10 23:46:22 +00:00
Klaus Basan
667009c85e refs #840, moved interpolator classes into Simulation namespace 2017-01-10 23:45:27 +00:00
Klaus Basan
534b9fb09e refs #840, style and const-correctness 2017-01-10 23:45:24 +00:00
Klaus Basan
47b395f6b5 refs #808, set internals object for FS9
(only basic code, needs to be completed)
2016-12-13 19:01:02 +01:00
Klaus Basan
94d6b8d6b8 refs #789, improvements to try to solve FSX issue in driver
* more asserts to find issues
* limit number of exceptions displayed
* reset() function (there was an issue with not cleaned up values)
* using CSimConnectObjects and adjustments for the previous changes
2016-12-06 09:47:07 +01:00
Mathew Sutcliffe
e25785d09b Fixed wrong CLogMessage constructor being used
nullptr was being implicitly converted to a null C-style string
via the initializer_list constructor of CLogCategoryList.

refs #790
2016-12-06 09:46:52 +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
6f5193a74f [FS9] Read and update own aircraft model via FSUIPC
FS9 plugin did not detect own aircraft model under all circumstances.
FS9 does not initially send it when connecting - only
during initial selection and if it is changed later. In order
to get the initial model if swift is started while FS9 was already
running, read it regularly from FSUIPC.
2016-12-06 09:46:46 +01:00
Roland Winklmeier
ea561cf723 Warn in case pitch value from simulator is out of limits
refs #790
2016-12-06 09:46:43 +01:00
Roland Winklmeier
eb58450e8c Remove unnecessary limit checking
A signed 10 bit integer has a range of [-512, +511]. After applying
the multiplicator, neither pitch nor bank will every be outside of
those ranges.

refs #790
2016-12-06 09:46:42 +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
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
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
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
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
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
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
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
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
96189f530b Fixed typo setGroundSpeed 2016-05-07 20:11:50 +02:00
Roland Winklmeier
781707fb7e Simulator driver fetches and injects weather from weather manager 2016-04-10 16:18:55 +02:00
Roland Winklmeier
dae31a1986 Use CWeatherManager as weathergrid provider in simulator plugins
refs #612
2016-04-10 16:13:58 +02:00
Roland Winklmeier
d379f14133 Introduce build config template buildconfig.h.in
refs #625
2016-03-31 17:12:01 +02:00
Roland Winklmeier
99ab20bcc5 Inject global weather grid to Flight Simulators via FSUIPC
In the short term FSUIPC is used for all MSFS simulators, but in the
mid term this will be superceded by the Simconnect Weather API.

refs #579
2016-03-02 23:04: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
ba4b4dbf95 Move conversion functions to local source files
refs #564
2016-01-04 15:54:01 +01:00
Roland Winklmeier
9960431d01 Move global Fs9 variables into CSimulatorFs9Factory
Global variables are always a bad idea since the order of destruction
is unknown and can cause undefined behaviour. In this case the
global shared pointer can be destroyed before CSimulatorFs9Factory which
relies on it.

refs #546
2015-12-17 19:51:16 +01:00
Roland Winklmeier
2ff0c9fa86 Fix Windows and OSX includes 2015-11-22 18:45:25 +01:00
Michał Garapich
1b06e15b61 refs #510 Remove underscores from all the source file names 2015-11-22 12:53:09 +01:00