Set this flag to true if local position is valid but accuracy low, such that
the operator can be warned before system switches to position-failure failsafe.
Additionally, switch to RTL if currently in Mission or Loiter to try to reach home
or fly out of GNSS-denied area.
Set low accuracy threshold to 50m by default for FW and VTOL.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Otherwise the flight time restriction flag gets cleared too early, before
disarming (which puts the vehicle into the previous mode and it might
take off again).
Fixes the following case:
- user intention set to X
- failsafe triggers, mode = Y
- can_run for X becomes false
- user tries to switch to X
-> need to re-evaluate can_run
Previously, it was not possible to enable forwarding of messages to/from
teh USB instance because it does not have a param for it, like the
serial instances have.
With this commit, we change the default to always set forwarding on for
the USB instance as that is likely desired.
Signed-off-by: Julian Oes <julian@oes.ch>
- from the C standard, "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use"
- from the C standard, "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use"
The static object is destroyed on at_exit while threads might still be
inside a CS. This can lead to a hanging process.
Cleaner would be to gracefully stop the threads.
According to https://linux.die.net/man/3/pthread_cond_destroy:
Attempting to destroy a condition variable upon which other threads are
currently blocked results in undefined behavior.
Instead check if system has previously switched into LOITER to acheive the current
WP of type POSITION, and in that case stay in LOITER until altitude is reached.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- nuttx in PX4/Firmware (d3b7112dd94ac75a9a94ceef788d934f55c56c53): f80785664f
- nuttx current upstream: 35997053c5
- Changes: f80785664f...35997053c5
35997053c5 2023-01-23 David Sidrane - [BACKPORT] s32k1xx:serial Do not use TC use TDRE & TIE
Do the same as DO_REPOSITION wit only the altitude field populated
and MAV_DO_REPOSITION_FLAGS set, which means:
- switch to Loiter mode if not already in it
- set the current altitude to what is specified in the altitdue field,
keep current altitude setpoint otherwise
- keep current position setpoint
- fall back to current estimated position in case a position setpoint
is not finite
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>