* ist8310: do reset before WHOAMI call
Apparently, the IST8310's WHOAMI register is writeable. Presumably, this
can get corrupted by bus noise. It is only reset if powered off for 30s.
Therefore, we do a reset before doing the WHOAMI.
* ist8310: improve comment
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
---------
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Compared to GNSS, alternate position observation methods are less accurate
and thus generally not good enough to do airspeed validation with.
Airspeed validation is thus disabled if no GNSS fusion is happening.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* 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.
192.168.0.x is often used by routers for WIFI/ethernet networks, and thus
can create conflicts.
This can happen for example if a companion is connected to the FMU via
ethernet and at the same time connects to a WIFI network as DHCP client.
VTOLs consume a lot more power in hover copared to fixed-wing fligt.
The remaining flight time thus should reset if one switches from MC to FW,
as otherwise it takes several minutes until the estimate goes down.
- 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>