There is some actual changes because the earth mag field states are now
reset using the WMM when available. In the replay log, the measured mag
field does not match the WMM and this is why there is a large diff. It
is however more correct now than before.
because sprintf is deprecated on MacOS
and CI fails with warning -> error:
'sprintf' is deprecated: This function is
provided for compatibility reasons only.
Due to security concerns inherent in the
design of sprintf(3), it is highly
recommended that you use snprintf(3) instead.
Since we changed the threshold for allowing arming from TRIM/2 to AIRSPEED_MAX
is is very unlikely that one needs to disable this check.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Experience from tuning different VTOL backtransitions showed only having a
I controller is beneficial over a combined FF/I breaking controller.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Case: A vehicle is already operating but has no stick input or another
source than RC. When RC stick input is switched to either because it gets
first time available or as a fallback to joystick then the mode was
immediately changed to the switch position. This can lead to loss of
control e.g. when the vehicle is flying far away and the
mode switch of the RC is in some fully manual piloted mode.
I added tests to cover the cases where RC mode initialization is expected
and also unexpceted because the vehicle is already armed.
modules__ instead of module__ prefix
The module depends on the hysteresis library and probably because
it compiles with the still prevalent global includes the dependency
is not declared.
in air bias estimation is usually really accurate and should be weighted
more heavily compared to the calibration parameters that are often
more approximate given the worse magnetic environment near the ground.
- since last_us is set to 0 every time the bias is not observable, the
total time was also reset -> needed 30 consecutive seconds in mag 3D
to be declared "stable"
- after landing, the mag_aligned_in_flight flag is reset. Using this for
bias validity makes it invalid before we have a chance to save it to
the calibration.
Opt flow raw innovations can be really large on ground due to the small
distance to the ground (vel = flow / dist). To make the pre-flight check
more meaningful, scale it with the current distance.
Channel values stay over one unit test but some tests assumed they are
reset each time. Reset the channel after these mode button tests.
Parameters survive between unit tests presumably as long as
the bianry runs. Reset them if a test requires that.