* AirspeedValidator: remove additional one second of hysteresis for triggering
innovation checks
- this check already uses an integrator and so adding more delay just makes
log analysis more difficult and does not really add any value
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* removed unnecessary conditions
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* AirspeedValidator: only disable innov checks if ASPD_FS_INTEG is negative
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* get rid of unnecessary check on innovation threshold parameter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This fixes various edge cases when input is set to both: RC and
MAVLink gimbal protocol v2.
Specifically:
- We no longer immediately reset primary control if there is no update,
otherwise this will reset immediately after an commands.
- Talking of commands: GIMBAL_MANAGER_CONFIGURE no longer switches
control to MAVLink but only an actual incoming setpoint command does.
- And incoming setpoint command only triggers UpdatedActiveOnce which
means we will check RC again afterwards and if there is big movement
switch back to RC. That's the intuitive thing to do until we have
better reporting about who/what is in control.
- Also, with RC we no longer always set us to be in control but only on
major movement.
- upate to NOAA grid API to build WMM table in one pass
- refactor declination/inclination/totalintensity table printing to
shared method
- compute scaling factor to maximize resolution
fix: ControlAllocator float and int comparison bug
There was an incorrect comparison between a float variable `dt` and a `uint64_t` value representing 5 milliseconds (`5_ms`). As a result, `do_update` could never become true even if the last torque setpoint was received more than 5 milliseconds before.
To solve this, the `5_ms` value has been converted to seconds (0.005f) for the comparison with `dt`.
In this mode, the mag is used to inilialize the heading.
During flight, the heading is predicted using gyros and corrected
by GNSS measurements if available.
Previously, if a mag was not required (not index 0 and not used by ekf),
it was not counted in num_enabled_and_valid_calibration.
If a user set SYS_HAS_MAG to e.g. 3, it would then trigger a preflight
failure, even if there were 3 calibrated and enabled mags.
The EKF can recover from an initial bad earth mag field estimate.
Constraining the field is not necessary and can lead to an unpredicted
behavior of the filter.
Declination fusion is safe to run even when the horizontal field is 0
On slowly moving vehicles (e.g.: boats, rovers), the yaw estimator has
worse convergence than the main EKF. Resetting the mag states using the
yaw estimator as reference can lead to poor heading. Also, the EKF can
recover really well from initially incorrect mag states.
The previous default of 900m leads to many warnings if left
unchanged, especially if the vehicle is already in-air when
the Mission is started.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* usb: Added parameter to enable always starting mavlink on USB.
Refactored cdcacm_init into a module and added a paramter to allow always starting mavlink on
USB, also added a paramter to choose the mode. The current default behavior is to wait and listen
for data on USB and auto-detect the protocol (mavlink, nsh, ublox). This results in the mavlink
stream not starting until something else on the mavlink network sends a packet first. The new
default behavior is to always start mavlink.
Added parameters
MAV_USB_ENABLE -- default 1 (always start mavlink on USB)
MAV_USE_MODE -- default 3 (onboard)
* added 3 retries for opening serial port in mavlink, removed sleep before sercon
* added DRIVERS_CDCACM_AUTOSTART to ark-v6x default.px4board
* added CONFIG_DRIVERS_CDCACM_AUTOSTART=y to default.px4board for boards with CONFIG_CDCACM in their nsh/defconfig
* format
* remove PGA460 from COMMON_DISTANCE_SENSOR to save flash
* remove LIS2MDL from COMMON_MAGNETOMETER to save flash
* disable CONFIG_DRIVERS_CDCACM_AUTOSTART for fmu-v5 protected.px4board
* moved and renamed parameters, removed mode logic in mavlink
* changed parameter names, added mode none
* remove parameters from mavlink
- increase symforce CppConfig zero_initialization_sparsity_threshold so
that a Matrix setZero() call is performed instead of individually zeroing
Co-authored-by: bresch <brescianimathieu@gmail.com>