3309 Commits

Author SHA1 Message Date
bresch
0bf9ccdcc9 sys-id: implement linear and log sine sweeps 2024-01-24 12:18:23 -05:00
bresch
da28d9a7f2 ekf2-grav: rename g-force unit to g0 to avoid confusion with grams 2024-01-24 13:26:25 +01:00
alexklimaj
d075956c4d lib: battery allow for 3 instances 2024-01-22 19:29:38 -05:00
bresch
7c7a3c117a ekf2-gravity: nomalize gravity fusion and proper sequential fusion 2024-01-18 20:39:16 -05:00
Daniel Agar
c3ae7b28c0
matrix: adjust printing for if symmetric (lower triangular only) 2024-01-16 10:20:21 -05:00
Daniel Agar
d45c3d3407
ekf2: verbose (DEBUG_BUILD) print status with Matrix improved print
* ekf2: verbose print status
 * matrix/Matrix improve print output
 * bold diagonal elements, print ring buffer entry size
 * print in scientific notation when >= 10 to respect max size

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
2024-01-10 09:46:04 -05:00
Matthias Grob
bcb2b1ad40 matrix: fix slice to slice assignment to do deep copy
To fix usage of a.xy() = b.xy() which should copy
the first two elements over into a and not act on a copy of a.
2023-12-21 11:42:08 +01:00
Silvan Fuhrer
29807a5e50 Replace CBRK_AIRSPD_CHK with SYS_HAS_NUM_ASPD
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-21 11:34:28 +01:00
Silvan Fuhrer
9e0c8fd75e FW controllers: change param FW_ARSP_MODE to FW_USE_AIRSPD
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-21 11:34:28 +01:00
Silvan Fuhrer
123c06f2e6 NPFG: specify in comments that airspeed reference is for true airspeed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-21 11:34:28 +01:00
Matthias Grob
6ffc5a9eae
events: pass relative paths plus base path to source parser script (#22551)
* events: pass relative paths plus base path to source parser script

to work around maximum Makefile command lenght limits.

* events: correct cmake comment typo

Co-authored-by: Beat Küng <beat-kueng@gmx.net>

---------

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2023-12-18 09:33:53 +01:00
Daniel Agar
4b25fad862 lib/timesync: relax warnings
- double required max consecutive counts
 - don't continuously complain about round trip time (RTT) unless
   there's been at least one acceptable round trip (latency < 100 ms)
2023-12-16 16:36:36 -05:00
Silvan Fuhrer
91ab09ebd5 TECS: in _calcPitchControlOutput guard against invalid airspeed inputs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Silvan Fuhrer
9db86f7f0a TECS: fix airspeed filter init in airspeed-less mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Silvan Fuhrer
60e2c6a5cb TECS: improve initialization
-remove external init, and instead always (but only) init when dt is too large
-init the controller params correctly

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Silvan Fuhrer
1f5fc3e849 TECS: init control params to reasonable values
The control params (eg min/max pitch) are used before they are
correctly set by TECS::update(). While this is an issue we should fix,
it also doesn't hurt to set them to more reasobale values (eg 30° limit).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Silvan Fuhrer
7926107328 TECS: make sure to constrain pitch to current min/max pitch
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Silvan Fuhrer
cc743048ba TECS: set _ratio_underspeed to 0 if airspeed disabled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-12-12 15:16:38 +01:00
Matthias Grob
ef0926d64b Commander: add position slow mode 2023-12-08 21:17:59 +01:00
Matthias Grob
e35380d6ae mixer_module_tests: cover output_limit_calc_single() 2023-12-07 21:35:55 -05:00
Matthias Grob
0a78690356 mixer_module: correct output_limit_calc_single calculation 2023-12-07 21:35:55 -05:00
PX4 BuildBot
fb3123e33b Update world_magnetic_model to latest Thu Dec 7 11:14:08 UTC 2023 2023-12-07 21:34:18 -05:00
Konrad
df46ad7774 Dcm2: Use std::sin with overloaded types 2023-12-05 10:42:23 +01:00
Konrad
d1b8a2e8d5 fxedwingPositionControl: Add slew rate at the end for all mode instead inside each 2023-12-05 10:42:23 +01:00
Konrad
1d07697a9e NPFG: Add fallback for corner cases 2023-12-05 10:42:23 +01:00
Matthias Grob
1c25d65a1e Add missing newline at the end of files 2023-12-01 13:11:00 -05:00
Matthias Grob
4c0b6dbe86 Remove trailing whitespaces and trailing duplicate newlines 2023-12-01 13:11:00 -05:00
Matthias Grob
8bb20db7da GotoControl: Save flash 2023-11-30 17:16:02 +01:00
Matthias Grob
d014d76ca7 HeadingSmoothing: set correct maximum heading
The velocity smoothing library constrains the maximum vellocity.
I set the default constraint to 0 to find these exact issues.
The heading smoothing did not initialize the maximum velocity
which in this use case is the maximum heading.
So heading was always constrained to 0 -> north until this change.
2023-11-30 17:16:02 +01:00
Matthias Grob
14b8afe972 PositionSmoothingTest: remove duplicate vector comparison 2023-11-30 17:16:02 +01:00
Matthias Grob
591845bb41 HeadingSmoothing: rename, simplify, add cpp 2023-11-30 17:16:02 +01:00
Matthias Grob
be05b3e8d7 helper_functions: include defines for M_PI_PRECISE
The defintion of the custom symbol M_PI_PRECISE
was not included in one of the only places it's used.
Looks like a mistake that happened in
34c852255e16bb62d2caf0c3be1f2fea660036ba
possibly because a lot of things are included
almost everywhere and if the include order
ligns up there are no compile errors.
2023-11-30 17:16:02 +01:00
Matthias Grob
efb325d25d motion_planning: remove deprecated separate test
It's functionality probably broke already in
befbb6b106c4c04933222ecb205f001fd77fa85f
and the tests are now covered by
VelocitySmoothingTest.cpp
2023-11-30 17:16:02 +01:00
Matthias Grob
53076b9863 PositionSmoothing: guard division by zero
Note that the unit test also passes without
thechange. But the VelocitySmoothing's
local_time would get NAN. This would leads to
wrong trajectory calculations.
2023-11-30 17:16:02 +01:00
Matthias Grob
11cca72ef1 VelocitySmoothing: fix division by zero cases
Problem: Zero maximum jerk and/or zero
direction would lead to divisions by zero in
various cases depending on the exact configuration and code path.

Solution: There was already one check for the
direction being zero in one path and I
summarized to check in both
updateDurations...() functions the product
of direction * max_jerk to not be zero
because that's exactly the value calculations
devide by.
2023-11-30 17:16:02 +01:00
Matthias Grob
6f295d91d1 Revert "motion_planning: sanitize inputs to position and velocity smoothing libs"
This reverts commit 2951c846ee07e52c2e3d97ea4629185016f3a011.
2023-11-30 17:16:02 +01:00
Thomas Stastny
4b920a6628 GotoControl: add go-to control interface to mc position controller
goto control class handles smoothing of goto setpoints, outputs trajectory setpoint for mc pos control
some minor encapsulation done in mc pos control for readability
new param MPC_YAWAAUTO_MAX limiting heading accelerations in heading smoother
2023-11-30 17:16:02 +01:00
Thomas Stastny
72a811a4b3 motion_planning: add heading smoother lib
wraps the velocity smoother, but is intended for generating smooth heading trajectories
handles angle wrap
2023-11-30 17:16:02 +01:00
Thomas Stastny
80dd7e4806 motion_planning: sanitize inputs to position and velocity smoothing libs 2023-11-30 17:16:02 +01:00
PX4 BuildBot
c2345ac5b3 Update world_magnetic_model to latest Wed Nov 29 11:14:09 UTC 2023 2023-11-29 20:55:05 -05:00
Daniel Agar
a9213e3862
Update world_magnetic_model to latest Tue Nov 28 11:14:14 UTC 2023
Co-authored-by: PX4 BuildBot <bot@px4.io>
2023-11-28 11:04:02 -05:00
Beniamino Pozzan
2363c03bfe [uxrce_dds_client] wait for Timesync to converge
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2023-11-27 21:10:26 -05:00
Silvan Fuhrer
2865bbb8ab Geofence: rework messaging and notification
- do reporting of breaching in-air only in geofenceCheck
- remove geofence_violation_reason_t
- replace geofence_breached field in GeofenceResult.msg with 3 fields
(one for each GF type: max dist, max alt, custom geofence)
- the warning message after breaching a GF is only done by Commander,
and it's specific to the GF type failure

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-11-22 21:45:02 -05:00
PX4 BuildBot
c497a25bea Update submodule libevents to latest Thu Nov 23 00:39:07 UTC 2023
- libevents in PX4/Firmware (15667a5c6b927ab177c6912058475eb5fac26c4c): a9a3fc07ab
    - libevents current upstream: 59f7f5c0ec
    - Changes: a9a3fc07ab...59f7f5c0ec

    59f7f5c 2023-09-26 Beat Küng - cpp/parse: avoid using ssize_t as it's not available on Windows
1617b4e 2023-09-26 Beat Küng - cpp: enable Werror, Wall, Wextra, Wconversion, Wpedantic & fix
e2979e6 2023-09-26 Beat Küng - refactor python/parser: some whitespace & formatting updates
e2e8011 2023-09-26 Beat Küng - python/parse: add callback to escape message & description
baa93a4 2023-09-26 Beat Küng - cpp/parse: add callback to escape message & description
d10aecd 2023-09-26 Beat Küng - refactor tests/parser: move tests to method
1aaa597 2023-09-26 Beat Küng - run_ci.sh: ensure cmake uses unix makefiles
9b3c897 2023-09-25 Beat Küng - refactor parser tests: use gtest
2023-11-22 21:40:48 -05:00
Roman Bapst
dd2322d622
Added PerformanceModel for fixed wing (#22091)
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations


---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-11-21 17:13:50 +01:00
Peter van der Perk
d2915743cb px4 hardfault_log: Add SSARC dump backend support 2023-11-15 11:10:47 -05:00
Beat Küng
2f91102808 mixer_module: rename Offboard_Actuator_Set to Peripheral_via_Actuator_Set
Offboard is a bit too specifically tied to Offboard mode.
2023-11-15 13:18:58 +01:00
Yannick Fuhrer
d609e41413 flightmodes: flag advanced modes accordingly 2023-11-15 13:18:58 +01:00
Beat Küng
bb900264e0 commander+mavlink: implement MAVLink standard modes 2023-11-15 13:18:58 +01:00
Beat Küng
fbbccf6997 commander: implement external modes and mode executors 2023-11-15 13:18:58 +01:00