28679 Commits

Author SHA1 Message Date
Jaeyoung Lim
d5ddb44241 Add sensor airspeed sim
This commit adds the airspeed sensor sim to simulate airspeed sensors
2023-02-13 13:00:39 -05:00
Matthias Grob
6f4d903f45 Battery: address two comments from #2242
- use a constant instead of magic number
- fix code comment typo
2023-02-13 13:27:08 +01:00
Hamish Willee
edb6c635d5
EKF2_MAG_TYPE - fix typos (#20808) 2023-02-10 14:39:57 +01:00
Konrad
b9f9f25b48 parameter_translation: Add parameter translation for renamed L1 parameters 2023-02-09 17:51:55 +01:00
Konrad
92277ebb96 FixedwingPositionControl: Explicitly set wind to zero when it is not valid. 2023-02-09 17:51:55 +01:00
Konrad
de4b139540 FwPosControl: Update behavior of navigating to a waypoint when the previous waypoint is not valid. Go along the line of the current aircraft position to the desired waypoint. 2023-02-09 17:51:55 +01:00
Konrad
d5025810b4 FixedWingPositionControl: remove get_nav_speed_2d function as npfg can handle this internally. 2023-02-09 17:51:55 +01:00
Konrad
6bdeb43e0d fw_path_navigation: Remove explicit L1 mentioning. 2023-02-09 17:51:55 +01:00
Konrad
3e200bca0d fw_pos_control_l1: renaming to fw_path_navigation, l1 control is not used anymore, use a more generic naming. 2023-02-09 17:51:55 +01:00
Konrad
aa3af7f707 fw_pos_control: purge L1 controller 2023-02-09 17:51:55 +01:00
Knut Hjorth
fbc80c9bf5
RTL fixes and improvements for VTOL vehicles (#21011)
* rtl: remove unconditional transition to land after descent

This was a bug, as it renders the above code lines useless.
This would cause a undesired FW landing for VTOL vehicles if
RTL_LAND_DELAY is above 0.

* rtl: head to center after loiter in VTOL FW

To get the same behavior for RTL with and without loiter before land for
VTOL drones.

* rtl: always go to descend state after return

Previously, the state would change directly to land if in MR and
RTL_LAND_DELAY was 0.0, but we will still wish to descent to
RTL_DESCEND_ALT at descent speed, instead of using landing speeds.

* rtl: mark head to center state as part of vtol transition

The next step in the sequence is transition to MC. By setting
vtol_back_transition we ensure that the acceptance radius is adapted to
the expected transition distance.
2023-02-08 11:07:39 +01:00
Knut Hjorth
99cf1cfdfe mavlink: use /dev/null as default stdin, stdout and stderr
If 0, 1 and/or 2 file descriptors are not open when mavlink module
starts (as might be the case for USB auto-start), use default /dev/null
so that these numbers are not used by other other files.
2023-02-08 10:38:20 +01:00
Knut Hjorth
6c7ae3d845 mavlink: generate new log list for request start index 0
Instead of interpret a request for "more logs than currently exists" as
a new request, use a request for index 0, which is more likely to be
the first request.
2023-02-08 10:38:20 +01:00
KonradRudin
c5d041a2f7
Rearrange npfg use path input (#21071)
* [npfg]: Remove the guideToPoint function and replace with guideToPath

* [npfg]: remove unused navigateXXX functions

* [npfg]: Move navigateXXX Function into FWPoscontrol

* [FixedwingPositionControl]: Set default flaps and spoilers in attitude setpoint topic, and only change if necessary.
2023-02-08 08:54:00 +01:00
jonasbouchraiet
9ac27c9413 Update rtl_params.c 2023-02-07 22:37:19 -05:00
Beat Küng
83c8c79af5
commander failsafe: add API to defer failsafes 2023-02-07 19:27:51 -05:00
Beat Küng
a727bddc19
microdds_client: set queue depth for incoming topics according to msg definition
Otherwise the FMU might miss publications from 2 different publishers at
the same time.
2023-02-07 19:12:10 -05:00
Beat Küng
3f2336af32
navigator: add ModeCompleted signalling topic 2023-02-07 19:11:52 -05:00
Beat Küng
ebc1d7544e
battery_simulator: add support for failure injection
For failsafe triggering in automated tests
2023-02-07 19:11:08 -05:00
Eric Katzfey
db24c2b233
Qshell static subscription (#21081)
* Changed QShell uorb subscription to be static to avoid the duplicate sequence number error
2023-02-07 17:18:01 -05:00
Daniel Agar
7b3befded5 ekf2: disable new gravity fusion by default 2023-02-07 13:57:10 -05:00
Daniel Sahu
fa6fda6cce
ekf2: new gravity observation (#21038)
Signed-off-by: Daniel M. Sahu <danielmohansahu@gmail.com>
2023-02-07 13:28:58 -05:00
alessandro
3e149ee6c5
FlightTaskAuto: landing position updates for precision landing (#20951)
- precision landing works incorrectly, target position is not updated during the descent above target
 - _prepareLandSetpoints needs to update _land_position continuously

Co-authored-by: kapacheuski <kapacheuski@gmail.com>
2023-02-07 12:07:26 -05:00
Jukka Laitinen
deb6053d56 Update status leds every time when prearm check status changes
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-02-07 08:02:32 +01:00
Daniel Agar
661eb2adb4 lib/sensor_calibration: BiasCorrectedSensorOffset() don't incorporate thermal offsets
- the thermal offsets are an optional correction applied to the raw data, so when updating an existing calibration offset with new learned bias we don't want this incorporated
2023-02-06 15:09:07 -05:00
Daniel Agar
04d3e549f5 ekf2: resetQuatStateYaw() set _time_last_heading_fuse 2023-02-03 10:03:09 -05:00
Daniel Agar
66ad7fd06c
ekf2: include 0 timestamp checks in helpers (isTimedOut(), isRecent(), etc)
- EKF isTimedOut(), isRecent(), and isNewestSampleRecent() need to handle the case where the timestamp has never been set
 - reset() more thoroughly reset fields (mainly impacts unit tests)
2023-02-03 10:00:51 -05:00
Daniel Agar
264a99fb77
ekf2: new EKF2_IMU_CTRL parameter and gyro bias inhibit mechanism
- EKF2_AID_MASK accel bias inhibit moves to EKF2_IMU_CTRL
2023-02-03 09:52:24 -05:00
Daniel Agar
f668ea5aa6 ekf2: RingBuffer add reset method 2023-02-03 08:49:44 -05:00
Daniel Agar
e3d73cd837 ekf2: mag control reset mag_lpf on first sample 2023-02-02 16:12:09 -05:00
ShiauweiZhao
35080504f7
drivers/drv_sensor.h fix device type duplicate definition 2023-02-02 09:54:47 -05:00
Hamish Willee
2938db1c60 Apply suggestions from code review 2023-02-02 15:20:34 +01:00
Hamish Willee
7cea384404 Update src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control_params.c 2023-02-02 15:20:34 +01:00
Hamish Willee
d65e5969e1 FW_AT_MAN_AUX - define what an Aux input is 2023-02-02 15:20:34 +01:00
Silvan Fuhrer
ba1d02ee75 MPC: improve description of MPC_LAND_RC_HELP
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-02 14:31:22 +01:00
Silvan Fuhrer
d9a4d1d5c4 Commander: use FW_AIRSPD_MAX as threshold for airspeed preflight checks
Check fails if airspeed reading is above FW_AIRSPD_MAX.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 20:43:38 -05:00
Silvan Fuhrer
32cab66c44 Commander: hide hint to param in low position accuracy event for end users
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 16:47:11 +01:00
Silvan Fuhrer
9b3a28dff5 Commander: add local_position_accuracy_low flag, incl. warning and RTL
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>
2023-02-01 16:47:11 +01:00
Silvan Fuhrer
3ca126cc46 Commander: improve description of COM_FS EPH, EPV, VEL_EVH params and increase FW and VTOL defaults
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 16:47:11 +01:00
Silvan Fuhrer
cbc4c35bcf Commander params: improve meta data for max flight time and wind
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 08:48:09 +01:00
Silvan Fuhrer
6d84da5cf1 Commander: add max flight time warning (starting at 90%)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-01 08:48:09 +01:00
Beat Küng
b1709743f7 commander: add wind or flight time limit exceeded mode requirement
This prevents switching into any of these modes once the condition is set.
2023-02-01 08:48:09 +01:00
Beat Küng
a8628c9d9c fix commander: clear takeoff_time only on disarm
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).
2023-02-01 08:48:09 +01:00
Beat Küng
8e4c5884ec fix commander: need to check for valid mode change even if already the same
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
2023-02-01 08:48:09 +01:00
Beat Küng
7988491e37 failsafe simulator: improve spacing for multi-line checkboxes
Reduces line-height to 100% in that case.
2023-02-01 08:48:09 +01:00
ShiauweiZhao
931f602995
drivers/imu/invensense: new IAM-20680HP IMU driver (#21025) 2023-01-31 09:33:26 -05:00
Julian Oes
b1fc0ca0d0 mavlink: always forward messages to/from USB
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>
2023-01-30 10:46:14 -05:00
Julian Oes
0446292c75 mavlink: always use public method
Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-30 10:46:14 -05:00
Julian Oes
7b8cf4913e mavlink: show forwarding status
Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-30 10:46:14 -05:00
Daniel Agar
47215bb625 lib/wind_estimator: symforce codegen remove reserved identifier naming
- 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"
2023-01-30 09:24:32 -05:00