2554 Commits

Author SHA1 Message Date
Matthias Grob
39b0c7b2bf battery: report at least one cell for a connected battery 2021-01-18 17:53:17 +01:00
Matthias Grob
d9954ecaf0
lib/magnetometer_bias_estimator: Add library for online magnetometer calibration on the ground
Co-authored-by: bresch <brescianimathieu@gmail.com>
2021-01-18 11:44:58 -05:00
Julien Lecoeur
343cf5603e initial control allocation support
- control allocation module with multirotor, VTOL standard, and tiltrotor support
 - angular_velocity_controller
 - See https://github.com/PX4/PX4-Autopilot/pull/13351 for details

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Roman Bapst <bapstroman@gmail.com>
2021-01-18 11:25:37 -05:00
Matthias Grob
02c0f08060 flashfs: fix alignment ambiguity
Instead of ignoring the warnings.
Thanks to @Ole2mail and @yuhaim for the suggestions.
2021-01-18 14:19:29 +01:00
Daniel Agar
4d7b875ee2 flight_mode_manager: merge with flight_tasks 2021-01-17 15:46:30 +01:00
RomanBapst
f05599caff tecs: use speed derivative provided by local position
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
e546584555 tecs: moved trivial getter methods to header file
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Roman Bapst
701c105ab6 Update src/lib/tecs/TECS.cpp
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
fa559aef43 TECS: stop learing integrator if airspeed is not available, but don't zero it
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
d4d1c0fe01 TECS: some cosmetics
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
97cc1e25dd TECS: hande pitch and throttle integrator saturation consistently
- don't decay integrator during saturation but prevent it from being learned
into the direction which causes more actuator saturation

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
77627a08ca TECS: don't allow speed height weights to be larger than one
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer
3102b9f071 TECS: remove throttle integral limits
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
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