Commit Graph

870 Commits

Author SHA1 Message Date
Roman 55401ec1b0 fw attitude control: compute integrator correctly
- I gain was applied wrongly, such that the integrator value was depending
direcly on the I gain. This made the integrator value jump when the gain
was changed

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman ac7fc30ea7 fw attitude controllers: restructuring in order to allow acro flight mode
- split rate control into body rate control and euler rate control
- this allows standard attitude control but also direct rate control
of all three axes
- allow activation/deactivation of turn compensation

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Daniel Agar 2750961be6 c++11 initialization cleanup (#237) 2017-02-05 13:05:10 -05:00
Daniel Agar 7883085e4a clang-tidy readability-simplify-boolean-expr (#235) 2017-02-02 00:17:43 -05:00
Daniel Agar 47b8ef258b clang-tidy performance-type-promotion-in-math-fn (#236) 2017-02-02 00:17:08 -05:00
Paul Riseborough bcf7cac5d9 EKF: remove hardcoded limit on optical flow time delta
Allow for up to 50% lost data.
2017-01-18 06:06:45 +11:00
Paul Riseborough 3fb7effb0c EKF: Allow optical flow use when on-ground with poor data quality 2017-01-18 06:06:45 +11:00
Paul Riseborough 21270bb06a EKF: Use last known position when resuming OF aiding 2017-01-17 08:58:01 +11:00
Lorenz Meier 453bde73f8 ECL: Simplify / correct estimator interface 2017-01-15 10:17:41 +01:00
Roman c5a55d97aa initialise data members properly
- dot not use memset for struct with non POD types

Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-15 10:02:31 +01:00
Paul Riseborough 1465adca2f EKF: Improve use of memcpy
Changes made to remove Coverity scan errors
2017-01-15 10:02:31 +01:00
Paul Riseborough 26a06567bb EKF: add missing initialisation for class variables 2017-01-15 10:02:31 +01:00
Paul Riseborough f999729d70 EKF: fix incorrect use of memcpy 2017-01-15 10:02:31 +01:00
Paul Riseborough b536382ae1 EKF: remove dead code 2017-01-15 10:02:31 +01:00
Paul Riseborough 6358bbd257 EKF: remove self assignment 2017-01-15 10:02:31 +01:00
Paul Riseborough 3b61528f0f EKF3: initialise default value for EV fusion gate 2017-01-15 10:02:31 +01:00
Paul Riseborough 9ddcba3ed0 EKF: remove un-used variable 2017-01-15 10:02:31 +01:00
Daniel Agar d668a2d798 clang-tidy performance-unnecessary-value-param 2017-01-14 16:26:25 -08:00
Daniel Agar a7cdef6c5c clang-tidy modernize-redundant-void-arg 2017-01-14 16:24:45 -08:00
Nic ec1a14bc6b height counter needs to be updated with ev counter value when our primary height source is set to ev 2017-01-05 21:47:13 -08:00
Paul Riseborough 3c4c09593f EKF: Rationalise console messages
Combine the observation action buffer and alignment messages
Ensure all data timeout messages are warnings.
Use consistent terminology.
2016-12-28 10:39:47 +01:00
Paul Riseborough 934890c2df EKF: Add validity flag to ekf origin reporting
Flag is false until the origin has been initialised
2016-12-28 00:56:09 +01:00
Dennis Mannhart b154ce9c33 Fixed include for snapdragon 2016-12-23 10:22:25 +01:00
Lorenz Meier 9618adb542 Simplify switch logic for validator 2016-12-21 08:10:08 +01:00
Lorenz Meier 6f78ef4084 Update validator to provide correct response for single sensor usage 2016-12-17 20:44:46 +01:00
Lorenz Meier aad3a2b751 Validator: Trim down printing and do not reset init state 2016-12-17 17:39:55 +01:00
Lorenz Meier 75520641a5 Make the equal value threshold configurable 2016-12-17 15:25:29 +01:00
Lorenz Meier 00dbffe11d Validator whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier bf8a9a3d09 EKF: Whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier 6282c72d2e Validation: Whitespace fixes 2016-12-17 13:45:28 +01:00
Lorenz Meier 10c6ae77ae Attitude fw yaw: Initialize yaw rate properly 2016-12-17 13:45:28 +01:00
Daniel Agar 983c44088f fw att fix pitch feedforward constrained roll 2016-11-27 12:34:12 +01:00
Paul Riseborough a776b2c549 EKF: Fix bug preventing reset to GPS position when using optical flow 2016-11-26 10:28:58 +01:00
Paul Riseborough 460c9e5250 EKF: Don't try to fuse air data if not in normal aiding mode
Taking off before passing GPS checks would cause airspeed or sideslip to be fused when the filter was still using a constant position assumption. This would cause large airspeed innovations, invalid wind estimates and degrade filter performance after GPS was gained and position and velocity was reset.
2016-11-26 10:28:58 +01:00
Paul Riseborough 5ad329b641 EKF: Fix variable names to match convention 2016-11-07 22:23:12 +11:00
Paul Riseborough afd6e54b2a EKF: Allow for worst case timing jitter when setting observation buffer length 2016-11-07 11:50:16 +11:00
Paul Riseborough 403424d55d EKF: fix cross compiler build errors 2016-11-07 09:38:44 +11:00
Paul Riseborough d5b398ddb1 EKF: Minimise data buffer lengths
Saves RAM and reduces output predictor errors by using the smallest data buffer length that meets time delay and update rate requirements.
2016-11-07 09:06:45 +11:00
Paul Riseborough 750a8874c1 EKF: Improve recovery and reporting for badly conditioned sideslip fusion
Do not reset the entire covariance matrix if we are only using sideslip fusion to update wind states.
Improve reporting.
2016-11-05 12:19:01 +01:00
Paul Riseborough 6c7703d485 EKF: Update tuning for synthetic sideslip fusion
Used value that worked well for replay of flight logs
2016-11-05 12:19:01 +01:00
Paul Riseborough f76a2a5ff7 EKF: fix bug in sideslip fusion and reduce RAM usage
The bug meant the  Y velocity (state index 5)  covariance was not being updated correctly when sideslip was being used to constrain velocity drift (extended GPS loss).
The rework of the covariance update to reduce RAM follows the same pattern as adopted for other fusion processes
2016-11-05 12:19:01 +01:00
Paul Riseborough 951c8b77af EKF: Improve wind state reset logic
Enables wind estimation without an airspeed sensor and enables synthetic sideslip to be used with an airspeed sensor for improved wind state estimation.
Wind states and covariances are reset differently depending on whether airspeed is available.
2016-11-05 12:19:01 +01:00
Paul Riseborough 2fedbc8a18 EKF: Refresh sideslip fusion auto-code and improve covariance update efficiency 2016-11-05 12:19:01 +01:00
Paul Riseborough 352b4ca177 EKF: Allow sideslip fusion with airspeed fusion 2016-11-05 12:19:01 +01:00
Paul Riseborough fb6f4be453 EKF: don't allow sideslip fusion to affect non-airspeed states if not deae-reckoning 2016-11-05 12:19:01 +01:00
CarlOlsson a9182259a5 fixed bug in beta fusion 2016-11-05 12:19:01 +01:00
CarlOlsson 0e3ae4b323 fixed issue with the covariance update in synthetic sideslip fusion 2016-11-05 12:19:01 +01:00
CarlOlsson e1d9d503e3 updated logic of when to fuse beta. Now synthetic sideslip measurements are fused after 5 seconds of cruise flight with airspeed sensor activated 2016-11-05 12:19:01 +01:00
CarlOlsson dec686afd7 updated parameters 2016-11-05 12:19:01 +01:00
CarlOlsson 5205a8198b added function to control when to fuse beta 2016-11-05 12:19:01 +01:00