Currently if you configure a battery capacity the battery library calculates a remaining flight time and you by default get an RTL when the flight time - return time is running out.
Since the state of charge threshold based battery failsafes `COM_LOW_BAT_ACT` are disabled by default I was asked to also disable the flight time based failsafe to be consistent.
* rft: clean merge to PX4
* fix: formatting
* fix: extra line
* fix: moved submarine out of "is_ground_vehicle", added proper check for center-throttle
* feat: updated gazebo models to include bluerov update
* fix: use 'is_uuv_vehicle', remove FW_MM/LLC from uuv build
* fix: added saturation to thrust and torque messages via param
* doc: updated parameters documentation for uuv
* fix: formatting
* feat: matching hardware reference
* fix: thrusters kg
* rft: removed commented lines
* fix: update gz reference given hw setup
* fix: hardware references
* fix: recommendations
* fix: updated settings to match hardware
* rft: check only for fixed and rotary wing for high throttle
Co-authored-by: Daniel Agar <daniel@agar.ca>
* fix: commit oupsie
* fix: format
* rft: remove is_uuv
* fix: hw parameters, uuv build target for v6x
* feat: added support for D-pad attitude changes in stabilized position control
* fix: position setpoint update and parametrized trajectory age and att change
* fix: format
* fix: removed duplicated call to check_validity_setpoint
* fix: setpoint update on arming logic
* fix: setpoint initialization for stabilized mode
---------
Co-authored-by: Daniel Agar <daniel@agar.ca>
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.
Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).
This time including the message versioning and translation.
There was a race condition: for example when an external mode disabled
failsafe deferring, that then triggered a failsafe, while the mode executor
immediately sends a command (to e.g. switch modes).
In that case the failsafe got triggered but the mode switch was still
allowed.
This was because of the processing ordering:
- mode updates (and propagating the failsafe_action_active state)
- failsafe updates
- command handling
This patch makes sure failsafe_action_active is set immediately after
updating the failsafes.
Previously, when deferring was active and e.g. RC loss was triggered, and
RC regained, the action was not cleared, as the RC loss action only clears
on mode switch/disarm (when set to RTL for example).
When deferring was then disabled, the RC loss failsafe would still trigger.
This changes the behavior to immediately remove those actions when
deferring is active.
It also ensures to reset the Hold delay when deferring is disabled and no
failsafe is being deferred.
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.
Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).
When a mission finishes with an RTL command, there's a race condition
between:
1. RTL command setting user_mode_intention RTL
2. Mission completion logic forcing LOITER
The auto-loiter transition was checking current nav_state (which is
still AUTO_MISSION) instead of any pending user_mode_intention,
causing it to override the RTL request.
Fix: Only auto-transition to loiter if no mode change is already
pending.
Within the first 2min of a flight, check if the integrated GNSS vertical velocity and the baro
measurements disagree with the reported GNSS altitude, and in that case update the
set home position altitude to cancel out GNSS altitude drift.
* prevent re-init when reaching negative altitudes
* only allow correction during the first 120 second after takeoff
* add dependency to COM_HOME_EN parameter. reset vel-integral for multiple takeoffs
Replaced the local variable landed_amid_mission with the class member _mission_in_progress for consistency and to reduce redundancy.
No functional change.
To separate accuracy requirements for VTOL hover and cruise.
- global_position_relaxed refers to having a valid horizontal velocity aid source
in the estimator and a set global reference position, but poses no requirements
on the accuracy of the provided position estimate.
- Auto flight modes Mission, Loiter and RTL, while in fixed-wing mode,
only require the relaxed global position going forward
- COM_POS_FS_EPH is thus no longer used on fixed-wing vehicles (resp. VTOL in FW)
- rename failsafe_flags.local_position_accuracy_low to failsafe_flags.position_accuracy_low
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
To make sure QGC also shows a box and reads out for "low battery"
and make events and mavlink_log reports consistent.
Low - Critical
Critical - Critical
Emergency - Emergency
There is already another check for battery_unhealthy, so a separate state
and ID are required.
Fixes the error:
ERROR [failsafe] BUG: duplicate check for caller_id 74