Commit Graph

689 Commits

Author SHA1 Message Date
Roman aa53f45f15 terrain estimator: removed unused hrt dependancy
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Roman 6480fcc3d5 terrain estimator: fixed computation of filtered time since last range update
- do not use hrt to compute delta time
- limit filter state
- do not use static variables

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Paul Riseborough 6561edb9a5 EKF: Clean up terrain estimation functionality.
This is a functionally equivalent. It moves all of the code for the terrain estimator into a single function call from the main filter update, making it clear that it is independent of the main filter.
2017-02-22 14:12:05 +01:00
devbharat 8004e9fe7e EKF: Make range finder data continuous check more robust
Use a filtered arrival time delta to determine if range data is continuous
2017-02-22 14:12:05 +01:00
Paul Riseborough d94068b88a EKF: Simplify calculation of height above terrain observation variance
The tilt compensation being applied previously was based on a flat earth geometric model assuming perfect tilt knowledge which reduces the effect of range errors on height error as the vehicle tilts. however in the real world, variations in terrain gradient and uncertainty in vehicle tilt and sensor alignment tend to increase height error with tilt, so the adjustment of observation variance with tilt has been removed given we do not have a valid mathematical model on which to base it.
2017-02-22 14:12:05 +01:00
Paul Riseborough 3dadc98b43 EKF: enable scaling of range observation variance with height 2017-02-22 14:12:05 +01:00
Paul Riseborough cf9c8de167 EKF: Add arbitrary pitch offset for range sensor 2017-02-22 14:12:05 +01:00
devbharat d9688fae7d EKF: Simplify terrain position validity check
Remove the relative accuracy check that was false triggering close to ground
2017-02-22 14:12:05 +01:00
Paul Riseborough af26ade1ce EKF: Use norm for vector length everywhere 2017-02-22 14:12:05 +01:00
Paul Riseborough 6e5a9aabe1 Merge pull request #234 from PX4/pr-optFlowUpdates
EKF: optical flow improvements
2017-02-22 09:00:48 +11:00
Andreas Antener 66b8f7ec5b Removed obsolete fields from ECL control data 2017-02-12 11:40:14 +01:00
Andreas Antener 5363e8d307 Wheel controller: use library function to wrap pi 2017-02-12 11:40:14 +01:00
Daniel Agar 674ab3f81b attitude_fw fix style 2017-02-12 11:40:14 +01:00
Roman f22ad30ef3 removed turn compensation flag form control data since it's obsolete
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman e1f9874c82 wheel controller: fix computation and scaling of integrator
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman c4cc02b3f2 yaw controller: fix bug where roll for turn coordination was constrained
wrongly

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 391b6dfd00 yaw controller: for now do not do turn compensation when inverted and use
the roll setpoint as limit for turn compensation

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 66b7773059 yaw controller: deactivate lateral acceleration control for now but
put comment of how to do it properly

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman f300877db4 yaw controller: computed desired yaw rate based on coordinated turn constraint
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
Roman 4057defa53 pitch controller: removed turn offset compensation form pitch controller
- turn compensation is included in the desired yawrate

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-12 11:40:14 +01:00
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
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