When flying in shared cockpit mode, both pilots log into the network.
One as pilot to be visible to ATC and other pilots. The other one as
observer. For the observing user, the pilots aircraft needs to be filtered.
Filter algorithm is using the same schema as vPilot does.
ref T427
This is an intermediate step to have smaller unit tests. It is a trade off
between having many many test executables compared to a few bigger ones. But
this comes a lot closer to what QtTest is meant to be used.
Ref T309, found that QDateTime::fromString returns a QDateTime object with local timestamp. Using a optimized version returns UTC objects now.
- The bug was found writing a unit test for Ref T308
- Slack: https://swift-project.slack.com/archives/G7GD2UP9C/p1534848725000100
Remark: Sometimes we have up to 25% overhead on MacOS
QDEBUG :BlackMiscTest::CTestAircraftSituation::sortHint() MacOS: "yes"
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access without hint 48 ms
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access with hint 60 ms
QDEBUG : BlackMiscTest::CTestAircraftSituation::sortHint() Access ratio 1.25
FAIL! : BlackMiscTest::CTestAircraftSituation::sortHint() 'hint <= noHint' returned FALSE. (Expected hinted sort being faster)
* Random number generation was faulty, as we have to use RAND_MAX and not INT_MAX
* fixed CTestAircraftSituation::testSetRotateUpPitch, we need to use a defined front function otherwise it can be randomly outside range
* adjusted performance unit test a bit, as the value vary a lot
Ref T261
* min/max ground distance, also added in situation list
* use model's vtol/CG info
* improved scenery deviation guessing
* adjusted interpolator scenery deviation 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)
* 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
* this implementation is used by airspace monitor
* also used by dummy provider (advantage, unit tests test the real provider)
* some functions adjusted
* no longer using the add parts/situations signals
* will use the remote aircraft provider parts directly
Result: all parts/situations are stored only once in memory and in one single place
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