Commit Graph

466 Commits

Author SHA1 Message Date
Tom Pittenger
3276eec30e AP_NavEKF: compiler warnings: apply is_zero(float) or is_equal(float) 2015-05-05 13:26:52 +10:00
Andrew Tridgell
ce0a863d01 AP_NavEKF: allow for optimisation of the EKF
disable optimisation when debugging needed
2015-05-05 09:45:53 +10:00
Paul Riseborough
be04be9b43 AP_NavEKF: Fix bug preventing home position being set by copter
The interface definition has been modified so that it returns true for a position obtained usin geither the normal inertial navigation calculation, or a raw GPS measurement.
This enables this function to be used to set a home position before flight.
2015-05-02 17:20:21 +09:00
Randy Mackay
fb7e75594f AP_NavEKF: replace memset with quaternion.initialise 2015-05-01 16:37:35 +09:00
Paul Riseborough
b71b8f4bda AP_NavEKF: Always return a NED relative position if possible
If a calculated position is not available, the function will return a value based on raw GPS or last calculation if available, but the status will be set to false to indicate that it cannot be used for control.
2015-05-01 16:37:32 +09:00
Paul Riseborough
20ba1e6b1b AP_NavEKF: Always return a WGS-84 location if possible
If a calculated location is not available, the function will return raw GPS data if available, but the status will be set to false.
2015-05-01 16:37:31 +09:00
Paul Riseborough
dd1e0b2f0b AP_NavEKF: Add missing function to return the NED to XYZ quaternion 2015-05-01 16:37:30 +09:00
Paul Riseborough
2c4572eb50 AP_NavEKF: Make ground effect variable names more descriptive 2015-05-01 16:37:29 +09:00
Paul Riseborough
3986851c51 AP_NavEKF: Prevent Z accel bias changing during ground effect takeoff
The inconsistent baro data during ground effect takeoff combined with the larger variances in the Z accel bias state early in flight can cause unwanted changes in bias estimate and therefore changes in height estimation error.
This patch turns of the process noise and state updates for the Z accel bias state when takeoff in ground effect is expected.
2015-05-01 16:37:28 +09:00
Paul Riseborough
2cba60c731 AP_NavEKF: Decouple takeoff ground effect compensation from arm transtion
Thsi fixes a potential bug where the vehicle could land at a lower location without disarming and re-enter ground effect takeoff mode wiht a baro height floor above the current altitude, causing unpredictable height gain
2015-05-01 16:37:27 +09:00
Paul Riseborough
c4c0f819b5 AP_NavEKF: Ensure Covariance initialisation uses correct IMU time step 2015-05-01 16:37:26 +09:00
Paul Riseborough
5dc29699ab AP_NavEKF: Publish the INS delta quaternion 2015-05-01 16:37:25 +09:00
Paul Riseborough
d273302ce7 AP_NavEKF: Improve rate of accel bias learning before flight 2015-05-01 16:37:24 +09:00
Paul Riseborough
8dc6354a54 AP_NavEKF: Prevent touchdown baro errors tripping height innovation check
Ground effect baro errors can cause a spike in height innovation on disarming if ground effect compensation was used during the landing. This causes a transient AHRS fault message if this innovation is outside the pre-arm check limits.
Resetting the vertical position state to the measured height after disarming prevents this.
2015-05-01 16:37:23 +09:00
Jonathan Challinger
2f38dd1b67 AP_NavEKF: use quaternion functions to apply IMU delta angles 2015-05-01 16:37:22 +09:00
Jonathan Challinger
9c374eb4a8 AP_NavEKF: apply constrained floor to barometer innovation while landing 2015-05-01 16:37:21 +09:00
Jonathan Challinger
3c6446fadd AP_NavEKF: refactor meaHgtAtTakeOff filter 2015-05-01 16:37:20 +09:00
Paul Riseborough
744de74c16 AP_NavEKF: Reduce ground effect baro induced height errors during takeoff 2015-05-01 16:37:19 +09:00
Paul Riseborough
13616d6436 AP_NavEKF: Add takeoff and touchdown expected to reported filter status 2015-05-01 16:37:19 +09:00
Jonathan Challinger
8c92524b8a AP_NavEKF: add takeoffExpected and touchdownExpected 2015-05-01 16:37:18 +09:00
Jonathan Challinger
b6b55bf6f2 AP_NavEKF: integrate gravity over correct time period 2015-05-01 16:37:17 +09:00
Jonathan Challinger
cb0c424da1 AP_NavEKF: rewrite readIMUData 2015-05-01 16:37:16 +09:00
Andrew Tridgell
514c349060 AP_NavEKF: raise DCM error_rp threshold to 0.05
it was failing on many boards with fixed wing
2015-04-28 14:07:39 +10:00
Tom Pittenger
a340d13d01 NavEKF: fix compile warning re member init order 2015-04-24 14:14:12 +09:00
Tom Pittenger
d6b34209b5 NavEKF: fix compile warnings re float constants 2015-04-24 14:04:02 +09:00
Randy Mackay
b05bdd657d AP_NavEKF: getHeightControlLimit modifies height on success 2015-04-24 10:58:05 +09:00
Paul Riseborough
cf04600710 AP_NavEKF: Add public function to limit height control during OF nav 2015-04-24 10:57:56 +09:00
Paul Riseborough
68b225de4d AP_NavEKF: Prevent pre-arm baro drift affecting mag field reset height 2015-04-24 10:57:54 +09:00
Paul Riseborough
c2e6fdb56c AP_NavEKF: Reduce effect of noisy baro data on baro height offset estimate
This estimate is used to offset baro data if we need to switch across from range finder data due to sensor failure. The previous filter coefficients gave a 0.5 seconds time constant on the offset which was too susceptible to baro noise.
2015-04-24 10:57:51 +09:00
Paul Riseborough
fd7fdc1ad9 AP_NavEKF: Remove unnecessary state resets on arm and disarm
Resetting states unnecessarily creates transients due to presence of bias errors
2015-04-24 10:57:49 +09:00
Paul Riseborough
3e67080002 AP_NavEKF: Use GPS vertical velocity observations to estimate Z accel bias 2015-04-24 10:57:47 +09:00
Paul Riseborough
e48171ab11 AP_NavEKF: Improve takeoff with optical flow and range data loss
Range finder and optical flow data can drop-out and be reliable very close to ground. these patches enable the takeoff to be more relaibly detected and constrain optical flow navigation drift in the first part of takeoff.
2015-04-24 10:57:45 +09:00
Paul Riseborough
3e061b174e AP_NavEKF: Report unhealthy for all filter faults 2015-04-24 10:57:43 +09:00
Paul Riseborough
6c4c54c2ba AP_NavEKF: Use default on ground range parameter from range finder object 2015-04-24 10:57:41 +09:00
Jonathan Challinger
10476333d8 AP_NavEKF: don't run when previously disarmed and time has slipped 2015-04-24 10:57:39 +09:00
Jonathan Challinger
085faaac6a AP_NavEKF: fix delay detection so that filter properly resets after a delay 2015-04-24 10:57:36 +09:00
Paul Riseborough
1c8e3f9444 AP_NavEKF: Allow EKF to pull data from range finder object 2015-04-24 10:57:01 +09:00
Paul Riseborough
4a5bf0a266 AP_NavEKF: Reduce EKF start time
Makes EKF start conditional on DCM solution tilt error
2015-04-23 20:35:48 +09:00
Andrew Tridgell
4586de6637 AP_NavEKF: enable optimisation in Linux build
only really need debugging for SITL
2015-04-16 08:36:16 +10:00
Paul Riseborough
dffa2e19bf AP_NavEKF: Make copter glitch accel consistent with timeout and radius 2015-04-15 17:32:48 +09:00
Paul Riseborough
5d70854c08 AP_NavEKF: Fix minor bug in calculation of innovation variance
the innovation variance for GPS should be the sum of squares of the state and measurement uncertainty.
2015-04-15 17:32:46 +09:00
Paul Riseborough
1008c6390c AP_NavEKF: Fail absolute position status if GPS repeatedly rejected 2015-04-15 17:32:44 +09:00
Paul Riseborough
77d3798278 AP_NavEKF: Reduce recovery time after a GPS fusion timeout 2015-04-15 17:32:41 +09:00
Paul Riseborough
0852aeab6e AP_NavEKF: Allow raw innovations to be monitored during timeouts 2015-04-15 17:32:39 +09:00
Paul Riseborough
d3f4b4a02b AP_NavEKF: Fix name consistency for data check time stamps 2015-04-15 17:32:36 +09:00
Paul Riseborough
e79ccf1fcc AP_NavEKF: Fix bug allowing terrain to be above vehicle position
The terrain state and vehicle state need to be compared at the same time horizon.
2015-04-11 15:51:08 +09:00
Paul Riseborough
6d58c63c4c AP_NavEKF: Prevent potential divide by zeros in OF fusion 2015-04-11 15:51:03 +09:00
Paul Riseborough
89142f1c5f AP_NavEKF: Prevent inadvertent use of DCM roll and pitch estimates.
the use of roll and pitch from the AHRS object is bad because that object could be returning estimates from the backup DCM algorithm.
2015-04-11 15:19:05 +09:00
Paul Riseborough
9268024094 AP_NavEKF: Update default parameters for copter optical flow fusion 2015-04-10 11:08:11 +09:00
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