- create integral and trajectory generator reset methods
- always run TECS unless in rotary-wing mode (or in transition)
- constantly reset TECS integrals and trajectory generators when landed
- simplify takeoff reset method
- removes _last_manual variable in favor of _skipping_takeoff_detection, which is handled in the control mode setter
- takeoff detection (both launch and runway) is skipped if entering takeoff mode from any other mode while having already been in the air
- added method to runway takeoff class for force setting the fly state when we want to skip the takeoff detection
* Change min > max notation to [min, max] in Parameters Markdown
* Update src/lib/parameters/px4params/markdownout.py
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
As they are always moving horizontally, the check doesn't make sense
for fixed-wings.
Also don't run the check while on ground to prevent getting a failed
check during pre-takeoff manipulation.
- trim throttle is handled entirely by the position controller
- navigator should use speed setpoints
- added flag gliding_enabled in position setpoint to stills support gliding
Signed-off-by: RomanBapst <bapstroman@gmail.com>
- allow compensation based on vehicle weight (parameterized)
- use density for calculating trim throttle compensation instead of pressure
- removed parameter FW_THR_ALT_SCL
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Make Power Off tune not interruptable
This solves the case of Low Battery warning tune overriding the power
off tune, as now the Power off tune is not interruptable by any other
tune unless override flag is specified
commander_helper: resolve "redundant boolean literal in ternary expression result"
- Existing code was hard to read and quite ambiguous
- Also it allowed constantly re-sending the tune_control request for a
fixed duration tunes like "TUNE_ID_BATTERY_WARNING_SLOW", while not
respecting the tune duration
When wind is already estimated, we don't reset the states using airspeed
data, so it could be that the fusion fails if the airspeed isn't
consistent with the filter (test ratio > 1). In this case, don't start
the fusion.
When wind isn't already estimated, the wind states are reset using
airspeed so the fusion can start regardless of the current test ratio.
- As it is always only used for the vehicle command ack message
- It was a duplicate, hence making it error prone for maintainment
- The uORB message comments were updated to make the relationship with
the MAVLink message / enum definitions clear
split the fusion process into:
1. updateAirspeed: computes innov, innov_var, obs_var, ...
2. fuseAirspeed: uses data computed in 1. to generate K, H and fuse the
observation
from 300 ms to 60 seconds, to give enough time for the user to configure
the vehicle in the mean time.
This is needed especially when the battery cell count setting is wrong
(when it should be 3, but set to 4 for example), since then whenever you
boot the vehicle, it will shutdown after 300 ms, which leaves the user
puzzled as to exactly what's happening. And it also prevented the user
from changing the Parameter since it's shutting down so quickly.
60 second window is intended to be a reasonable time that will allow the
user to figure out what's going on (via checking the battery level on
QGC, etc) but also not deep discharge the battery to a dangerous level.
- this allows landing gear to retract automatically when doing a takeoff
and the vehicle is considered high enough
Signed-off-by: RomanBapst <bapstroman@gmail.com>