Commit Graph

1024 Commits

Author SHA1 Message Date
Daniel Agar 3a61035ac2 fix and re-enable EKF pytests 2018-05-03 22:25:36 -04:00
Daniel Agar 4dabf7a1a8 Jenkins add OSX build 2018-05-03 22:25:36 -04:00
Daniel Agar c5b2f59f57 PX4 style fixes (excluding EKF generated code) 2018-05-03 22:25:36 -04:00
Daniel Agar e5952fadaf cmake standalone build 2018-05-03 22:25:36 -04:00
Daniel Agar eec71d1a10 EKF get_ekf_soln_status() fix pred_pos_horiz_abs 2018-05-03 00:12:23 -04:00
Paul Riseborough 1bd1809d6e
EKF: Fix bug causing simultaneous range and baro height fusion (#429) 2018-05-03 13:24:33 +10:00
Daniel Agar a14434d6dc EKF always fill position and velocity accuracy (#425) 2018-04-23 21:15:29 +10:00
Paul Riseborough 6e3403ce28
EKF: prevent race condition between global position validity and eph reporting 2018-04-21 13:04:04 -04:00
Paul Riseborough fdabb9277f
EKF: Use consistent validity definition for global position reporting 2018-04-21 13:04:04 -04:00
Paul Riseborough 31142c0322
EKF: tighten wind variance growth check 2018-04-21 13:04:04 -04:00
Paul Riseborough ae069b12d6
EKF: Fix bug preventing wind relative dead reckoning 2018-04-21 13:04:04 -04:00
Paul Riseborough 9747dc778d
EKF: Rework nav validity reporting
Remove duplicate checking for dead reckoning and consolidate into a single function.
Use separate timers to check for start of dead reckoning and check when dead reckoning has been performed for too long for the nav solution to be valid.
Allow the timeout for validity reporting to be adjusted externally.
Separate external reporting of dead reckoning from internal checks.
2018-04-21 13:04:04 -04:00
Daniel Agar bd72f3c521 geo std pressure constants and update usage 2018-04-19 08:57:38 +02:00
Daniel Agar 02e319431b cmake remove embedded vim settings 2018-04-11 20:50:30 -04:00
Daniel Agar 91b5bfe2bb attitude_fw remove unused perf include 2018-04-11 20:50:30 -04:00
Paul Riseborough 02055acee2
EKF: Fix non GPS aiding data reset logic (#418)
* EKF: Move optical flow specific state reset to helper functions

* EKF: Ensure loss of optical flow aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using flow data as a velocity reference.
If flow data is unavailable for too long - declare optical flow use stopped.
Use consistent time periods for all resets

* EKF: Ensure loss of external vision aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using data as a position.
Don't reset velocity if there is another source of aiding constraining it.
If data is unavailable for too long, declare external vision use stopped.
Use consistent time periods for all resets.

* EKF: Update parameter documentation

Make the distinction between the no_gps_timeout_max and no_aid_timeout_max parameters clearer

* EKF: make class variable units consistent with documentation

* EKF: Don't reset states when optical flow use commences if using external vision

* EKF: Stop optical flow fusion when on ground if excessive movement is detected.

* EKF: fix terrain estimator vulnerabilities

Reset estimate to sensor value if rejected for 10 seconds
Protect against user motion when on ground.
Fix unnecessary duplication of terrain validity check and separate validity update and reporting.

* EKF: remove unnecessary Info console prints

Optical flow use information can be obtained from the estimator_status.control_mode_flags message

* EKF: fix inaccurate comment

* EKF: remove duplicate calculation from terrain validity accessor function
2018-04-09 18:35:15 +10:00
Daniel Agar ba2b9dfdd9 update matrix lib usage 2018-03-28 17:57:51 -04:00
Daniel Agar 39b69af9bf geo_lookup: Update geomagnetism tables.
Update declination table to use latest IGRF data
Add lookups for inclination and field strength
2018-03-26 21:52:11 -04:00
Daniel Agar cd12f049fe move geo and geo_lookup from PX4 Firmware to ECL 2018-03-26 21:52:11 -04:00
Paul Riseborough 1bb4c17c0e
EKF: Allow use of large GPS position observation noise when using other aiding sources (#403) 2018-03-27 11:31:37 +11:00
Paul Riseborough 8a012436f9
EKF: Fix reversion from GPS to no-aiding mode (#412)
* EKF: Do not delay reversion to no-aiding mode if parameter initiated

* EKF: Move no-aid reversion resets to helper functions

* EKF: Prevent unwanted fusion of velocity data during no aiding mode
2018-03-22 22:39:00 +11:00
Roman Bapst 95c4777b35 added airdata module which contains wind & airspeed scale estimator (#405)
* added airdata module which contains wind & airspeed scale estimator

* airdata: support gate sizes for innovation consistency checks
2018-03-21 13:06:00 -04:00
Carl Olsson f6d23cc621 added rng_stuck to filter control status flags (#392) 2018-03-21 11:46:27 +11:00
Roman Bapst 7964820412 tecs.cpp: tecs initialisation fixes (#411)
- zero thrust integrator on initialisation, we already have a cruise throttle
variable
- if initialising from in_air condition set last throttle setpoint to
cruise throttle (_in_air ? throttle_cruise : 0.0f);
2018-03-21 11:25:15 +11:00
Daniel Agar 35bc2cfcd9
tecs and l1 switch to matrix math library (#409) 2018-03-18 21:59:41 -04:00
Daniel Agar 1bc7378414
EKF decrease synthetic sideslip interval 1s -> 150ms (#407) 2018-03-15 23:09:42 -04:00
Daniel Agar 341f8962d2
EKF interface add get_wind_status() (#406) 2018-03-14 16:41:09 -04:00
Thomas Stastny 041886a289 attitude_fw: move angular rate limits to body angular rates (#404) 2018-03-08 22:19:19 -05:00
Paul Riseborough 78e983073a
EKF: Fix bug in use of gps velocity noise parameter (#401)
This fixes a bug introduced by an earlier feature request PR. The parameter is supposed to define the lower limit on the observation noise.
2018-02-28 11:48:53 +11:00
ChristophTobler cdc6efc5d6 EKF: fix rot vec calc from quat by using matrix lib 2018-02-08 10:22:55 +01:00
ChristophTobler 9238e2f1a2 EKF: fix spike handling in ev rotation calculation 2018-02-08 10:20:59 +01:00
Paul Riseborough db5264e45c EKF: Add missing reset for output observer vertical position derivative
Required to prevent large transients in value returned by get_pos_d_deriv accessor following a vertical state reset event.
2018-01-31 08:43:39 +01:00
Beat Küng d078d68f64 Reverse the linked list of data_validator_group #2 (#389)
* Reverse the linked list of data_validator_group and maintain a first node
for search from index 0

Fixes issue PX4/Firmware#8644

* fix code style

* validator: fix shadowing of 'sibling' argument
2018-01-30 09:11:01 +11:00
ChristophTobler 337cdcc59a init height using baro when set to ev height (#388)
this also makes sure the _baro_hgt_offset is being initialized correctly
2018-01-30 07:33:28 +11:00
Paul Riseborough a2d6a4dded
EKF: fix indexing bug (#387)
Should use index 9 for vertical position.
2018-01-29 08:09:55 +11:00
Paul Riseborough 1ddd94f237 tecs: Remove redundant code
The if() statement was there as provision to do something different with the speed demand derivative limits if an abnormal condition was present, however we have no basis for assigning different limits at this point in time.
2018-01-28 22:01:28 +01:00
Paul Riseborough f016e66ff8
Revert "EKF: Release flow speed limit with altitude gained" (#382)
* Revert "EKF: Release flow speed limit with altitude gained"

This reverts commit e70206f74b.

* Revert "fix code style"

This reverts commit 76bf70121c.

* Revert "Reverse the linked list of data_validator_group and maintain a first node"

This reverts commit 32482e7644.
2018-01-24 20:46:48 +11:00
jay 76bf70121c fix code style 2018-01-19 11:53:36 +01:00
lijie 32482e7644 Reverse the linked list of data_validator_group and maintain a first node
for search from index 0

Fixes issue PX4/Firmware#8644
2018-01-19 11:53:36 +01:00
ChristophTobler cdbca91e79 EV height reset (#379)
* fix typo

* EKF: use baro if it was reset to baro from ev

* EKF: set vert_pos_reset if resetting to ev hgt

otherwise the position controller will not reset the setpoint -> leading to unwanted altitude changes
2018-01-15 20:15:56 +11:00
Andreas Antener 9e16e51d3a attitude_fw: constrain integrator properly to prevent building it up over the specified maximum 2018-01-13 16:17:01 +01:00
Daniel Agar c8ab806120 EKF pytest temporarily disable 2018-01-05 02:39:02 -05:00
Daniel Agar ae641020dd EKF run pytest quick and plot 2018-01-05 02:39:02 -05:00
Daniel Agar ec0d907d5a update README build badge (travis-ci -> jenkins) 2018-01-05 02:39:02 -05:00
Daniel Agar 7df4e0f8eb reenable pytest with px4-dev-ecl 2018-01-05 02:39:02 -05:00
Daniel Agar f407954207 initial jenkins configuration 2018-01-05 02:39:02 -05:00
Lorenz Meier dd9ea86fd6
Update README.md
Added link to tuning guide.
2018-01-04 08:50:34 +01:00
Paul Riseborough 76763adb5c
Merge pull request #374 from PX4/pr-ekfInitFix
EKF: Prevent possible /0 due to incorrect initial values
2018-01-04 08:15:08 +11:00
Paul Riseborough 0f047504d4 EKF: Prevent possible div 0 due to incorrect initial values
Gate size class variables should not be initialised to zero, because it will cause a /0 error if fuseVelPosHeight() is called before they are set to their respective parameter values.
2018-01-04 07:47:03 +11:00
Daniel Agar f0862210c7 EKF initialize _hvelInnovGate
- fixes CID 139550
2018-01-03 08:07:28 +01:00