Commit Graph

43 Commits

Author SHA1 Message Date
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
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
6bafb74000 refactor: Add comment for interpolatePositionAndAltitude() 2024-10-20 19:58:37 +02:00
Lars Toenning
761be14e1a refactor: Clarify names of members of CInterpolatorPbh 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
Lars Toenning
72ac4e6b47 Fix doxygen warnings
Fixes #188
2023-04-05 18:59:41 +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
57d32da826 Use nested namespaces (C++17 feature) 2021-09-18 15:07:48 +01:00
Mat Sutcliffe
2ae0352e75 [doxygen] Fix broken groupings 2020-08-01 19:48:37 +01:00
Klaus Basan
e21dab0605 Ref T773, if possible skip update of situations with elevation in interpolator 2020-06-12 18:42:34 +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
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
Klaus Basan
dec0b12ea2 Ref T397, checks on vector to find root cause NaN/inf issue
* sometimes very large numbers (xxE38) in vector
* sometimes vectors which look correct, but exceed [-1,1]
2018-11-04 17:42:40 +01: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
6e249aa15d Win x64 compile warning fix 2018-05-12 21:40:11 +02:00
Klaus Basan
6d105b9665 Ref T261, make sure the unit is correct in spline altitude interpolation
See slack discussion here https://swift-project.slack.com/archives/G7GD2UP9C/p1525605407000025
2018-05-08 16:06:53 +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
6a2f76f4d7 Ref T261, interpolate (spline) from last interpolated situation -> new situation whenever interpolant is recreated.
Prefill functions for "m_s" values.
2018-05-08 16:06:46 +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
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
Roland Winklmeier
b28fb0e154 Export nested CInterpolatorSpline classes 2018-04-13 23:37:46 +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
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
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
8d351d8279 refs #863 Added cubic spline interpolator. 2017-02-24 15:22:31 +00:00