3456 Commits

Author SHA1 Message Date
Matthias Grob
c69f96ec04 ADSB: replace last excess hrt_absolute_time() in the loop 2024-12-19 09:35:38 +01:00
Silvan Fuhrer
30e51cb80e ADSB: improve readability of unit tests
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Silvan Fuhrer
1a1fd59302 ADSB: pass now timestamp as arguemnt of send_traffic_warning()
Saves some flash and CPU by not having to call hrt_absolute_time().

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Silvan Fuhrer
741e3e8589 ADSB: pass now timestamp as arguemnt of get_traffic_state()
That enables us to time the unit tests better plus saves some flash and CPU.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:35:38 +01:00
Beat Küng
491ee01ac4 rpm_capture: add rpm capture driver, publising pwm_input (for now) 2024-12-19 07:30:25 +01:00
bresch
fa5a781e20 AlphaFilter: set time constant instead of alpha
Then the update function can set the dt at every iteration if needed
2024-12-18 14:11:08 +01:00
bresch
37401d6fd1 AlphaFilter: allow setting dt in update call 2024-12-18 14:11:08 +01:00
Beat Küng
9e9d352eb2 mavlink: update submodule
MAV_STANDARD_MODE_SAFE_RECOVERY and MAV_STANDARD_MODE_RETURN_HOME got
merged.
2024-12-18 07:12:36 +01:00
Beat Küng
aca5a70964 standard_modes: add vehicle-type specific standard modes
See https://mavlink.io/en/messages/development.html#MAV_STANDARD_MODE.
The only standard mode that is not set is MAV_STANDARD_MODE_SAFE_RECOVERY,
as PX4 uses RTL for that (with configuration parameters).
2024-12-18 07:12:36 +01:00
Silvan Fuhrer
4db55cd25f mixer: FunctionMotors: compare against FLT_EPSILON instead of 0.f
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-13 17:56:46 +01:00
Silvan Fuhrer
d7904b5f2c mixer: FunctionMotors: leave NAN control values at NAN with non-zero THR_MDL_FAC
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-13 17:56:46 +01:00
Jacob Dahl
ae61b4bfe0
params: flash: erase corrupt sector (#24065) 2024-12-05 07:24:56 +01:00
bresch
6b637f82f8 lla; fix conversion to ECEF 2024-12-03 13:03:54 +01:00
Claudio Chies
1a165a4956 Added possibility to modify the start position from external sources, as its done in the _getMaxXYSpeed 2024-12-02 14:52:31 +01:00
Matthias Grob
7dcfeb2f77 PositionSmoothing: refactor _getMaxZSpeed() 2024-12-02 14:52:31 +01:00
Matthias Grob
092e5e8f9d TrajectoryConstraints: clarify waypoint indexing 2024-12-02 14:52:31 +01:00
Claudio Chies
06dde4ede8 MPC: PositonSmoothing, change test to reflect that we have to come inwithing the acceptance radius, and not exact position. 2024-12-02 14:52:31 +01:00
Claudio Chies
72e758950b Included turning radius calculations for vertical changes and removed the requirement for the same altitude in the 2D turning radius logic. 2024-12-02 14:52:31 +01:00
bresch
189122d553 lla: add gravity constant at equator 2024-11-29 14:21:29 +01:00
bresch
b6658df169 lla: move to lib directory 2024-11-29 14:21:29 +01:00
bresch
9b172d36a2 matrix: allow casting float<->double 2024-11-29 14:21:29 +01:00
Matthias Grob
a280d67be8 PID: Fix test to respect integral updates being applied in the next iteration
Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-11-26 16:13:48 +01:00
Matthias Grob
f9bcbc31ae PID: protect from division by zero because of dt
Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-11-26 16:13:48 +01:00
Matthias Grob
b89c53d28c Replace old pid library with new one 2024-11-26 16:13:48 +01:00
Matthias Grob
e047972cde Add new C++ PID library 2024-11-26 16:13:48 +01:00
Silvan Fuhrer
2f65644aeb mixer module: remove unused functions
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-11-21 11:57:50 -05:00
Claudio Chies
db13b9cb50 CollisionPrevention: Added Case where velocity gets reduced to zero if we are closer to the obstacle than the minimal distance 2024-11-21 11:36:03 +01:00
Matthias Grob
bbc59dcde7 CollisionPrevention: prevent illegal array index with malicious obstacle_dsitance message 2024-11-21 11:36:03 +01:00
Matthias Grob
1410325c62 CollisionPrevention: follow parameter variable naming convention 2024-11-21 11:36:03 +01:00
Matthias Grob
30eec33e09 CollisionPrevention: slightly simplify _transformSetpoint() 2024-11-21 11:36:03 +01:00
Matthias Grob
399a8ad5b7 CollisionPrevention: fix early return and use unified bin count + array size 72 2024-11-21 11:36:03 +01:00
Claudio Chies
f41a08aea8 CollisionPrevention: changed to resolution of 5 degrees, and adapted tests to reflect the change
rewrite of obstacle_distance merging methods, and fix of various issues
2024-11-21 11:36:03 +01:00
Matthias Grob
b74dd57e7c CollisionPrevention: restore rate limited warning for no data, minor cleanup 2024-11-21 11:36:03 +01:00
Matthias Grob
4c8c5fbb37 CollisionPrevention: only save quaternion and yaw on attitude update 2024-11-21 11:36:03 +01:00
Matthias Grob
001d722abd CollisionPrevention: move main functions to the top in the order they get called 2024-11-21 11:36:03 +01:00
Matthias Grob
1fa76ac71d CollisionPrevention: reduce internal array size, zero initialize what's possible 2024-11-21 11:36:03 +01:00
Matthias Grob
c879ca531d CollisionPrevention: Clarify bin size definitions, move wrap functions into class 2024-11-21 11:36:03 +01:00
Matthias Grob
84dbbb4351 CollisionPrevention: clarify mode switch command to hold/loiter 2024-11-21 11:36:03 +01:00
Matthias Grob
50ee5bd1b4 CollisionPrevention: Sanitize input of _getObstacleDistance()
It could cause array out of bound problems before.
2024-11-21 11:36:03 +01:00
Matthias Grob
eb06ace8e4 CollisionPrevention: fix matrix namespace
don't use it in header such that clients are free to redefine the names
but include it in cpp files and make use of that.
2024-11-21 11:36:03 +01:00
Claudio Chies
0cd6a553b9 CollisionPrevention: rewrite for Acceleration based manual flight mode 2024-11-21 11:36:03 +01:00
jmackay2
5b66a1eff1 Fix generate component regex escape sequence 2024-11-19 09:31:11 +01:00
PX4 BuildBot
11fe5580cb Update submodule libevents to latest Sat Nov 16 00:40:14 UTC 2024
- libevents in PX4/Firmware (1f29c55e82fa22b95313bb0d10b63918718f9c0c): 7c1720749d
    - libevents current upstream: 9ef591c447
    - Changes: 7c1720749d...9ef591c447

    9ef591c 2024-10-14 Beat Küng - pylint: increase max-positional-arguments from 5 to 7
7901a0c 2024-10-14 Beat Küng - pylint: update config (pylint version 14.2.1)
edc472e 2024-10-11 Beat Küng - refactor: change libevents to an INTERFACE library
2024-11-15 21:12:18 -05:00
Alexander Lerach
b6daf83088 Un-inlined get_table_data 2024-11-15 12:01:06 -05:00
Alexander Lerach
6d0b7f7ed1 Un-inlined rotate_3 2024-11-15 12:01:06 -05:00
Silvan Fuhrer
3b0dac6840
RTL: fix RTL time estimation (#23807)
* RTL Direct: fix rlt time prediction in final lanidng phase

It was previously checking if RTL was already running through
active(), which though actually is coming from the mission mode
that rtl_direct inherits from.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL Direct: remove unnecessary active() check

As the method setRtlPosition() is anyway not called when RTL is active,
plus it checks the wrong thing, as it is the active() method from
the Mission mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL Direct: remove unnecessary land_detector_sub.update()

It is already getting updated just before the .get()

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL time estiate: do not distinguish land from sink for MC

To avoid rtl time prediction jump when entering LAND phase due
to no correct handling of loiter altitude (LAND phase doesn't
have to start only when lower then RTL_DESCND_ALT).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* Revert "RTL Direct: remove unnecessary active() check"

This reverts commit d5165ba902e65839e792cc13197761c7f77748f9.

* Revert "RTL Direct: fix rlt time prediction in final lanidng phase"

This reverts commit 5af7c928fbf86d560dcd35dd9aea3e38f1e4c735.

* RTL: Make sure to call the initialilze function of the Navigator RTL modes

* RTL: use the navigator_mode run function instead of the on_xxx function directly

* RTL: Make sure that for vtol the right vehicle type is used for each RTL state

* RTL: move to loiter distance estimate should substract the loiter radius for fixed wing

* RTL: time prediction: do not assume VTOL is in FW at start of RTL

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL: time estimation: fix is_in_climbing_submode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL: time estimation: subtract loiter radius from distance in rtl_direct_mission_land

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* RTL direct: poll important topics also on_inactive such that time estimate is correct

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* navigator rtl: fix setter spacing

* navigator rtl: check pointer before dereferencing

* RTL: only subract loiter radius when in FW

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Konrad <konrad@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-10-24 17:22:19 +02:00
Igor Mišić
b9942ad7e0 lib/mixer_module: remove unused param MOT_SLEW_MAX 2024-10-14 10:03:30 +02:00
Alexander Lerach
dbba9adb14
lib/rc/ghst: Added differentiation between GHST and CRSF (#23805) 2024-10-11 16:17:54 -04:00
Matthias Grob
fd04ece6d4 geo: remove dependency on drv_hrt time driver 2024-10-07 14:24:18 +02:00
PX4 BuildBot
5b85859bfe Update submodule libevents to latest Wed Oct 2 12:39:22 UTC 2024
- libevents in PX4/Firmware (c4ab09d088798a97b80f2cb834b2345e26d485ea): 9474657606
    - libevents current upstream: 7c1720749d
    - Changes: 9474657606...7c1720749d

    7c17207 2024-08-21 Beat Küng - remove nlohmann json submodule and add header directly instead
ce60064 2024-08-16 Jonas Vautherin - Fix cmake_minimum_required
2024-10-02 15:09:53 -04:00