Commit Graph

41321 Commits

Author SHA1 Message Date
Paul Riseborough 3accab1ac5 EKF: protect declination fusion from badly conditioned earth field estimates
Fusion with large initial magnetometer biases errors can result in the the NE earth field states reducing in magnitude and effectively flipping sign.

EKF: Move declination state limiting into a separate function

EKF: Limit NE mag states after each 3-axis mag fusion

EKF: Fix bug in mag field strength look-up scale factor
2019-01-31 09:53:57 -05:00
Paul Riseborough 7bddbd1cc5 EKF: Update cleaned up autocode fragment with sign error fix and missing LD 2019-01-31 09:53:57 -05:00
Paul Riseborough fe378fd761 EKF: Prevent unwanted declination fusion when re-starting 3-axis fusion 2019-01-31 09:53:57 -05:00
Paul Riseborough bd1647a7fb EKF: Rework use of fuseDeclination()
Simplify calling so that it is only called in two ways:
1) Immediately before 3-axis mag fusion if not called since the last earth field covariance reset so that the earth field declination information can be formed.
2) Immediately after 3-axis mag fusion otherwise.
2019-01-31 09:53:57 -05:00
Paul Riseborough d52f53635b EKF: Save mag field covariance data before reset 2019-01-31 09:53:57 -05:00
Paul Riseborough 82ce7a83a5 EKF: Save mag field covariance information on startup 2019-01-31 09:53:57 -05:00
Paul Riseborough 708c79eb8f EKF: Ensure mag field state covariance data is always available for re-use
Prevents use of  _saved_mag_ef_covmat and _saved_mag_bf_variance before being initialised or when stale.
2019-01-31 09:53:57 -05:00
Paul Riseborough 8839e4e1f4 EKF: Don't discard declination certainty information when resuming 3-axis fusion.
In the case where the EKF is switching between 3-axis and heading fusion, off-diagonal elements containing the correlation between N,E  components of the earth field were being lost on each switch event. These elements contained information about the declination uncertainty and should be preserved.
2019-01-31 09:53:57 -05:00
Paul Riseborough 25148e1b45 EKF: Prevent rapid changes in declination estimate after a reset
Ensures that each time the earth field covariance and variance data is reset, that the off-diagonal elements containing earth field declination angle certainty is restored.
2019-01-31 09:53:57 -05:00
CarlOlsson 6e7c119b31 EKF: limit yaw variance increase to 0.01 rad^2 to prevent a badly conditioned covariance matrix
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-31 09:53:57 -05:00
CarlOlsson 0896f7b9bd EKF: Also fill in lower part of covariance matrix in increaseQuatYawErrVariance()
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-01-31 09:53:57 -05:00
Paul Riseborough 4b3140e5f7 EKF: Fix rebase error 2019-01-31 09:53:57 -05:00
Paul Riseborough 911d4d8f49 EKF: Fix sign error in increaseQuatYawErrVariance function 2019-01-31 09:53:57 -05:00
Paul Riseborough a0b9cb002e EKF: Use consistent method for recording completion of in-flight yaw alignment 2019-01-31 09:53:57 -05:00
Paul Riseborough ef5a87c1d4 EKF: Rework quaternion yaw reset.
Use a new method that preserves the roll and pitch information and adds the uncertainty for yaw only.
Ensure that correlation information to non-quaternion states is removed when a reset occurs to prevent fusion of subsequent observations (e.g. GPS) causing incorrect yaw.
2019-01-31 09:53:57 -05:00
Paul Riseborough fc2a089823 EKF: Add function to un-correlate quaternion states
This is necessary after a quaternion reset to prevent incorrect attitude corrections with subsequent observation fusions.
2019-01-31 09:53:57 -05:00
Paul Riseborough bce1b96d17 EKF: Add function enabling yaw variance to be increased 2019-01-31 09:53:57 -05:00
Paul Riseborough bf1f3a224e EKF: Derive equations enabling yaw variance to be increased 2019-01-31 09:53:57 -05:00
Daniel Agar 115c31451c SITL use EKF2_MAG_TYPE default value 2019-01-31 09:23:12 -05:00
Anthony Lamping 4821885b03 CI: test: alphabetize args 2019-01-31 09:16:18 -05:00
Anthony Lamping 0fafa9dea7 CI: test: set verbose true 2019-01-31 09:16:18 -05:00
Daniel Agar 81eabc1903 Jenkins update all containers to latest tag 2019-01-28 2019-01-31 08:06:00 +11:00
mcsauder 9d67bbc328 Standardized/updated copyright file headers in the src/systemcmds/tests/ directory. 2019-01-30 14:25:18 -05:00
Daniel Agar 40e42a677b NuttX cmake support optional compressed defconfigs 2019-01-30 10:54:53 -05:00
Beat Küng 2f4f4c6623 px4_module: explicitly call the constructor of _task_should_exit
Workaround for a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58930)
Triggered with the bebop toolchain.
2019-01-30 10:24:06 -05:00
Beat Küng 481bfc6308 px4_module: use px4_atomic_t 2019-01-30 10:24:06 -05:00
Beat Küng b6e2ac74de px4_atomic: add an atomic interface based on GGC's builtin atomics 2019-01-30 10:24:06 -05:00
Daniel Agar a5e6191ba7 EKF add clarity brackets to avoid potential confusion
- fixes https://github.com/PX4/ecl/issues/555
2019-01-30 09:15:53 -05:00
Julian Oes 027d7e632e sitl_multiple_run.sh: fix port description
This has changed as we changed to TCP with the lockstep implementation.
2019-01-30 09:51:30 +01:00
Daniel Agar 8dc0509989 mpu9250: split icm20948 support out into new separate driver 2019-01-30 09:29:08 +01:00
Daniel Agar d02685c9f7 cmake nuttx .px4 package fix dependency location 2019-01-29 15:34:36 -05:00
Daniel Agar 489ea68b8d ROMFS fix pruned dependency and cleanup 2019-01-29 15:34:36 -05:00
Daniel Agar 298049b0fb px4_fmu-v4_stackcheck sync with default and increase pmw3901 main stack 2019-01-29 14:14:29 -05:00
David Sidrane 6f9a9b3d2c px4_fmu-v4: add runtime external SPI4 detection to support pmw3901 (#11301)
* The build is built with SPI4. At run time the signal GPIO_8266_GPIO2 it tested. If it is low the SPI4 is configured. If it is high SPI4 is not configured.
 * board_common: Add Notion of Board has bus manifest
2019-01-29 13:44:15 -05:00
David Sidrane 53a127beb9 Oversampling rate for MPL3115A2 pressure sensor (#11332)
As reported by @LeoMustafaNXP in https://github.com/PX4/Firmware/issues/11296
2019-01-29 11:41:58 -05:00
Anthony Lamping 22fe083666 Jenkins: bypass entrypoint temporarily (#11329)
* Jenkins: no SITL entrypoint for now
* Jenkins: complile - no snapdragon eagle entrypoint for now
2019-01-29 09:48:24 -05:00
Matthias Grob cdb6aca6bd mc_pos_control: refactor spoolup time naming 2019-01-29 10:02:48 +01:00
Matthias Grob 43fb84a63b mc_pos_control: make sure task gets started after idle delay 2019-01-29 10:02:48 +01:00
mcsauder dc5f18bdcd ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class. 2019-01-28 18:58:04 -08:00
Daniel Agar 0f386ee52a update all docker containers to latest 2019-01-27
- Jenkins compile drop arch until container is updated and maintained
 - clang-tidy disable for now, the new version isn't respecting the existing configuration
2019-01-28 13:08:58 -05:00
TSC21 c2e48f45ab Jenkins CI: ROS msgs: rollback branch naming 2019-01-28 14:00:21 +01:00
TSC21 c0a4185317 Jenkins CI: ROS msgs: replace GIT_BRANCH with BRANCH_NAME 2019-01-28 14:00:21 +01:00
TSC21 de917bae6d uorb_to_ros_msgs: delete all messages on the out dir first, so it can also consider message deletions on the input dir 2019-01-28 14:00:21 +01:00
TSC21 5c17a0b205 Jenkins CI: ROS msgs: clone by branch 2019-01-28 14:00:21 +01:00
TSC21 be2e1edbe2 Jenkins CI: ROS msgs: update stage name 2019-01-28 14:00:21 +01:00
TSC21 1dcb429d2d ROS msgs: add testing branch 2019-01-28 14:00:21 +01:00
TSC21 84c6e07c5c uorb_to_ros_msgs: only create dir if it doesn't exist 2019-01-28 14:00:21 +01:00
TSC21 a07bcc499a ROS msgs: remove redundant step 2019-01-28 14:00:21 +01:00
TSC21 4b1053d212 Jenkins: set autobuild and deploy for generating px4_msgs repo ROS msg definitions files 2019-01-28 14:00:21 +01:00
mcsauder cced80edf9 Correct the mpu6000 temperature correction scalar value to match the datasheet. 2019-01-28 12:48:03 +01:00