Commit Graph

64 Commits

Author SHA1 Message Date
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
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
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
03af49348b Ref T259, Ref T243 formatting 2018-04-05 02:53:55 +02:00
Klaus Basan
5d155fb59c Ref T243, adjust offset for timestamp based objects when keeping the order 2018-02-07 02:41:46 +01:00
Klaus Basan
5a15e74f63 Ref T241, misc. logger improvements
* string formatting of logger info
* display longer in simulator
* better formatting of message
2018-02-05 03:45:25 +01:00
Klaus Basan
7c9f2e9aa2 Ref T243, verify parts/positions order (latest first) 2018-02-04 08:59:54 +01:00
Klaus Basan
d903a20f5e Ref T243, use offset times from network vatlib
* no need to check on own situations if the offset time is already set
* use push_frontKeepLatestFirst to ensure order (latest parts/situations first)
2018-02-04 08:59:20 +01:00
Klaus Basan
7e0c1033ba Ref T243, use offset times from network vatlib
* changed network config received signature (now with offset time)
* removed code to fix offset time, no longer needed
* using push_frontKeepLatestAdjustedFirst guaranteeing correct order
2018-02-04 08:57:32 +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
69e2ed6efe Ref T231, Ref T236, Ref T238 improvements based on Unit test
* check for a correct callsign (assert)
* set callsign if missing (fallback)
* resetLastInterpolation - null last inperpolation
2018-01-30 20:35:09 +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
cd5fdfaf14 Ref T231, Ref T236, Ref T238 improved logging of situation/parts logging
* "dot" commands to log parts/situations
* log can also be displayed in simulator (if simulator can display text messages)
* fixed missings locks for m_interpolationRenderingSetup
* more detailed output
* renamings
* using hints in log
2018-01-30 20:35:05 +01:00
Klaus Basan
321cb8e563 Ref T236, transfer elevation to newer situations for future reference.
The elevation will be transferred within a given radius
2018-01-30 20:32:06 +01:00
Klaus Basan
c9ad99df2e Ref T238, logParts and getInterpolatedParts can be const 2018-01-30 20:31:53 +01:00
Klaus Basan
00d1315aac Ref T236, getGroundElevation can be used with and without provider 2018-01-30 20:31:47 +01:00
Klaus Basan
28346fbbdc Ref T231, set elevation as default for current situation 2018-01-30 20:31:38 +01:00
Klaus Basan
2da4b2719a Ref T231, fix for hovering aircraft
If there is no ground flag:

* only use CG/ground elevation close to ground
* and for AGL values clearly not on ground
* otherwise guess by speed ....
2018-01-30 20:30:43 +01:00
Klaus Basan
0991f20f7d Ref T229, adjusted renamings because of CInterpolationStatus changes 2018-01-30 20:29:48 +01:00
Klaus Basan
75c2eec3d1 Ref T229, adjusted CInterpolationStatus
* The `changed`flag in interpolation was faulty.
* It was able to determine if the value was really changed by interpolation, which was the same as indicating that the value was interpolated.
* But there were cases, when the value was interpolated and not changed.
* Also there were cases when the value was changed, but not interpolated.
2018-01-30 20:29:46 +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
e0d9fb9df1 Ref T185 Enable spline interpolation with only one position update,
by just copying it three times, so planes can be rendered without waiting for more updates.
2017-11-12 13:48:07 +00:00
Klaus Basan
46a7b67ae5 Ref T180, interpolator status can check validity of situation and provide an info string 2017-11-09 04:42:10 +01:00
Klaus Basan
e5261c3e99 Ref T180, added utility function getInterpolatorInfo() allowing to log some info about interpolator 2017-11-04 21:44:42 +01:00
Klaus Basan
584fe51161 Ref T171, set object name for driver 2017-10-18 22:58:49 +02:00
Klaus Basan
c3f3f266d0 Ref T171, interpolator / interpolation logger formatting 2017-10-18 22:58:46 +02:00
Mathew Sutcliffe
f9ae3efaa3 T37 Avoid division by zero in case time offset is zero. 2017-09-24 19:52:49 +01:00
Mathew Sutcliffe
6a6f98ebd1 refs #896 Renaming members. 2017-04-17 23:58:17 +01:00
Klaus Basan
78f3ef375f refs #896, added logging of CG and old/new position 2017-04-17 23:58:13 +01:00
Klaus Basan
a27717cf8b refs #895, also log when parts are empty
* added empty flag
* move logging into own function (because it is called in multiple places now)
2017-04-17 23:58:07 +01:00
Klaus Basan
5e19431d2b Formatting, comments
#895
2017-04-17 23:58:04 +01:00
Mathew Sutcliffe
b38d668944 refs #852, #863, #896 Fixed time offset of parts from commit:74e93525 that was broken by commit:7a71d652. 2017-04-17 23:57:40 +01:00
Mathew Sutcliffe
598733d521 refs #863 Fixed a bug where a plane would only start rendering when it first starts moving. 2017-02-24 15:22:35 +00: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
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