Commit Graph

14232 Commits

Author SHA1 Message Date
priseborough a2bd3b4a42 AP_NavEKF: Add public method returning height above ground level 2014-12-06 18:16:51 +11:00
priseborough d701cfcb75 AP_NavEKF: Output terrain relative PosD when relying on Optical Flow 2014-12-06 18:16:51 +11:00
priseborough 0156d846f1 AP_NavEKF: Increase height at which nav gain reduction starts
Compensates for optical flow induced noise increase with height.
2014-12-06 18:16:51 +11:00
priseborough 12ea1d6e85 AC_AttitudeControl: Scale angle demand noise filter
Scales filter frequency using EKF nav gain scaler to take advantage of the reduced nav frequency whichcan tolerate a slower angle response.
This is required to reduce the effect of EKF optical flow noise increase with height.
2014-12-06 18:16:51 +11:00
priseborough a905432ffe AP_NavEKF: reduce height at which nav gain reduction starts 2014-12-06 18:16:51 +11:00
priseborough 5785272933 AP_NavEKF: Improve robustness to corrupted flow sensor data 2014-12-06 18:16:51 +11:00
priseborough b1d44d4dde AP_NavEKF: Add protection for negative height above ground 2014-12-06 18:16:50 +11:00
priseborough 963cc4d60a Copter: Add velocity gain scaler to interfaces
Allows nav gain to be scaled to compensate for optical flow noise
2014-12-06 18:16:50 +11:00
priseborough e80b1c67cd AC_AttitudeControl: Add EKF optical flow noise gain scaler
Allows gains to be adjusted to compensate for optical flow noise
2014-12-06 18:16:50 +11:00
priseborough 11fb51ceba AC_WPNav: Add nav velocity gain scaler to interfaces
Allows gains to be adjusted to compensate for optical flow noise
2014-12-06 18:16:50 +11:00
priseborough 9e7709fa09 Copter: Expand EKF speed limit public method to handle control limits 2014-12-06 18:16:50 +11:00
priseborough 5b8265ad6f AP_AHRS: Expand EKF speed limit public method to handle control limits 2014-12-06 18:16:50 +11:00
priseborough d994da0886 AP_NavEKF: Expand EKF speed limit public method to handle control limits 2014-12-06 18:16:50 +11:00
priseborough 9844dacf40 Copter: Add EKF ground speed limit to loiter speed control
This is required to prevent the speed controller saturating the optical flow sensor during low altitude flying.
2014-12-06 18:16:50 +11:00
priseborough 5fa0c59310 AC_WPNav: Add EKF ground speed limit to loiter speed control
This is required to prevent the speed controller saturating the optical flow sensor during low altitude flying.
2014-12-06 18:16:50 +11:00
priseborough 83775554ea AP_AHRS: Publish EKF ground speed limit 2014-12-06 18:16:50 +11:00
priseborough bc2255d6b1 AP_NavEKF: Improve comments in setInhibitGPS public method 2014-12-06 18:16:50 +11:00
priseborough 416eaf4633 AP_NavEKF: Apply single definition of using optical flow 2014-12-06 18:16:50 +11:00
priseborough b56b68ce10 AP_NavEKF: Add public method reporting horizontal speed limit
This is required if using optical flow, as depending on height, the speed must be limited to prevent the sensor saturating
2014-12-06 18:16:50 +11:00
priseborough c8fb376cc4 AP_NavEKF: Fix bug in bias rate of change limiting
This doesn't change the behaviour, but means the result is achieved using the correct parameters, and comments are consistent
2014-12-06 18:16:50 +11:00
priseborough 599e53f3f2 AP_NavEKF: Prevent flow scale factor updating on ground 2014-12-06 18:16:49 +11:00
priseborough 083e22966c AP_NavEKF: Add public method to report available output data 2014-12-06 18:16:49 +11:00
priseborough 5532750a99 AP_AHRS: Add public method to inhibit GPS useage when using EKF
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
2014-12-06 18:16:49 +11:00
priseborough e53d28854e AP_NavEKF: Add public method to inhibit GPS use and clean-up GPS use logic
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
2014-12-06 18:16:49 +11:00
priseborough 8fb1d9cf8d AP_NavEKF: Fix bug preventing opt flow scale factor estimation
Also removes un-used variable declarations
2014-12-06 18:16:49 +11:00
priseborough a78920761c AP_NavEKF: Update comments in flow data interface 2014-12-06 18:16:49 +11:00
priseborough 063fb41748 AP_OpticalFlow: Add separate scale factors for X and Y axis.
The resolution is also increased to take advantage of the planned introduction of automated calibration methods
2014-12-06 18:16:49 +11:00
priseborough 52c7e56a4a AP_NavEKF: Add parameter for max valid optical flow rate magnitude 2014-12-06 18:16:49 +11:00
priseborough 6f8971d80a AP_NavEKF: Speed up flow sensor gyro bias correction 2014-12-06 18:16:49 +11:00
priseborough d7ad45ebda AP_NavEKF: Don't fuse flow measurements if too big 2014-12-06 18:16:49 +11:00
priseborough 2dff76394d AC_PosControl: Add spike and noise filter to demanded angles
This has been done to provide a smooth psotion hold when using an optical flow aided EKF which can be noisy.

Signed-off-by: priseborough <p_riseborough@live.com.au>
2014-12-06 18:16:49 +11:00
priseborough 84944fdd4e AP_NAvEKF: Revert back to 10Hz fusion 2014-12-06 18:16:49 +11:00
priseborough f4f0dfc45c AP_OpticalFlow: efficiency improvements to data processing 2014-12-06 18:16:49 +11:00
priseborough 1f78a73cdb AP_NavEKF: Make flow measurement delay vehicle specific
This takes into account the inter-sampling delay between the flow driver and the APM software which depends on the rate at which the dirver is being checked. This is 50Hz for plane and rover, and 200Hz for Copter.
2014-12-06 18:16:49 +11:00
priseborough f23722ecee Plane: Remove statement about flow driver rate in comment 2014-12-06 18:16:48 +11:00
priseborough 5f941655a8 AP_NavEKF: changes to support to 20Hz flow fusion rate 2014-12-06 18:16:48 +11:00
priseborough 715d64dce9 Copter: Check for new optical flow updates at 200Hz
Supports use of higher flow read rates if required.
2014-12-06 18:16:48 +11:00
priseborough ca53d5fb62 Plane: Increase rate at which optical flow sensor is checked
The sensor driver runs asynchronously at 10Hz, so needs to be checked frequently for arrival of data.
2014-12-06 18:16:48 +11:00
priseborough 468c83c074 Copter : Check for new optical flow readings every 10ms
The driver polls the sensor asynchronously every 100 msec, so we need to continually check for new data.
2014-12-06 18:16:48 +11:00
priseborough 0bf991eef9 AP_NavEKF: Fix bug in optical flow fusion smoothing 2014-12-06 18:16:48 +11:00
priseborough 7d27a22f77 DataFlash : Fix EKF optical flow logging bug 2014-12-06 18:16:48 +11:00
priseborough 7ec8dfebcf AP_OpticalFlow : Remove gyro scale factor user adjustable parameter
No longer required because bug in flow sensor has been fixed.
2014-12-06 18:16:48 +11:00
priseborough 898ad7432b Plane : Only build optical flow with PX4 board
Fixes SITL compile errors
2014-12-06 18:16:48 +11:00
priseborough be54f2d6ee Copter : Don't force pre-compiler inclusion of optical flow 2014-12-06 18:16:48 +11:00
priseborough 2baa1e56ed Dataflash : Fix bug in EKF opt flow logging 2014-12-06 18:16:48 +11:00
priseborough df59f3311a AP_OpticalFlow : Add gyro scale factor correction parameter 2014-12-06 18:16:48 +11:00
priseborough eec49ce1dd AP_OpticalFlow : Add parameter for flow rate scale factor correction 2014-12-06 18:16:48 +11:00
priseborough 2500f7e9c2 Plane : Add data logging for optical flow use with EKF 2014-12-06 18:16:48 +11:00
priseborough 2db9247117 Plane : Add logging and EKF read for updated flow sensor interface 2014-12-06 18:16:47 +11:00
priseborough 6d5fb33d1a Copter : enable optical flow by default 2014-12-06 18:16:47 +11:00