Commit Graph

88 Commits

Author SHA1 Message Date
Lars Toenning
b53b266ded refactor: Decrease base class member visiblity 2024-10-21 20:35:38 +02:00
Lars Toenning
98acf5f58e refactor: Move spline specific verification method to InterpolatorSpline 2024-10-21 20:35:38 +02:00
Lars Toenning
cb7e6c43e2 refactor: Use dynamic lookup with pure virtual methods
This makes it clearer what an IInterpolant and Interpolator must
implemented.
But it should be checked if using virtual here is okay performance-wise.
2024-10-21 20:35:38 +02:00
Lars Toenning
a27c2b3f51 refactor: Move OnGround information to own class 2024-10-21 20:33:21 +02:00
Lars Toenning
ab8b1c8e8c refactor: Remove unused forward declarations
The forward-declared classes are already included directly
2024-10-21 20:33:20 +02:00
Lars Toenning
8604ddf06a refactor: Split InterpolationStatus related classes into separate files 2024-10-21 20:33:20 +02:00
Lars Toenning
3c10a9d9ca refactor: Extend documentation for CInterpolator 2024-10-21 20:33:20 +02:00
Lars Toenning
e8ae835827 refactor: Fix spelling mistake 2024-10-21 20:33:20 +02:00
Lars Toenning
a599cc2792 refactor: Remove clear() method from CInterpolator
clear() was only required by a unittest to execute two tests directly
after another. This can also be done in a cleaner way by creating a new
CInterpolator instead of requiring a separate method for resetting the interpolator.
2024-10-21 20:33:19 +02:00
Lars Toenning
78d0dc4435 refactor: Change variable type of aircraftNumber
The aircraft number should always be positive
2024-10-21 20:33:19 +02:00
Lars Toenning
8c787e59e9 refactor: Cleanup interpolator includes 2024-10-21 20:33:19 +02:00
Lars Toenning
bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00
Lars Toenning
970b7c3650 clang-format src 2023-04-18 16:07:19 +02:00
Mat Sutcliffe
7691e42a5b Fix doxygen warnings
Fixes #188
2023-04-05 18:57:11 +02:00
Mat Sutcliffe
a592bb2bbe Include style 2021-09-18 15:07:49 +01:00
Mat Sutcliffe
b2ae19111f Issue #77 Break cyclic dependencies between CAircraftParts, CAircraftLights, CAircraftSituation classes 2020-12-19 18:50:40 +00:00
Mat Sutcliffe
371c1f4f7c Issue #77 Break cyclic dependency between CLogCategory and numerous classes 2020-12-19 18:50:34 +00:00
Mat Sutcliffe
63e8de8f00 Issue #77 getLogCategories returns a simple QStringList instead of our own class 2020-12-19 18:50:34 +00:00
Mat Sutcliffe
2ae0352e75 [doxygen] Fix broken groupings 2020-08-01 19:48:37 +01:00
Klaus Basan
5f1bd14fcf Ref T773, style 2020-06-12 18:42:31 +01:00
Klaus Basan
009719a7be Ref T681, fixed handling of CG from DB
* consider settings
* remember DB CG data correctly
2019-09-16 22:41:28 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Klaus Basan
4d7ca00324 Ref T421, interpolation log message follow up, deprecated "clampedLog" 2018-11-05 01:39:51 +01:00
Klaus Basan
41685df4ee Ref T421, interpolation log messages in interpolator(s) 2018-11-04 17:42:47 +01:00
Klaus Basan
48d5e0daec Ref T397, interpolation / interpolant fixes
* fixed fillSituationsArray to return correct initial situations
* VERIFY ranges and times to avoid inf/NaN and issues in general
* if invalid situations, continue with last situation
* count invalid situations
2018-11-04 17:42:43 +01:00
Roland Winklmeier
29f464189b Move template in-class function definitions out of class
Keeping them defined in-class caused linker issues with the extern template
declaration in a non-optimized MinGW debug build. Apparently it did not
inline them but instead relied on the extern declaration and expected
them defined somewhere else.
2018-08-31 20:08:14 +02:00
Klaus Basan
9baa10c5f8 Style 2018-07-09 22:30:14 +02:00
Klaus Basan
3f14be6517 Ref T275, Ref T280, parts guessing and interpolating can have different ratios 2018-06-20 00:58:37 +02:00
Klaus Basan
c7482ebc1a Ref T275, use refactored and improved elevation functions in interpolator 2018-06-18 03:04:47 +02:00
Klaus Basan
d1157bb5c6 Ref T275, moved "preset" of elevation to situation class (from interpolator) 2018-06-18 03:04:41 +02:00
Klaus Basan
fe396e19aa Ref T275, interpolator improvements
* flags for same parts/situation status
* transfer elevation (Ref T273) from previous situation
* preset elevation based on network situations if possible
* set elevation info
* function CInterpolator::initInterpolatedSituation
2018-06-13 13:59:59 +02:00
Klaus Basan
c6f3d4e2f2 Ref T270, mark interpolator as unit test
* if we use "recycled" parts, we have to store also the last status
* mark unit test so "recycling" is disabled
* status flag for "reused"
2018-06-13 13:59:46 +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
464c8dfe83 Formatting 2018-05-26 21:19:20 +02:00
Klaus Basan
4ced6b4f97 Formatting 2018-05-18 00:24:58 +02:00
Klaus Basan
0f9b275f52 Allow to mark interpolator for unit tests (which can be used to disable some checks) 2018-05-12 21:40:31 +02:00
Klaus Basan
23dcccc806 Ref T261, adjusted interpolation setup
* removed "IndexEnableGndFlag" as this is actually part of FSD network settings
* renamed to "isForcingVtolInterpolation"
* adjusted interpolator, and UI for setup
2018-05-12 21:40:09 +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
bac3d14d50 Ref T261, interpolator adjustments
* using interface IInterpolant, renamed to CInterpolant for concrete implmentation
* CInterpolatorPBH has itws own file now, is included
* linear interpolator only re-calculates interpolant when needed (same as spline interpolator)
2018-05-08 16:06:51 +02:00
Klaus Basan
2a5261f3f6 Ref T261, interpolator PBH in own file 2018-05-08 16:06:50 +02:00
Klaus Basan
29407d113e Ref T261, encapsulated groundInterpolationFactor
Rational: Less compilation time when need to change
2018-05-08 16:06:48 +02:00
Klaus Basan
7db8823770 Ref T261, interpolator changes
* use CAircraftSituationChange
* recalculate interpolant if situation changed (due to elevation update)
* keep extra info string for debugging
* improved situation checking
2018-05-08 16:06:46 +02:00
Klaus Basan
9fa3e415f5 Ref T260, interpolator deferred init fix. Make sure lambda is not called when interpolator is deleted. 2018-05-08 16:06:37 +02:00
Klaus Basan
cd1ce37ec3 Ref T259, Ref T243 interpolator changes
* interpolators use providers for client/situations/parts/ground elevation
* interpolators do no longer use own situations/parts, but those from provider
* interpolators are no longer QObjects (as it is not needed)
* use gnd flag from situation for gnd interpolation, there is no longer a parts gnd flag interpolation
* guess parts during interpolation
* changed iterators to m_s[i] as it makes clearer which values are used
** the flag is transferred from parts -> situation in airspace monitor
** if the other client already provides and gnd.flag in situation this also works
* adjusted logging
* use providers in unit tests / adjusted tests
* improved situation verification/assert
2018-05-08 16:06:33 +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
333a92ff63 Ref T259, Ref T243 renaming to CInterpolationAndRenderingSetupPerCallsign 2018-04-13 23:36:34 +02:00
Klaus Basan
83b6578e69 Ref T259, Ref T243 use elevation plane for altitude
general idea: by using the plane class, we can set a elevation and then find a better one

* use elevation plane in situation
* adjusted depending classes such as hints, lists
* using setGroundElevationChecked so elevation can be gradually improved
2018-04-05 02:54:28 +02:00
Klaus Basan
0191f35d5a Ref T259, Ref T243 improvements in interpolator
* functions for unit tests (like clear)
* maxParts/Situations
2018-04-05 02:54:10 +02:00
Klaus Basan
e9e0ae1ff4 Ref T241, Ref T243 formatting and minor tweaks
* unified how we write thread_local const
* ASSERTs
* formatting
2018-02-04 08:53:48 +01:00
Klaus Basan
6a2435074c Ref T241, further improved interpolation logging
* all interpolation positions can  be logged (3 for spline, 2 for linear)
* interpolated (log) time, setting to real time (i.e. unadjusted time)
* only set logger values with logger attached
2018-02-04 08:50:55 +01:00