Commit Graph

417 Commits

Author SHA1 Message Date
Paul Riseborough 4fbdab27ff AP_NavEKF: Use range finder for primary hgt ref in opt flow mode
Falls back to baro if range finder is unavailable
Adds parameter enabling user to select which height source (baro or range finder) will be used during optical flow nav.
2015-04-10 11:08:07 +09:00
Paul Riseborough d618c55e2f AP_NavEKF: Improved handling of noisy GPS speed accuracy data 2015-04-10 11:07:34 +09:00
Paul Riseborough e98edaa6cb AP_NavEKF: Return more accurate validity status for height above ground 2015-04-10 11:07:24 +09:00
Paul Riseborough c57e25142c AP_NavEKF: Update optical flow fusion maths to reduce height errors 2015-04-07 20:51:18 -07:00
myly10 55befdc345 AP_NavEKF: Typo correction for EAS_NOISE description 2015-04-06 15:52:29 -07:00
Paul Riseborough 9b3656e77c AP_NavEKF: Fix bug introduced in Y axis flow fusion 2015-04-05 21:17:20 -07:00
Andrew Tridgell baf292def1 AP_NavEKF: prevent float exception on startup 2015-04-05 09:16:14 -07:00
Paul Riseborough 7fc0f026d2 AP_NavEKF: Fix bug in optical flow innovation variance integrity check
The check allowed negative innovation variances to pass. If this did occur, the filter would diverge.
2015-04-04 17:03:06 -07:00
Andrew Tridgell c1a0375562 AP_NavEKF: prevent divide by zero in EKF logging 2015-04-04 07:09:02 -07:00
Paul Riseborough 10f050c53b AP_NavEKF: Prevent baro drift causing toilet bowling
The magnetic field states are reset once at 1.5 metres and again at 5 metres. This height check was using the height at the first arm event as the reference. In the situation where there is baro drift and extgended time between the first arm event and flight, this can cause the magnetic field state to be reset when on the ground. If this happens when flying off a metallic surface, the resultant heading errors can cause sever toilet bowling.
2015-04-03 15:18:42 -07:00
Paul Riseborough d4c60ca956 AP_NavEKF: Fix bug preventing reset of velocity after OF fusion timeout 2015-04-03 15:18:39 -07:00
Jonathan Challinger 95cd3480ec AP_NavEKF: review all uses of dtIMU and use dtIMUactual where necessary
pair-programmed-with: Paul Riseborough <p_riseborough@live.com.au>
2015-04-03 15:18:09 -07:00
Andrew Tridgell 79b44d3988 AP_NavEKF: initialise gndEffectMode 2015-04-03 15:15:11 -07:00
Andrew Tridgell 3165c43dfe AP_NavEKF: initialise gpsSpdAccuracy 2015-04-03 15:15:11 -07:00
Paul Riseborough 98c32012fa AP_NavEKF: remove accel bias rate limit when disarmed 2015-04-03 15:15:11 -07:00
Paul Riseborough fe76cb4c0b AP_NavEKF : Make initial height variance consistent with baro noise
This makes sense to do because we initialise the state to the instantaneous baro reading
2015-04-03 15:15:11 -07:00
Paul Riseborough a976e9dad2 AP_NavEKF : Fix bug in scaling of initial Z accel bias state variance 2015-04-03 15:15:11 -07:00
Paul Riseborough 92df3adb5e AP_NavEKF : Fix bug in Z accel bias update for IMU1 2015-04-03 15:15:10 -07:00
Paul Riseborough 5d0952ba23 AP_NavEKF: eliminate onGndBaroNoise 2015-04-03 15:15:10 -07:00
Paul Riseborough fafb898341 AP_NavEKF: tuning change to accel bias learning 2015-04-03 15:15:10 -07:00
Paul Riseborough 398accd151 AP_NavEKF: Improve pre-flight ready checking 2015-04-03 15:15:10 -07:00
Paul Riseborough 5c1a226bef AP_NavEKF : Improvements to pre-arm IMU bias estimation 2015-04-03 15:15:10 -07:00
Jonathan Challinger a5924acb3d AP_NavEKF: set dtIMU from ins expected sample rate 2015-04-03 15:15:10 -07:00
Paul Riseborough a1351e73ab AP_NavEKF : Compensate mag bias states for external copass offset changes 2015-04-03 15:15:09 -07:00
Paul Riseborough 14795719f6 AP_NavEKF: Add public function for estimated magnetometer offsets 2015-04-03 15:15:09 -07:00
Paul Riseborough 1c244af3d8 AP_NavEKF: Fix bug affecting in-flight GPS acquisition
This bug caused velocities to be reset to zero
2015-04-03 15:15:09 -07:00
Paul Riseborough b9b6938b1d AP_NavEKF: Add ability to start using GPS in-flight
Improve the quality of the GPS required to set an EKF  origin
Eliminate repeated update of origin height - origin height updates once when EKF origin is set.
Operation in GPS mode is linked to setting of origin
2015-04-03 15:15:09 -07:00
Paul Riseborough 98fa918b84 AP_NavEKF: Add new compass learning option
Enables compass learning to be on continuously for non-position hold operation
2015-04-03 15:15:09 -07:00
Paul Riseborough 961faa59d9 AP_NavEKF: Don't let reported GPS accuracy modify horiz vel data checks 2015-04-03 15:15:08 -07:00
Paul Riseborough a607eb8469 AP_NavEKF: Reduce the GPS glitch tether length from 100 to 50m 2015-04-03 15:15:08 -07:00
Paul Riseborough 496d31ab83 AP_NavEKF: Reduce max time Copters can reject GPS
The maximum time copters can reject GPS has been reduced from 10 to 7 seconds as flight logs have show that inertial dead reckoning with vibration and calibration errors is not good enough to support 10 seconds without aiding.
2015-04-03 15:15:08 -07:00
Paul Riseborough 8c2029d896 AP_NavEKF: Accel bias learning improvements
Speed up pre-flight learning
Smoothen in-flight learning
2015-04-03 15:15:08 -07:00
Paul Riseborough 19d1b3b813 AP_NavEKF: Update EKF origin height whilst disarmed
This patch causes the EKF to update the height of its origin each time it receives a valid GPs message whislt disarmed.
The resultant EKF origin height represents the height of the zero baro alt datum relative to the GPS height datum.
2015-04-03 15:15:08 -07:00
Paul Riseborough 70afcd7e70 AP_NavEKF: Add second stage alignment of yaw and earth field states
Flight tests have shown that the magnetic field distortion associated with flight from steel structures can extend 3m or higher. To counteract this, a second and final yaw and magnetic field alignment has been added which is activated when the height exceeds 5m for the first time.
2015-04-03 15:15:08 -07:00
Paul Riseborough ed9c05cf2a AP_NavEKF: Remove logic used to delay fusion for load levelling
Logic used to delay optical flow and airspeed fusion to prevent it occurring on the same time step as magnetometer fusion has been removed. This is no longer required to efficiency improvements made at the firmware level.
2015-04-03 15:15:07 -07:00
Paul Riseborough c0d23ffc30 AP_NavEKF: Filter accuracy and stability improvements
Improvements in PX4 firmware have reduced the computational load  and mkae the previous practicwe of splitting magnetometer and optical flow fusion across multiple time steps unnecessary and make it possible to perform a covariance prediction prior to fusing data on the same time step. This patch:

1) Ensures that a covariance prediction is always performed prior to fusion of any observation
2) Removes the splitting of magnetometer fusion so that fusion of the X,Y and Z components occurs on the same time time step
3) Removes the splitting of optical flow fusion so that fusion of X and Y components occurs on the same time step
2015-04-03 15:15:07 -07:00
Jonathan Challinger de1f7f5e63 AP_NavEKF: use published delta velocities and delta angles if available 2015-04-03 15:15:07 -07:00
priseborough 3421a320b5 AP_NavEKF: Compensate for ground effect when takeoff or landing expected 2015-04-03 15:15:07 -07:00
Jonathan Challinger 20d92f5f9d AP_NavEKF: floor GPS velocity noise at parameter value for conservatism 2015-04-03 15:15:07 -07:00
priseborough 9a797a5d49 AP_NavEKF: Use GPS reported speed accuracy if available
UBlox receivers report an estimate of the speed accuracy that tests show correlates well to speed glitches. Using this to scale the GPS velocity observation noise will reduce the effect of bad GPS velocity data.
2015-04-03 15:15:06 -07:00
Andrew Tridgell 3289d38339 AP_NavEKF: make the init functions return bool
we need to know if it has initialised successfully
2015-03-28 10:51:38 -07:00
Andrew Tridgell de3f461a55 AP_NavEKF: use compass->last_update_usec() 2015-03-14 12:31:39 +11:00
Randy Mackay 230ca583d1 NavEKF: support sending EKF_STATUS_REPORT 2015-03-12 12:20:00 +09:00
Paul Riseborough 9f552eaa4b AP_NavEKF: Fix bug that resets position to origin when vehicle arms 2015-02-12 12:40:55 +11:00
Paul Riseborough b8d3da3846 AP_NavEKF: Report last known position when vehicle is disarmed 2015-02-12 12:40:55 +11:00
Jonathan Challinger 50466848f7 AP_NavEKF: use hal.util soft_armed state 2015-02-11 20:25:11 +11:00
Paul Riseborough aa94ff629d AP_NavEKF: Prevent bad GPS pre-arming casuing initial position errors
If the vehicle moves significantly or the GPS changes position significantly pre-armed, then the GPS glitch logic was being invoked when the first GPs measurements were fused. This patch resets the position to the GPS when the vehicle arms.
2015-02-03 15:57:10 +09:00
priseborough bc5581d634 AP_NavEKF: Prevent arming delays from failing GPS
Due to the way that gyro calibration is done, the EKF could be effectively not run for up to 30 seconds in extreme cases, making it possible that the GPS would be failed on arming and the copter put into a non-GPS mode.

the longer term solution is to update the gyro calibration so that it does not hold up other processing. the short tyermfix in thsi patch is to look for evidence of a 3D lock in the last received GPS message.
2015-02-03 15:57:09 +09:00
priseborough 2c012c2763 AP_NavEKF: Always check for new GPS data
This fixes a bug that meant that once the EKF had started up in a non-GPS mode, it would no longer read the GPS and therefore would never be able to use GPS again until reset.
2015-02-03 15:57:08 +09:00
Andrew Tridgell 850af14949 AP_NavEKF: raise EKF_POS_GATE and EKF_GLITCH_RAD for planes
This weights GPS position more heavily for planes

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2015-01-31 21:49:20 +11:00