2541 Commits

Author SHA1 Message Date
RomanBapst
987c320825 TECS: removed unused parameter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
5c4c2c240c tecs: dot not clip throttle integrator during saturation but only allow
it to propagate into a direction which does not saturate

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer
2ca4269464 TECS: separate integral gains for throttle and pitch loops
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst
01f891618b TECS: move to new control loop architecture
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
447e14906c TECS: log more TECS states to enable better analysis
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
8823f5e1ec TECS: added method to get SKE weighting
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
d0e8b882a2 TECS: added alpha filter classes to energy rate and tas derivative
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Julian Kent
a5dfa0c803 Add helper function for decel distances
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 10:26:10 +01:00
Julian Kent
8622c21496 Move VelocitySmoothing to new motion_planning library
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 10:26:10 +01:00
Daniel Agar
a57b9f9381 delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage 2021-01-12 22:04:52 -05:00
Daniel Agar
70e503cb91
rotation: use Dcmf for all rotations that aren't direct swaps
- increase optimization to ${MAX_CUSTOM_OPT_LEVEL} (max per board)
2021-01-10 18:08:41 -05:00
PX4 BuildBot
0398a936e3 Update submodule ecl to latest Sat Jan 9 16:06:23 UTC 2021
- ecl in PX4/Firmware (c6af260a41acaf3e3586465656953847bb349fe2): https://github/commit/c212975abe83bf462bc512288ba30358f9a17865
    - ecl current upstream: https://github/commit/99575d73e10aad06eb7d5b6415ea2db4151c5045
    - Changes: https://github/compare/c212975abe83bf462bc512288ba30358f9a17865...99575d73e10aad06eb7d5b6415ea2db4151c5045

    99575d7 2021-01-09 Paul Riseborough - EKF: Add bad accel bias checking for EV and range finder height use cases
ff3c0a6 2021-01-08 Paul Riseborough - EKF: Fix bug preventing recovery from bad delta velocity bias estimates
c25c97f 2021-01-08 priseborough - [AUTO COMMIT] update change indication
9641810 2021-01-08 Paul Riseborough - test: Allow for larger vel variance growth due to dvel bias variance
1b1c049 2021-01-08 Paul Riseborough - test: Update unit test to match expected behaviour
dd259a2 2021-01-07 Paul Riseborough - EKF: Don't modify accel bias states and variances when inhibited
3e1f2d8 2021-01-07 Paul Riseborough - EKF: Set dvel bias variance to stored value when state is inactive
2021-01-09 12:57:25 -05:00
xdwgood
802c68a62e Do not run transition flight task when not enable altitude control 2021-01-08 10:28:00 +01:00
PX4 BuildBot
168468c12a Update submodule ecl to latest Thu Jan 7 12:50:52 UTC 2021
- ecl in PX4/Firmware (c999734463c9b23c6b56670d5242ca4496f9e6ef): https://github/commit/03fed323ab950125114eb34309d3a79119e572ee
    - ecl current upstream: https://github/commit/c212975abe83bf462bc512288ba30358f9a17865
    - Changes: https://github/compare/03fed323ab950125114eb34309d3a79119e572ee...c212975abe83bf462bc512288ba30358f9a17865

    c212975 2021-01-06 bresch - rng height: reset to baro using common logic
2021-01-07 12:08:21 -05:00
Daniel Agar
88f8da27ef
save learned mag bias per sensor (Multi-EKF support)
- handle saving the mag bias per sensor (across all estimator instances using that mag) in sensors/vehicle_magnetometer
 - this is now saving back to the actual mag calibration CAL_MAGn_OFF{X,Y,Z}
 - ekf2 reset mag mag bias on any magnetometer or calibration change
 - use Kalman filter scheme to update stored mag bias parameters using all available bias estimates for that sensor

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-01-07 09:54:13 -05:00
Matthias Grob
537ee5b19b FlightTaskOrbit: smooth yaw like in missions 2021-01-07 13:31:05 +01:00
Matthias Grob
44606ca872 FlightTaskOrbit: further simplify circling yaw setpoint calculation
The whole angle adding and pi wrap was just necessary because the
correct atan2 arguments were never completely thought through.
2021-01-07 13:31:05 +01:00
Matthias Grob
6b8fa417e1 SlewRate: Add SlewRateYaw handling [-pi,pi] wraps 2021-01-07 13:31:05 +01:00
PX4 BuildBot
01e3f0d586 Update submodule matrix to latest Tue Jan 5 12:40:51 UTC 2021
- matrix in PX4/Firmware (fd97e28019fa9c665d9b3c6995098dd51b4ab022): https://github/commit/15e54ceda176f05e1ae38e71692d15cafb9e3a62
    - matrix current upstream: https://github/commit/054f8b12f4da79767df6e05bb1d2cc8d679b99f3
    - Changes: https://github/compare/15e54ceda176f05e1ae38e71692d15cafb9e3a62...054f8b12f4da79767df6e05bb1d2cc8d679b99f3

    054f8b1 2021-01-04 Julian Kent - Use a single inverse implementation for a single matrix size
2021-01-05 19:24:42 -05:00
PX4 BuildBot
ff82911d86 Update submodule ecl to latest Tue Jan 5 12:40:47 UTC 2021
- ecl in PX4/Firmware (824f78466ac4e32aecd6bda785e95eb348e1b31e): https://github/commit/78ce46f00777f07d24c31bdc5e2edb203be2c0f4
    - ecl current upstream: https://github/commit/03fed323ab950125114eb34309d3a79119e572ee
    - Changes: https://github/compare/78ce46f00777f07d24c31bdc5e2edb203be2c0f4...03fed323ab950125114eb34309d3a79119e572ee

    03fed32 2021-01-05 Paul Riseborough - EKF: Fix formatting
31fca9c 2021-01-05 Paul Riseborough - EKF: Update GPS loss message
c65cf13 2020-12-15 Paul Riseborough - EKF; Treat combined sideslip and airspeed as a horizontal aiding source
211c84c 2021-01-04 bresch - Rng finder unit test: cover "un-stuck" logic
2021-01-05 19:23:25 -05:00
Silvan Fuhrer
7c727edc3f Simple mixer: add output slew rate
This adds the option to limit the rate of change (slew rate) of an output that's mixed by a simple mixer.
To enable it, a positive number has to be added at the end (6th number) of the output scaler line of the mixer,
specifying the min rise time of this output.
E.g. O:      10000  10000      0 -10000  10000 20000 for a rise time of 2s, resp. a max slew rate of 0.5s^-1.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:32:22 +01:00
PX4 BuildBot
8c71ecd97e Update submodule ecl to latest Sat Jan 2 12:39:29 UTC 2021
- ecl in PX4/Firmware (03925cc70fd13c15a5dfe8ecc5653b91098ac68d): https://github/commit/18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef
    - ecl current upstream: https://github/commit/78ce46f00777f07d24c31bdc5e2edb203be2c0f4
    - Changes: https://github/compare/18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef...78ce46f00777f07d24c31bdc5e2edb203be2c0f4

    78ce46f 2020-12-19 Kamil Ritz - Removing Matlab derivation
2021-01-02 11:54:56 -05:00
Lorenz Meier
0bdae5745a
Update dsm.cpp
Fix documentation comment (reported by @Roman-, thanks!)
2021-01-01 15:30:25 +01:00
Lorenz Meier
9409122638 RC tests: Add new test file
This file is using a PX4IO-bound receiver on a DX9
2021-01-01 14:26:36 +01:00
Lorenz Meier
47fcf97442 DSM: Report frame drops
Frame drops were measured but not reported on PX4IO.
2021-01-01 14:26:36 +01:00
Daniel Agar
95dd2f7e8d rc/dsm: remove system field check, add new validity checks
- unfortunately we can't depend on the system field due to potential
external binding and non-genuine Spektrum equipment
 - reject any DSM frame with duplicate channels
 - add 16 channel mask
 - tighten valid PWM range 990-2010us (±100% travel is 1102-1898µs)
 - update RCTest rejected frame count
2021-01-01 14:26:36 +01:00
Lorenz Meier
af28a298e5 DSM driver: Add option for passive power controls 2020-12-31 13:22:52 +01:00
Daniel Agar
9f57df75e8 remove rotation 41 (ROLL_270_YAW_180)
- duplicate of 31 (ROLL_90_PITCH_180)
2020-12-28 11:07:08 +01:00
PX4 BuildBot
aa54db42ed Update submodule ecl to latest Sat Dec 26 12:39:53 UTC 2020
- ecl in PX4/Firmware (6a278fb230365aaf369956878ee08c3161ae739d): https://github/commit/df7f261e038aa80b07a91857f2f952280938bfc6
    - ecl current upstream: https://github/commit/18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef
    - Changes: https://github/compare/df7f261e038aa80b07a91857f2f952280938bfc6...18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef

    18f334f 2020-12-25 Mathieu Bresciani - flow: add unit test for yaw motion (#950)
2020-12-26 14:39:47 -05:00
PX4 BuildBot
3ff7cd94dd Update submodule ecl to latest Mon Dec 21 00:39:54 UTC 2020
- ecl in PX4/Firmware (caa35af3961aa96e2549a36f1fddb1a10ee802b2): https://github/commit/a8e0e82858318042500f96f5ee882c638f201426
    - ecl current upstream: https://github/commit/df7f261e038aa80b07a91857f2f952280938bfc6
    - Changes: https://github/compare/a8e0e82858318042500f96f5ee882c638f201426...df7f261e038aa80b07a91857f2f952280938bfc6

    df7f261 2020-12-20 Kamil Ritz - Add missing const modifier
2020-12-20 21:24:52 -05:00
PX4 BuildBot
5868463d06 Update submodule matrix to latest Fri Dec 18 12:38:33 UTC 2020
- matrix in PX4/Firmware (a505e82391bdb9d81c03d45919f2158cee6baa8c): https://github/commit/ea43303c1cd55b0da8e152373b49dd2d5e381772
    - matrix current upstream: https://github/commit/15e54ceda176f05e1ae38e71692d15cafb9e3a62
    - Changes: https://github/compare/ea43303c1cd55b0da8e152373b49dd2d5e381772...15e54ceda176f05e1ae38e71692d15cafb9e3a62

    15e54ce 2020-11-04 Julian Kent - Rework rank-detection tolerance in pseudoinverse
d9a5e3d 2020-11-04 Julian Kent - Add test for new cutoff threshold
2020-12-18 10:15:20 -05:00
PX4 BuildBot
66b3562080 Update submodule ecl to latest Fri Dec 18 00:39:53 UTC 2020
- ecl in PX4/Firmware (dc358857c877ae01b922d84a6c6fffe6d8c46810): https://github/commit/1541e4b414fe63ec9d6c3077375db7e20c20ef4a
    - ecl current upstream: https://github/commit/a8e0e82858318042500f96f5ee882c638f201426
    - Changes: https://github/compare/1541e4b414fe63ec9d6c3077375db7e20c20ef4a...a8e0e82858318042500f96f5ee882c638f201426

    a8e0e82 2020-12-08 Daniel Agar - EKF: update mag LPF immediately
398fe15 2020-11-02 Daniel Agar - EKF: allow initialising without mag depending on configuration
1237087 2020-12-16 Daniel Agar - AlphaFilter add constructor that takes alpha and use in EKF
37e84b7 2020-12-16 Daniel Agar - README: fix zenodo badge (rename ecl -> PX4-ECL)
5ccb8b4 2020-12-15 Mathieu Bresciani - fakePosFusion: reset _last_known_posNE to current state when starting (#943)
9d22f14 2020-12-10 bresch - gps_alt: constrain var using 1.5 as a typical ratio of vacc/hacc
b0cf45e 2020-12-10 bresch - gps_alt: rename getGpsAltVar -> getGpsHeightVariance
62f2e26 2020-12-10 bresch - gps_alt: reset GPS alt variance usign helper function
f7bddda 2020-12-10 bresch - gps_alt: do not scale up reported gps vertical accuracy
02369cd 2020-12-10 bresch - gps_alt: extract measurement variance computation and saturation
2020-12-17 20:13:03 -05:00
PX4 BuildBot
e5a00033f5 Update submodule matrix to latest Thu Dec 17 23:05:20 UTC 2020
- matrix in PX4/Firmware (788e6b9ad163f314ddd53a23f3705ca0018519f4): https://github/commit/a504b6e88152d88dba936bc74e449f2f281b84e2
    - matrix current upstream: https://github/commit/ea43303c1cd55b0da8e152373b49dd2d5e381772
    - Changes: https://github/compare/a504b6e88152d88dba936bc74e449f2f281b84e2...ea43303c1cd55b0da8e152373b49dd2d5e381772

    ea43303 2020-12-16 JacobCrabill - test/vector3: Add test for scalar +/- operators
158409a 2020-03-23 JacobCrabill - Vector3f: Add operator+/- for scalars
2020-12-17 19:05:46 -05:00
Daniel Agar
a152fb65cb
parameters: remove unnecessary duplicated shutdown lock in param_save_default()
- param_export already takes the shutdown lock
2020-12-16 10:50:05 -05:00
Hamish Willee
4bc60cca69 remove more occurrences 2020-12-16 08:37:42 +01:00
Hamish Willee
d58ee9400c system_params - remove duplicate text in param 2020-12-16 08:37:42 +01:00
Mathieu Bresciani
fdd1d6d244
Multicopter rounded turns (#16376)
* AutoLineSmoothVel: Implement l1-style guidance in turns
2020-12-14 13:04:01 +01:00
Daniel Agar
ef6209ba03
new manual_control_switches msg (split out of manual_control_setpoint) (#16270)
- split out switches from manual_control_setpoint into new message manual_control_switches
 - manual_control_switches published at minimal rate (~ 1 Hz) or immediately on change
 - simple switch debounce in rc_update (2 consecutive identical decodes required)
 - manual_control_switches logged at full rate rather than sampled at (5-10% of messages logged)
 - manual_control_setpoint publish at minimal rate unless changing
 - commander handle landing gear switch for manual modes
 - processing of mode_slot and mode_switch is now split so we only do one or the other (not both)
     - a future step will be to finally drop mode_switch and accompanying switches entirely

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2020-12-11 12:11:35 -05:00
Roman Bapst
842d98d572 AirspeedValidator: fuse true airspeed before sideslip (#742)
- the states can be initialised more accurately using an airspeed measurement
and the wind estimator uses the first measurement to initialise

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-12-11 09:37:09 +03:00
Daniel Agar
d44e537084
ekf2: update to new ecl to fix fault status getter
- estimator_status filter_fault_flags was broken because the union within ecl/EKF has exceeded 16 bits
2020-12-10 12:45:41 -05:00
PX4 BuildBot
7db555573b Update submodule ecl to latest Wed Dec 9 12:40:07 UTC 2020
- ecl in PX4/Firmware (ef162f7629ce29be8fd556b81357b96720d8e21f): https://github/commit/da7d41e78aecdc07d226bd7d723c747895d1c615
    - ecl current upstream: https://github/commit/8f3df7a97b348dd7bf06233004f9821fe2ea88d1
    - Changes: https://github/compare/da7d41e78aecdc07d226bd7d723c747895d1c615...8f3df7a97b348dd7bf06233004f9821fe2ea88d1

    8f3df7a 2020-12-09 Mathieu Bresciani - flow: restructure optical flow control logic (#928)
3835800 2020-12-09 kritz - Auto update change indication by github actions
688a054 2020-12-08 Daniel Agar - EKF: controlDragFusion() add parenthesis for readability
944b18c 2020-12-05 Paul Riseborough - EKF: Remove non useful status print
ee94980 2020-12-03 Paul Riseborough - EKF: Clean up wind state activation logic
44ebfb8 2020-12-02 Paul Riseborough - EKF: Don't report local position as valid when in a non-position mode
2020-12-09 13:12:58 -05:00
Daniel Agar
82746af07a
ekf2: use new IMU and mag bias and variance getters in ecl/EKF
- reset IMU bias on calibration change (only works with multi-ekf)
 - standardize PX4_INFO/PX4_WARN/PX4_ERR output for multi-ekf with instance number
 - https://github.com/PX4/PX4-ECL/pull/924
2020-12-08 16:06:18 -05:00
Julian Oes
fd261b590c battery: don't init uint16_t with -1.0f
This was flagged as undefined behaviour by fuzz testing.
2020-12-08 09:58:29 +01:00
bresch
3276916df9 HomePos: check corresponding validity before using data 2020-12-07 10:24:23 -05:00
Daniel Agar
01620420fa
ekf2: update to latest ecl with RingBuffer minor improvements
- includes https://github.com/PX4/PX4-ECL/pull/938
2020-12-03 21:17:22 -05:00
Matthias Grob
25c113a527 StickAccelerationXY: boost low speed brake 2020-12-03 18:19:42 +01:00
Matthias Grob
badaf1eae0 Functions: add squareroot linear function 2020-12-03 18:19:42 +01:00
Matthias Grob
3f3a82e034 FlightTaskManualAcceleration: reset position lock on reactivation
to prevent having a fixed position lock while moving the vehicle
on the ground before flying.
2020-12-03 18:19:42 +01:00
Matthias Grob
66f8fc08c0 FlightTasks: refactor to use isAnyTaskActive() 2020-12-03 18:19:42 +01:00
Daniel Agar
378c0b5093 parameters: find and get perf counters aren't threadsafe 2020-12-02 10:11:42 -05:00