Commit Graph

9211 Commits

Author SHA1 Message Date
Andrew Tridgell 79d85f7e10 AP_AHRS: wait for up to 10 samples to get a valid accel vector
the initial accel vectors can be invalid
2015-10-21 09:09:11 +11:00
Andrew Tridgell eac91430a2 AP_AHRS: update _dcm_attitude() on reset()
this prevents the roll/pitch being overwritten by the AHRS_NavEKF
update code on next update
2015-10-21 08:58:30 +11:00
Jonathan Challinger c35605fa04 AP_AHRS_DCM: align tilt during initialization 2015-10-21 08:34:02 +11:00
Jonathan Challinger 78af6d61de AP_Compass: only play compass cal cancel tone if a cal was running 2015-10-21 08:24:49 +11:00
Jonathan Challinger 3b480bd6ec AP_InertialSensor: fix order of accelerometer corrections 2015-10-21 08:22:36 +11:00
Jonathan Challinger 562db11159 AP_Compass: fix potential AP_Notify concurrency problem 2015-10-20 20:54:02 +09:00
Paul Riseborough cd8b9c7d26 AP_NavEKF: prevent high rate mag data locking out other data fusion 2015-10-20 20:16:04 +11:00
Paul Riseborough ab8c28a7cc AP_NavEKF: Fix bug allowing takeoff in GPS modes without aiding
The legacy EKF switches GPs aiding on on arming, whereas the new EKF switches it on based on GPS data quality.
This means the decision to arm and therefore the predicted solution flags must now reflect the actual status of the navigation solution as it will no longer change when motor arming occurs.
2015-10-20 20:16:00 +11:00
Paul Riseborough e076ed7f66 AP_NavEKF2: Remove compiler warning message 2015-10-20 18:16:16 +11:00
Andrew Tridgell b0aa7cb990 DataFlash: use new perf API 2015-10-20 18:16:16 +11:00
Andrew Tridgell cb0f7cb370 NavEKF2: use new perf counter API 2015-10-20 18:16:15 +11:00
Andrew Tridgell f66966ccae NavEKF: use new perf counter API 2015-10-20 18:16:15 +11:00
Andrew Tridgell 8dbb51c64e HAL_PX4: implement AP_HAL::Util perf calls for PX4 2015-10-20 18:09:57 +11:00
Andrew Tridgell 28fa05c965 AP_HAL: added generic perf counter
simple wrapper around PX4 API, but ready for use by other HALs
2015-10-20 18:09:57 +11:00
Paul Riseborough 60c2e81d19 AP_NavEKF2: Apply optimisations to declination fusion covariance update
These are the same type of optimisations that were successful with the magnetometer fusion
2015-10-20 15:21:41 +11:00
Paul Riseborough 0054291cf4 AP_NavEKF2: Apply optimisations to side-slip fusion covariance update
These are the same optimisations that were successful with the magnetometer fusion
2015-10-20 15:21:40 +11:00
Paul Riseborough 5e4bc4e954 AP_NavEKF2: Apply optimisations to airspeed fusion covariance update
These are the same optimisations that were successful with the magnetometer fusion
2015-10-20 15:21:40 +11:00
Paul Riseborough a29147d6d2 AP_NavEKF2: Apply optimisations to optical flow covariance update
These are the same optimisations that were successful with the magnetometer fusion
2015-10-20 15:21:40 +11:00
Paul Riseborough b5e43288d4 AP_NavEKF2: Down to 12 from 14 usec for perf test[8] 2015-10-20 15:21:40 +11:00
Paul Riseborough 0f530bb5a0 AP_NavEKF2: Correct comments 2015-10-20 15:21:40 +11:00
Andrew Tridgell d1dfd5fd01 AP_NavEKF2: use common header for optimisation level and irq disable 2015-10-20 15:21:40 +11:00
Andrew Tridgell a017ae7e00 AP_NavEKF2: down to 218us for test[9] 2015-10-20 15:21:40 +11:00
Andrew Tridgell fc23be8025 AP_NavEKF2: enable fine grained perf tuning for mag fusion 2015-10-20 15:21:40 +11:00
Andrew Tridgell b6c1352e4c AP_NavEKF2: added 10 test perf counters
used for fine grained performance tuning
2015-10-20 15:21:40 +11:00
Paul Riseborough 824436dfb6 AP_NavEKF2: Explicitly define constants as floats 2015-10-20 15:21:40 +11:00
Paul Riseborough 2fbd050418 AP_NavEKF2: Use blended accelerometer data
If high vibration levels cause offsets between the two, it switches to the accelerometer with lower vibration levels. The default behaviour is to use the average of both accelerometers.
2015-10-20 15:21:40 +11:00
Paul Riseborough 240ea92947 AP_NavEKF: Re-center gyro bias limits on arming
Allows the gyro bias to vary by up to +-10 deg/second before and after arming.
2015-10-20 15:21:39 +11:00
Paul Riseborough 8515dda727 AP_NavEKF: Fix bug in vertical position derivative calculation 2015-10-20 15:21:39 +11:00
Paul Riseborough 2b13020c19 AP_NavEKF2: Fix bug in vertical position derivative calculation 2015-10-20 15:21:39 +11:00
Paul Riseborough f6ad79688e AP_NavEKF2: Update start sequence console messages 2015-10-20 15:21:39 +11:00
Paul Riseborough 6b3e114cd6 AP_NavEKF: Enable EKF1 to be disabled to reduce frame over-runs 2015-10-20 15:21:39 +11:00
Paul Riseborough 1a1236f764 AP_NavEKF2: Update magnetometer fusion documentation 2015-10-20 15:21:39 +11:00
Paul Riseborough 8526a8ba7e AP_NavEKF2: Level processor loading between frames
Don't fuse other measurements on the same frame that magnetometer measurements arrive if running at a high frame rate as there will be insufficient time to complete other operations.
2015-10-20 15:21:39 +11:00
Paul Riseborough 225b81baf4 AP_NavEKF2: Prevent users breaking filter by setting excessive time delays
If time deelays greater than the IMU buffer length are used, then it is possible for measurements to be dropped.
2015-10-20 15:21:39 +11:00
Paul Riseborough a1d6c7ae1e AP_NavEKF2: Improve timing accuracy
This parameter is a compromise between numerical accuracy of the covariance prediction and sensor timing jitter
Further testing has shown that doing covariance prediction and sensor fusion every 10msec has no observable effect on fusion health and reduces timing hitter noise on magnetometer observations during high rate maneovures
2015-10-20 15:21:39 +11:00
Paul Riseborough e0ed2dab63 AP_NavEKF2: Adjust IMU FIFO buffer for different IMU data rates
The values chosen ensure that up to consistent 250 msec of sensor delay compensation is available for different platform types
The revised values also ensure that fusion occurs at different time to when the 10Hz magnetometer measurements are read
2015-10-20 15:21:39 +11:00
Paul Riseborough baa8692960 AP_NavEKF2: Allow use of magnetometer learning during optical flow nav
Adds fusion of the declination when there are no earth relative measurements so that the declination angle and therefore the copters yaw angle have an absolute reference.
This enables the length (but not the declination) of the earth field North/East states to change along with the magnetometer offsets.
2015-10-20 15:21:38 +11:00
Paul Riseborough 1b8a93ef0c AP_NavEKF2: Update function header comments 2015-10-20 15:21:38 +11:00
Paul Riseborough 6899767d28 AP_NavEKF2: Disable magnetic field learning if we have no absolute position reference 2015-10-20 15:21:38 +11:00
Paul Riseborough 0722ebe8a0 AP_AHRS: Add EKF variance checks 2015-10-20 15:21:38 +11:00
Paul Riseborough 242b9641c8 AP_NavEKF2: Fix in-air logic bug 2015-10-20 15:21:38 +11:00
Paul Riseborough e7de2d3ea3 AP_NavEKF: Update magnetic field learning options
Provide an option to always do learning
Make field learning decision logic clearer
Change defaults so that plane learns when airborne
Change defaults so that Rover does not learn (large external magnetic interference)
2015-10-20 15:21:38 +11:00
Paul Riseborough 495809f211 AP_NavEKF2: Allow magnetic field learning to be faster 2015-10-20 15:21:38 +11:00
Paul Riseborough 84a02efd52 AP_NavEKF2: Improve efficiency of Z magnetometer fusion 2015-10-20 15:21:37 +11:00
Paul Riseborough 35b08849f7 AP_NavEKF2: Reduce effect of rounding errors on covariance prediction 2015-10-20 15:21:37 +11:00
Paul Riseborough 4e928bf294 AP_NavEKF2: Fix bug preventing pre-takeoff reference measurements 2015-10-20 15:21:37 +11:00
Paul Riseborough 71c399674a AP_NavEKF2: Delay use of magnetic field states until off-ground
Magnetic interference whilst on the ground can adversely affect filter states. This patch ensures that the simpler and more robust magnetic heading observation method is used until the vehicle has cleared the ground.
2015-10-20 15:21:37 +11:00
Paul Riseborough 99c2dc41e0 AP_NavEKF2: Miscellaneous tuning changes 2015-10-20 15:21:37 +11:00
Paul Riseborough 2d44441d6b DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough ae830b44c4 AP_AHRS: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00