Commit Graph

41 Commits

Author SHA1 Message Date
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
be2c756c8c refactor: Add interface for PBH interpolators 2024-10-21 20:35:38 +02:00
Lars Toenning
3bc2d4062c refactor: Rename CInterpolatorPbh to CInterpolatorLinearPbh 2024-10-21 20:33:22 +02:00
Lars Toenning
2f3e4fee1e refactor: Move PBH interpolator to inidivdual Interpolants
This allows each interpolant to specify on its own which PBH
interpolator should be used. Currently only the linear PBH interpolator
is available, but another PBH interpolator will be added for velocity.

This removes some protected data from the IInterpolator interface as well,
which conforms to C++ Core Guideline C.113 ("Avoid protected data").
2024-10-21 20:33:22 +02:00
Lars Toenning
2cd88fa493 refactor: Simplify interpolatePositionAndAltitude method 2024-10-21 20:33:22 +02:00
Lars Toenning
8253b73db2 refactor: Split position/altitude and groundfactor interpolation 2024-10-21 20:33:21 +02:00
Lars Toenning
8c787e59e9 refactor: Cleanup interpolator includes 2024-10-21 20:33:19 +02:00
Lars Toenning
1a6d7fba28 refactor: Clarify variable names in linear interpolator 2024-10-21 20:33:19 +02:00
Lars Toenning
6bafb74000 refactor: Add comment for interpolatePositionAndAltitude() 2024-10-20 19:58:37 +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
Klaus Basan
da8e504d67 Ref T668, minor style changes and improvemments 2019-05-23 13:00:26 +02:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Winklmeier
4387c3b433 Fix missing override keyword 2018-10-05 17:39:58 +02:00
Roland Winklmeier
5e38936fd2 Fix weak vtables 2018-08-25 22:12:06 +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
5243682124 Ref T260, interpolator improvements
* use last interpolated situation when recalculating interpolant
* flag if interpolation factor is to be calculated, or guessed
2018-05-08 16:06:41 +02:00
Klaus Basan
302411e056 Ref T260, remember timestamp for last situation changed
* skip ground elevation updates if not near ground
* function no longer const
* renamings
2018-05-08 16:06:36 +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
78711487a6 Ref T241, moved inner logger classes out CInterpolationLogger
Reason: More options, such as forward declaration
2018-02-04 09:00:23 +01:00
Klaus Basan
f99e82ac24 Ref T243, track the interpolated time ("real time" of interpolated situation)
* keep that time in interpolant
* set it for current position
* some comments and renamings
2018-02-04 08:53:45 +01:00
Klaus Basan
0a06ad223f Ref T231, Ref T236, Ref T238 improvements of interpolator
* keep last interpolated sitation, removed m_isFirstInterpolation
* allow to obtain the old/new situation
* transfer of elevations to newer situations
2018-01-30 20:35:07 +01:00
Klaus Basan
6d5509890b Ref T238, moved spline x,y,z ... values to interpolant
* only interpolant needs those values
* encapsulated in struct PosArray
* Interpolant needs no reference to interpolator (anymore)
* const CInterpolatorPbh &pbh()
2018-01-30 20:32:03 +01:00
Klaus Basan
c23fe86f7f Ref T219, changed or removed some log category functions
* removed unused
* used standard "static const CLogCategoryList &getLogCategories()" patten
2018-01-14 18:46:04 +01:00
Mathew Sutcliffe
6a6f98ebd1 refs #896 Renaming members. 2017-04-17 23:58:17 +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
4cc5643340 refs #863 Further decomposed interpolator into granularly replaceable strategy methods. 2017-02-24 15:22:30 +00:00
Mathew Sutcliffe
aad4cb5e88 refs #863 Factor out code not specific to linear interpolation into the base class. 2017-02-24 15:22:28 +00:00
Mathew Sutcliffe
c0f163589d refs #863 Simplification. 2017-02-24 15:22:27 +00:00
Mathew Sutcliffe
9c918b8799 refs #863 Interpolator inheritance based on CRTP rather than virtual methods. 2017-02-24 15:22:26 +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
af15929b30 refs #865, allow to enable interpolator/parts logging
* removed debug messages from interpolator
* added callsign to getInterpolatedParts / getInterpolatedSituation signatures
* config for logging via CInterpolationAndRenderingSetup::addCallsignToLog etc.
2017-02-24 00:18:56 +00:00
Klaus Basan
667009c85e refs #840, moved interpolator classes into Simulation namespace 2017-01-10 23:45:27 +00:00