30 Commits

Author SHA1 Message Date
Daniel Agar
8b9900cce3
mc_pos_control: new velocity low pass and notch filter (optional, disabled by default)
- MPC_VEL_LP: new velocity first order low pass filter (off by default)
 - MPC_VEL_NF_FRQ/MPC_VEL_NF_BW: new velocity notch filter (off by default)
 - MPC_VELD_LP: existing velocity derivative low pass filter, but I've dropped the remaining controllib usage
2024-06-18 11:47:19 -04:00
Matthias Grob
9de3af1cbc Functions: interpolate brackets and spacing 2022-11-23 11:06:44 -05:00
Matthias Grob
5ca28dd6dc Use isAllFinite() in all places that check finiteness on entire vectors or matrices 2022-10-19 19:09:20 +02:00
Matthias Grob
e115095f70
Functions: correct interpolate function for N points 2022-09-07 08:00:27 +02:00
Matthias Grob
2edb35b1b5
Functions: add gradual function with arbitrary number of corner points 2022-09-07 08:00:26 +02:00
mcsauder
87a5705960 Rename math::gradual() to math::interpolate() and add unit tests to cover additional corner cases. 2022-08-18 14:18:02 +02:00
Matthias Grob
74c0ae6e55 Functions: add sign from boolean function with unit tests 2022-03-23 10:51:45 +01:00
Claudio Micheli
d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Daniel Agar
ecc2ca7f98 mathlib: int16_t negate explicitly handle both INT16_MIN and INT16_MAX
- technically negating INT16_MAX doesn't need special handling, but
this ensures any simple saturation logic downstream works by default
2021-12-15 12:45:58 -05:00
Matthias Grob
8b37db7825 Functions: fix corner case x_low == x_high == value resulting in NAN
and added unit test to cover it
2021-10-13 17:24:16 -04:00
Matthias Grob
58ea97a699 MulticopterPositionControl: add horizontal margin for saturation cases 2021-09-08 19:55:27 +02:00
Daniel Agar
5493d96d17 mathlib: merge LowPassFilter2p, LowPassFilter2pArray, and LowPassFilter2pVector3f
- fix reset for direct form 2
 - push NAN checks out to filter users
2021-05-31 10:26:45 -04:00
Daniel Agar
e57aaaaa5e
rotate accel/gyro FIFO before publish and fix angular velocity filter resets
- rotates accel & gyro FIFO data before publication both to simplify downstream usage (including log review) and fix other issues
     - to best handle int16_t data rotations are now either performed with swaps if possible, otherwise promoted to float, rotated using the full rotation matrix, then rounded back to int16_t
 - fix sensors/vehicle_angular_velocity filter reset both with proper rotation and new calibration uncorrect helper
      - in FIFO case filtering is done before calibration is applied, but we need to handle a possible reset from a completely different sensor (vehicle body angular velocity -> sensor frame uncorrected data)
2021-03-22 12:01:12 -04:00
Beat Küng
14bf9cf753 mc: add SYS_VEHICLE_RESP param to configure vehicle responsiveness 2021-02-24 17:27:31 +01:00
Matthias Grob
badaf1eae0 Functions: add squareroot linear function 2020-12-03 18:19:42 +01:00
Matthias Grob
0b391fdcfc mc_att_control: add gradual3 function to cover hover thrust rescaling 2020-07-24 11:31:15 +02:00
Matthias Grob
eb3b0f6b55 mathlib: get rid of now duplicate sign() function
Instead use the one that was copied to the matrix library in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Matthias Grob
1484dfed6a FlightTasks: remove deprecated AutoLine mission task 2020-01-06 15:39:07 +01:00
bresch
59f54a7fd8 mathlib - Add FLT_EPSILON deadzone in sign computation 2019-09-13 17:46:01 +02:00
Beat Küng
c659d2bcc2 mixer: minor refactoring to reduce header include dependencies
- avoid including <px4_defines.h> from the math headers
- avoid driver include <drivers/drv_mixer.h> from the mixer
2018-12-13 09:50:07 +01:00
Dennis Mannhart
55947d2782 exponentialFromLimits make small number const 2018-11-30 09:30:00 -05:00
Dennis Mannhart
6110ddc8b1 math Functions constrain X_in of exponentialFromLimits function 2018-11-30 09:30:00 -05:00
Dennis Mannhart
23afb939f0 math Functions: exponential function with constraints 2018-11-30 09:30:00 -05:00
Dennis Mannhart
80193cd227 math Functions: replace float with T 2018-11-30 09:30:00 -05:00
MaEtUgR
675b6bbabc mathlib: fix comment typo 2018-07-24 15:03:53 +02:00
Matthias Grob
d2ead02fb5 mc_att_control: catch numerical corner cases
- Delete left over identity matrix.

- Corner case with a zero element when using the signum function:
We always need a sign also for zero.

- Corner case with arbitrary yaw but and 180 degree roll or pitch:
Reduced attitude control calculation always rotates around roll
because there's no right choice when neglecting yaw. In that small
corner case it's better to just use full attitude contol and hence
rotate around the most efficient roll/pitch combination.
2018-03-15 17:16:14 +01:00
Matthias Grob
11d480240a mathlib Functions: removed inline, fixed style 2018-02-02 00:38:01 -05:00
Matthias Grob
8e68f5ed79 mathlib Functions: improve documentation and limit checking 2018-02-02 00:38:01 -05:00
Matthias Grob
455ba0e1b5 mathlib Functions: added SuperExpo function for stick feel enhancement 2017-10-17 16:54:16 +02:00
Matthias Grob
1d7f760a96 mathlib, mc_pos_control: rename functions file and add gradual linear function 2017-07-07 18:25:35 +02:00