This is the same jump off point as main and release/1.14
with several NXP arch backports, 2 Commit fixing bad DEBUGASSERT
logic and a Soket Can change.
- 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.
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>
5s is a more reasobale time for tailsitters, which rely differently on this param
than other VTOL types. Tailsitters will ramp the pitch up withing this time,
while for other VTOLS types its only the max transitiont time.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This is now using the advanced lift drag plugin.
The important step was to enable airmode for yaw, otherwise yaw gets
saturated at low throttle and we can barely roll.
The other trick was to raise airspeed a little bit to avoid operating
too much at the lower end of throttle where control authority is low.
Signed-off-by: Julian Oes <julian@oes.ch>
* uavcan rtcm set max num injections
* Subscribe to all instances of gps_inject_data and mirror uavcan rtcm pub mirror gps driver
* Minor logic refactor in gps and uavcan gps inject data
Before this the ESC calibration aborts if battery detection doesn't work.
The problem is if the user still connects the battery as he gets instructed
and the calibration aborts then the ESCs are in calibration mode and
after abortion calibrate to the wrong value.
Also I realized there's no additional safety by aborting the calibration
if the battery cannot be detected during the timeout because a pixhawk
board without power module will report a battery status from the
ADC driverand in it that no battery is connected which is the best
it can do. In this situation the motors will still spin if the
ESCs are powered.
Some ESCs e.g. Gaui enter the menu relatively quickly if the
signal is high for too long. To solve that it's kept high shorter.
Also all tested ESCs detect the low signal within a shorter time
so no need to wait longer.