Commit Graph

709 Commits

Author SHA1 Message Date
priseborough 0bf50fd56f AP_NavEKF3: Add monitoring of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough 3ce81967ae AP_NavEKF3: Improve calculation and use of average EKF time step 2017-04-29 11:03:44 +10:00
priseborough 7abf9997e6 AP_NavEKF3: Correctly initialise dtIMUavg time step and apply LPF 2017-04-29 11:03:44 +10:00
priseborough 1301b9797a AP_NavEKF3: Fix solution validity reporting bug
Fixes bug that causes relative position status to report as false when using optical flow and using range finder as the primary height sensor.
2017-04-28 17:19:23 +01:00
Andrew Tridgell adb281cd4e AP_NavEKF3: added timing statistics logging 2017-04-28 17:19:39 +10:00
priseborough f208986d43 AP_NavEKF3: Reset covariance if bad mag fusion update 2017-04-27 20:14:21 +10:00
Andrew Tridgell 18b66f9eed AP_NavEKF3: fixed reset of coviariance matrix 2017-04-27 18:33:25 +10:00
Randy Mackay b255c7b370 AP_NavEKF: add setOrigin 2017-04-22 10:37:31 +09:00
priseborough fb7104f4e3 AP_NavEKF3: add fusion method for body frame odometry data 2017-04-19 11:04:40 +09:00
Andrew Tridgell 248773a7c8 AP_NavEKF3: allow access to quaternion for each instance 2017-04-16 14:01:36 +10:00
priseborough 8250fe4943 AP_NavEKF3: fix documentation derivation references 2017-04-10 15:47:35 +09:00
priseborough 06c073e448 AP_NavEKF3: Update tilt alignment check 2017-04-05 20:16:16 +10:00
Jonathan Challinger c7a73e84d6 AP_NavEKF3: apply height innovation floor only when barometer is in use 2017-03-24 14:42:36 -07:00
priseborough 56a9e2c462 AP_NavEKF3: Reference correct derivation 2017-03-13 11:31:51 +11:00
priseborough 18927395d7 AP_NavEKF3: log correct GPS for replay 2017-03-13 11:31:51 +11:00
priseborough 01551a4423 AP_NavEKF3: handle position jump caused by change in GPS receiver
If the GPS receiver selection changes and we are using GPS for height, the vertical position will be reset to the new GPS height measurement.
correct output observer history when doing a GPS height reset
2017-03-13 11:31:51 +11:00
Randy Mackay 3e039a6ba4 AP_NavEKF3: minor formatting fixes
No functional change
2017-03-06 18:40:18 +11:00
Randy Mackay a80c0a231d AP_NavEKF3: attempt to set-up every core
previously we would only call setup_core for the 2nd core if the first had been setup successfully
2017-03-06 18:40:18 +11:00
priseborough 7a8783f35e AP_NavEKF3: Fix bug preventing reset to GPS
This fixes a bug that prevented the reset to the GPS position occurring if GPS velocity observations were still passing innovation consistency checks.
2017-03-06 17:11:39 +11:00
Randy Mackay 3f6a734a71 AP_NavEKF3: only use downward facing rangefinder 2017-02-27 15:18:11 +09:00
Michael du Breuil 1de198883d AP_NavEKF3: Check gps vertical accuracy for aligning the GPS 2017-02-22 11:53:42 -08:00
Jacob Walser ac1e1b9460 AP_NavEKF3: Add set_baro_alt_noise method 2017-02-21 11:26:14 +11:00
Francisco Ferreira 23f959b92f
AP_NavEKF3: fix copied parameter descriptions 2017-02-15 19:20:04 +00:00
priseborough de7a679534 AP_NavEKF3: Enable simple heading fusion to be set for specific cores 2017-02-15 19:09:45 +00:00
priseborough ccb952ba31 AP_NavEKF3: Use the same mag fusion method for all cores
The original reason for using a different method for the second core is no longer valid.
2017-02-15 19:01:10 +00:00
priseborough e399f57ffa AP_NavEKF3: prevent NaN if RNGFND_GNDCLEAR is zero 2017-02-15 07:04:38 +09:00
priseborough 784fa6fed8 AP_NavEKF3: fix compiler error 2017-01-27 16:57:42 +09:00
priseborough 2c36da2b21 AP_NavEKF3: relocate perf monitor to count all three mag components 2017-01-27 16:57:42 +09:00
priseborough 4d958952f6 AP_NavEKF3: use standard unit descriptor for milliseconds 2017-01-27 16:57:42 +09:00
priseborough b5ba1d0346 AP_NavEKF3: protect against large delay values returned by the GPS library 2017-01-27 16:57:42 +09:00
priseborough 4540faf6af AP_NavEKF3: Improve waiting for GPS configuration
Do not time out and provide an escalating series of messages. We may need to adjust the time thresholds used for escalation.
Do not wait if the EKF is not using the GPS.
2017-01-27 16:57:42 +09:00
priseborough 52e8f687d9 AP_NavEKF3: fix logic bug introduced by magnetometer use changes 2017-01-27 16:57:42 +09:00
priseborough a133d55b6d AP_NavEKF3: Allow copters to fly with magnetometers disabled
Copter operation without a magnetometer is limited to constant position and relative position modes only (no GPS or range beacon fusion permitted)
Copter optical flow operation without a magnetometer is permitted.
The ability of planes to takeoff/launch without a magnetometer and align the yaw using the GPS velocity is retained.
2017-01-27 16:57:42 +09:00
priseborough 2e5ac40ef6 AP_NavEKF3: remove unnecessary stdio includes 2017-01-27 16:57:42 +09:00
priseborough 8688d1ddac AP_NavEKF3: Improve range finder selection logic
Fixes bug that could leave it locked out of range finder use.
2017-01-27 16:57:42 +09:00
priseborough 7e8f3fca53 AP_NavEKF3: Address review comments
Removes a leftover debug printf statement.
Fixes documentation errors.
Replace remaining fmaxf function calls with Ardupilot MAX function
2017-01-27 16:57:42 +09:00
priseborough b723966b8d AP_NavEKF2: Add protection against bad GPS time delay values
Prevent bad values for GPS time delay pushing the GPS time stamp outside the range of IMU data contained in the buffer. If this occurs it can prevent the GPS measurements from being fused and cause loss of navigation.
2017-01-27 16:57:42 +09:00
priseborough 59ee074560 AP_NavEKF3: Remove EKF2 names 2017-01-27 16:57:42 +09:00
priseborough b862f0d7ad AP_NavEKF3: Enable use of GPS delay value from returned by the driver
Use the time delay returned by the GPS driver.
Wait long enough for the GPS configuration to be determined, but time out after 30 seconds and warn the user that a default value for time delay will be used.
2017-01-27 16:57:42 +09:00
priseborough 69a47d7522 AP_NavEKF3: Improve reporting of buffer allocation 2017-01-27 16:57:42 +09:00
priseborough ceb42225fd AP_NavEKF3: Ensure enough time to fill buffers when starting filter 2017-01-27 16:57:42 +09:00
priseborough a8fd1d8bcd AP_NavEKF3: fix potential time-stamping bug
Use a consistent time reference
2017-01-27 16:57:42 +09:00
priseborough 8d1733cee6 AP_NavEKF3: Use FIR filtered airspeed
Switch to use of an airspeed reading averaged across the raw sensor readings. since the last update.
This avoids use of the IIR which requires a larger time delay compensation and violates the assumption of uncorrelated noise.
The time delay parameter has been reduced to compensate for the removal of the airspeed IIR filtering.
2017-01-27 16:57:42 +09:00
priseborough 9261c34097 AP_NavEKF3: Update default GPS delay
This value is a compromise between what works best for a Ublox 6 which is around 200msec delay and the more recent 7 and 8 series receivers that are around 120msec delay.
2017-01-27 16:57:42 +09:00
priseborough ed5039823f AP_NavEKF3: Adapt sensor buffer lengths
Adapt the lengths of the IMU and observations buffers on startup to the specified time delays and update rates.
This does require the EKF to be re-started if time delays are changed.
2017-01-27 16:57:42 +09:00
priseborough 2cc48f78a7 AP_NavEKF3: Update range beacon fusion
Add innovation consistency check to alignment filter and publish alignment filter status data
2017-01-27 16:57:42 +09:00
priseborough 92b8c33b19 AP_NavEKF3: publish 3-state range beacon estimator states 2017-01-27 16:57:42 +09:00
priseborough 7c53573a0c AP_NavEKF3: Allow range beacon use with intermittent GPS 2017-01-27 16:57:42 +09:00
priseborough e5e4883c72 AP_NavEKF3: Fix GPS use inhibit interface documentation 2017-01-27 16:57:42 +09:00
priseborough c7e1828238 AP_NavEKF3: improve variable name 2017-01-27 16:57:42 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas cae557fb4c AP_NavEKF3: Correct display names, bitmask and units 2017-01-16 19:07:26 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 195e32c2fc AP_NavEKF3: fix some parameter descriptions 2017-01-09 13:30:24 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas d408d25f92 More spelling stuff 2017-01-06 10:57:39 -08:00
priseborough 71eb46dd04 AP_NavEKF3: Fix bug in loss of aiding fallback
Fixes a bug introduced by the introduction of range beacon fusion to the fallback test.
2016-12-21 18:08:39 +11:00
priseborough f1c05ee320 AP_NavEKF3: Allow accel switch on bias uncertainty to be adjusted 2016-12-19 08:07:15 +11:00
priseborough 7d4a50f483 AP_NavEKF3: Prevent unwanted core switch on startup
Require primary core to be healthy for 10 seconds before starting selection logic
2016-12-19 08:07:14 +11:00
priseborough cd6fd0ea45 AP_NavEKF3: Improvements to range finder selection logic
Enables the horizontal speed at which we switch from range finder to alternate to be adjusted.
Does not switch from range finder to alternate based on speed when speed estimate is invalid.
2016-12-19 08:07:14 +11:00
priseborough 7202acc1b5 AP_NavEKF3: Default EKF3 to off
Will revert this and set EKF2 to off by default after testing is completed on all platform types
2016-12-19 08:07:09 +11:00
priseborough 39969e7d8e AP_NavEKF3: added EKF3 for EKF experimentation
AP_NavEKF3: Implement same maths as PX4/ecl EKF

Replace attitude vector states with quaternions
Remove gyro scale factor states
Add XY accel delta velocity bias estimation
Initial tuning
Add GPS body frame offset compensation

AP_NavEKF3: Fix bugs and consolidate aiding switch logic

Switching in and out of aiding modes was being performed in more than one place and was using two variables.
The reversion out of GPS mode due to prolonged loss of GPS was not working.
This consolidates the logic and ensures that PV_AidingMode is only changed by the setAidingMode function.

AP_NavEKF3: prevent multiple fusion mode changes per filter update

AP_NavEKF3: Update tuning defaults

AP_NavEKF3: Fix bug causing switching in and out of aiding
If the GPS receiver was disconnected and no data received, then then the gpsGoodToAlign check did not get a chance to run and becasue it was previously true the EKF would switch back into aiding.
This prevents this by ensuring that gpsGoodToAlign defaults to false when the check is not being performed.
An additional check has also been dded to ensure that there is GPS data to fuse before we declare ready to use GPS.

AP_NavEKF3: Fix bug preventing planes recovering from bad magnetometers
This bug created a race condition whereby if the EKF had to reset the yaw to the GPS ground course to recover from a bad magnetometer, the new heading could be over-written by the bad magnetic heading when the plane reached the height for the scheduled reset.

AP_NavEKF3: Improve switch-over to backup magnetometer
When switching over to a back up magnetometer, ensure that the earth field estimate are reset. Otherwise mag earth field estimates due to the previous failed mag could cause data from the new mag to be rejected.

AP_NavEKF3: enable automatic use of range finder height

AP_NavEKF3: Fix bug in handling of invalid range data

AP_NavEKF3: Fix height drift on ground using range finder without GPSAP_NavEKF3:

AP_NavEKF3: Handle yaw jumps due to core switches

AP_NavEKF3: Enable simultaneous GPS and optical flow use

AP_NavEKF3: fix console status reporting

AP_NavEKF3: send messages to mavlink instead of console

This allows the GCS to better handle the display of messages to the user.

AP_NavEKF3: replace deprecated function call

AP_NavEKF3: Compensate for sensor body frame offsets

AP_NavEKF3: Fix bug in median filter code

AP_NavEKF3: save some memory in the position offsets in EKF3

We don't need to copy that vector3f for every sample. A uint8_t does the job

AP_NavEKF3: Add fusion of range beacon data

AP_NavEKF3: Bring up to date with EKF2

AP_NavEKF3: Misc range beacon updates

AP_NavEKF3: Add mising accessors

AP_NavEKF3: remove duplicate include

AP_NavEKF3: Prevent NaN's when accessing range beacon debug data

AP_NavEKF3: Update range beacon naming

AP_NavEKF3: updates

AP_NavEKF3: miscellaneous changes

AP_NavEKF3: misc updates

AP_NavEKF3: misc range beacons updates

AP_NavEKF3: add missing rover default param
2016-12-19 08:06:47 +11:00