Heading data is already available in "float" mode but really inaccurate
(can be off by 45 degrees). It's then better to not use it when in
"float" mode as it will disturb the EKF2's estimate and the filter can
continue to keep an accurate heading even without direct observations.
also for the other linux target builds. It's a follow up to
e5503480e3
I wasn't aware that there are multiple different
container versions used for almost the same build.
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.
This allows PWM and all other output methods to configure
stopped, idling and full thrust points and use them consistently.
The fact that a fixed wing motor can be stopped when zero thrust
is demanded is explicit and could in principle even be disabled.
The mechanism is the same as for a standard VTOL stopping the
multicopter motors in the fixed wing flight phase.
This allows to consistently define:
Motor stopped - disarmed PWM
Motor idling - minimum PWM
Motor at full thrust - maximum PWM
Any allocation can then distinctly decide if
a motor should be running or not depending
on the context and also explicitly command that.
This is required to process data from the ADS1115 ADC and enables the
params BATx_I_CHANNEL and BATx_V_CHANNEL.
Testing is required whether this actually works on Pixhawk 6X though.
Signed-off-by: Julian Oes <julian@oes.ch>
When switching into Hold mode establish a Loiter around current position,
even if we were before already loitering (eg in Mission mode).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>