16015 Commits

Author SHA1 Message Date
bresch
26122886ae ekf2: drag fusion - improve parameter description
The user should refer to the online documentation for tuning guidelines
and not the parameter description.
2023-01-05 12:03:24 -05:00
bresch
06ef39d05e ekf2: MC drag fusion - interpolate between X an Y "b" coefficients
Use the current sideslip angle to generate a drag coefficient that is a
mixture of X and Y coefficients, creating an elliptic distribution.
2023-01-05 12:03:24 -05:00
bresch
420f5ef2b7 ekf2: migrate drag fusion derivation to SymForce 2023-01-05 12:03:24 -05:00
bresch
04f76c932e ekf2: decompose drag vector into x-y components
The drag force is a vector.
drag_x = drag.norm() * vx / v.norm()
2023-01-05 12:03:24 -05:00
Paul Riseborough
1a9c358858 ekf2: Add unit tests for drag fusion 2023-01-05 12:03:24 -05:00
bresch
0509f612dd ekf2: fix drag data downsampling
setDragData needs the imu data at full speed to downsample it without
skipping samples.
2023-01-05 12:03:24 -05:00
bresch
14bf04b9a4 SIH: add to px4_fmu-v5_default and auto start GPS sim driver
- add simulator kconfig dependencies
 - exclude SIH (+deps) where sufficient flash isn't available
2023-01-04 16:26:15 -05:00
JaeyoungLim
21e88f64b4
Add new fixed wing rate control module (fw_rate_control)
* Fixedwing rate control into a separate module
* Start fw_rate_control for vtol
* Move over airspeed related parameters to fw_rate_control

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-04 11:14:00 -05:00
Peter van der Perk
4c2c06060d PX4Board kconfig add dependency chain for QURT & POSIX modules 2023-01-04 09:40:17 -05:00
bresch
28d664aed5 EKF2: purge outdated matlab scripts
Those files are no longer maintained and will just confuse new users
2022-12-30 13:01:58 -05:00
dagar
618ce9a865 [AUTO COMMIT] update change indication 2022-12-29 16:37:34 -05:00
Daniel Agar
20a1c73cf0 ekf2: reinit baro height on sensor or calibration change
- handle reset on delayed time horizon
2022-12-29 16:37:34 -05:00
bresch
3e4e5c991c ekf2: add mag unit tests 2022-12-29 12:56:36 -05:00
bresch
657bd6cf72 ekf2: stop mag fusion when inhibited for too long
Also do not try to run anything if mag is inhibited
2022-12-29 12:56:36 -05:00
bresch
c75a9058a5 EKF2: only fuse zero innovation if yaw var is large 2022-12-29 12:56:36 -05:00
Julian Oes
bb591c6c29 mavlink_shell: fix stall on CubeOrange
On CubeOrange where no console is configured by default, starting
MAVLink shell just stalls, and doesn't work.

Also, logfile download has been reported not to work, and again, seems
to work with this change.

Signed-off-by: Julian Oes <julian@oes.ch>
2022-12-23 11:00:20 -05:00
bresch
86a3d2459a ekf2: remove old yaw estimator generated code 2022-12-23 10:28:19 -05:00
bresch
0388c161e7 ekf2: compare yaw estimator sympy vs symforce 2022-12-23 10:28:19 -05:00
bresch
7c33019510 EKF2: move yaw estimator to symforce 2022-12-23 10:28:19 -05:00
Eric Katzfey
c3e70b03aa
Add more to Voxl2 build and fix associated build errors (#20821)
- Do not pull in PWM parameters when DISABLE_PARAMS_MODULE_SCOPING is TRUE since VOXL2 has no PWM nor any of the required timer_config files that go along with that
 - Replace non-standard M_PI constants with PX4 defined M_PI_F constants
 - Include missing header file for function hrt_absolute_time declaration
 - Add new PX4_SOC_ARCH_ID for the VOXL2 board
2022-12-22 15:44:19 -05:00
Konrad
f5524fa605 TECS: Combine both airspeed and airspeed derivative filters in TECS into one MIMO filter using a steady state Kalman filter. 2022-12-21 09:04:19 +01:00
Konrad
7a3e0f53c2 TECS: Replaced old tecs by cleaned up version. 2022-12-21 09:04:19 +01:00
Konrad
991689d3cd TECS: Add new tecs library in parallel to old tecs in the position control library for comparison. 2022-12-21 09:04:19 +01:00
Daniel Agar
54a32eb2f7
ekf2: EV overhaul yaw and position fusion (#20501)
- move EV yaw and EV position to new state machines
 - EV yaw and EV pos now configured via EKF2_EV_CTRL (migrated from EKF2_AID_MASK)
 - new EV position offset estimator to enable EV position while GPS position is active (no more EV pos delta fusion)
 - yaw_align now strictly means north (no more rotate external vision aid mask)
 - automatic switching between EV yaw, and yaw align north based on GPS quality
2022-12-20 10:23:56 -05:00
Silvan Fuhrer
20342216e2
Airspeed Selector: use better density source and only save scale parameter if valid (#20764)
* AirspeedSelector: use vehicle_air_data.rho for calculating groundspeed-wind CAS

Previously the vehicle_air_data.temperature and pressure was used, instead of the
density field directly.
Only makes a difference if there is an airspeed sensor connected to provide
the air temperature.

* AirspeedSelector: only safe estimated scale in param if airspeed is valid

* AirspeedSelector: remove 0.01 cliff for saving learned scale to param

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-20 15:52:54 +01:00
Igor Misic
52275923ad adsb: add support for callsign 2022-12-20 08:18:09 +01:00
Eric Katzfey
678607117a
Qurt UART ESC driver support (#20784) 2022-12-20 01:25:12 -05:00
Silvan Fuhrer
9c66f1b14a
AirspeedValidator: Remvoe airspeed variance after boot check (#20678)
This checks was introduced to catch the (unlikely) case of the driver publishing
a stale value that is not actually from a current measurement right after boot.
This was done by declaring it invalid if there is no update of the measurement
within the first 10s after boot.
Practice though has shown that around 0, many airspeed sensors have such a low
resolution that the reported airspeed value is often at the exact same value
for longer periods of time on totally healthy sensors, and thus we trigger
some false positive failure detections.
Given that this failure mode (driver publishing stale data) is quite rare (if
it doesn't receive new data it should stop publishing), I remove this check
here again.
When in aerodynamic flight mode and armed, there is still the data stuck
check that can trigger if there is no update for 2s.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-19 11:36:48 +01:00
Eric Katzfey
b0580d88e1 Added muorb aggregator from DSP to Apps direction 2022-12-16 19:43:00 -05:00
RomanBapst
ffdf186598 vtol_att_control: reset transition timer states when starting a transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-16 11:36:00 +03:00
JaeyoungLim
9db133b13d Remove angular velocity controller module 2022-12-16 07:52:20 +01:00
RomanBapst
48e8477799 vtol_att_control: disable maximum height for quadchute by default
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-15 15:40:53 +03:00
RomanBapst
9ed51ba8ed quadchute: introduced parameter to specify maximum height
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-15 15:40:53 +03:00
Marcell Rausch
6c7702b906
mavlink: Keep sending GPS_RAW_INT/GPS2_RAW.hpp streams on GPS failure
* GPS_RAW_INT: Only send no gps messages if gps has ever been present
 * GPS2_RAW: Keep in sync with GPS_RAW_INT

Signed-off-by: Marcell Rausch <marcell@auterion.com>
2022-12-14 09:12:39 -05:00
Beat Küng
5217bedd4b commander: make SYS_HAS_MAG a count param and ensure system has N calibrated + enabled mags 2022-12-14 07:55:04 +01:00
Daniel Agar
4d318ebd30 mavlink: add initial mavlink OPEN_DRONE_ID_SYSTEM stream 2022-12-13 19:39:27 -05:00
Daniel Agar
696eeb9a49
ekf2: update EV height state machine (small piece of EV overhaul)
- respect new EKF2_EV_CTRL parameter for VPOS usage
  - EV hgt rotate EV position before usage (there's often a small offset in frames)
  - EV hgt reset use proper EV velocity body frame
  - try to keep EV hgt and EV vel state machines consistent
  - small incremental piece of https://github.com/PX4/PX4-Autopilot/pull/19128
2022-12-13 13:29:18 -05:00
Daniel Agar
805ffa9d0b ekf2: push mag cal reset to delayed time horizon 2022-12-13 10:24:02 -05:00
PX4 BuildBot
8b02b6b661 Update submodule mavlink to latest Tue Dec 13 12:38:57 UTC 2022
- mavlink in PX4/Firmware (8e1e5c4faa7749f6bc16650c7452af249a7dcc3a): 0811208443
    - mavlink current upstream: 0c7792edfe
    - Changes: 0811208443...0c7792edfe

    0c7792ed 2022-12-08 olliw42 - Gimbal Device: Adding more invalid and bitmask attributes (II) (#1927)
771926e6 2022-12-07 olliw42 - gimbal manager cap flags: resolve duplication mistake
2bc32222 2022-12-07 olliw42 - add gimbal device flags to low word of gimbal manager flags (#1928)
2022-12-13 09:06:14 -05:00
Roman Bapst
257d4e473b
fixed tailsitter transitions (#20756)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-12-13 10:38:38 +01:00
Eric Katzfey
e17ddcc0e5
Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt)
 - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
2022-12-12 22:02:23 -05:00
bresch
41abf695a8 ekf2: use more efficient covariance update computation
KSK' is faster to compute than KHP and is mathematically equivalent
2022-12-12 12:31:54 -05:00
Zachary Lowell
e4f641e9b5
Qurt qshell implementation (#20736) 2022-12-09 16:49:41 -05:00
Daniel Agar
8cf13d50a8
ekf2: EKFGSF_yaw minor cleanup (#20510)
- don't store unnecessary IMU copy in class, pass it through where required
 - remove custom pi constants
 - remove unused fields from ahrs_ekf_gsf (vel_NE, fuse_gps, accel_dt)
 - explicitly initialize everything in header
 - apply PX4 code style
 - set GPS velocity before yaw estimator update, not after
2022-12-09 13:24:00 -05:00
Daniel Agar
f3884d5835
Update world_magnetic_model to latest Fri Dec 9 11:14:09 UTC 2022
Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-12-09 11:40:30 -05:00
Roman Bapst
cfb670fbb3
Refactor quadchute logic (#20704)
* moved computation of _time_since_trans_start into base class

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* refactor quadchute logic
- move entired logic into VtolType class
- split into smaller functions

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* Update src/modules/vtol_att_control/vtol_type.h

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-12-08 11:56:20 +03:00
Daniel Agar
2b1d8c1d8e
mavlink switch to common dialect by default and update to latest 2022-12-07 15:46:04 -05:00
Daniel Agar
72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
Beniamino Pozzan
5a2e41c4e4 microdds_client: add XRCE_DDS_KEY parameter
Multiple agents can connect to the same client

For sitl builds, if the intance number is different from zero,
  XRCE_DDS_KEY is set to the instance number and
  the microdds_client is automatically started
    with namespace
      px4_"instance_number"
    and udp port 8888
If the instance number is equal to zero
  XRCE_DDS_KEY is left untouched and
  the microdds_client is automatically started
    without namespace
    and udp port 8888

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00
Beniamino Pozzan
a92897fb58 microdds_client: add namespace to partecipant name
The partecipant name is modified into
"client_namespace"/px4_micro_xrce_dds

For sitl builds the microdds_client is automatically started
with namespace
px4_"instance_number"
and udp port
8888+"intance_number"

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2022-12-07 14:36:23 -05:00