Print not only effectiveness matrix, but also raw and normalized
mixing matrix (inverted effectiveness).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- add fd_servo to failure detector status
- inside control allocation: if one axis is no longer controllable with servos
then enable auxiliary motors for it's control (VTOL only)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Introduce differential thrust SCALE and WEIGHT params that are used
to configure differential thrust on a VTOL vehicle.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
STOPPED: actuators are NOT remoted from the allocation, but
output is set to NAN. Intended for completely stopping a motor that
anyway already had a very low thrust setpoint.
DISABLED: Remove actuator from effectiveness matrix and set output to NAN.
Intended to tell the allocation when an actuator shouldn't be used
in the current flight state to allocate torque.
Additionally added a method to enable/disable motors that are considered
auxiliary (e.g. hover motors in FW flight on a Standard VTOL).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Instead of using the same normalization algorithm for multicopters
and planes, this commit splits it up.
The multicopter one is left unchanged in it's core (has special
yaw handling e.g.), while the new (FW one) looks at all axes separately
and scales the mixer matrix such that an input of 1 results in
maximum actuator control setpoint.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
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.
The argparse module has been builtin to Python since
Python 3.2, released in 2011 (see
https://docs.python.org/3/whatsnew/3.2.html). Further,
the argparse pip module has not been released or updated
since 2015, and lacks some of the features of the modern,
built-in argparse. Drop the pip installed version in
favor of the built-in version.
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
- 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.