173 Commits

Author SHA1 Message Date
Lorenz Meier
50002a0ff6 Update EEKF2 to match ecl updates 2017-01-15 01:57:38 -08:00
Lorenz Meier
b7f5a33c90 EKF2: Code style and efficiency
Its sufficient to use sqrtf() with floating point resolution and its better to use the Matrix library call for local and global position yaw
2016-12-25 18:15:51 +01:00
Matthias Grob
537f72073d minor: uppercase typo and unused header 2016-12-20 09:46:36 +01:00
Roman
1e1bf7e4bb ekf2 reset: fix sign of delta altitude for global position topic
Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-21 07:29:21 +01:00
Roman
d4c87d62f1 fixed code style
Signed-off-by: Roman <bapstroman@gmail.com>
2016-11-21 07:29:21 +01:00
tumbili
0e481a5d00 ekf2: publish state reset information 2016-11-21 07:29:21 +01:00
Paul Riseborough
9ff1feb92f ekf2: fix formatting 2016-11-15 23:58:05 +01:00
Paul Riseborough
056ac3c9c6 EKF: Update default value for sideslip fusion noise
Use value obtained from tuning on replay logs
2016-11-15 23:58:05 +01:00
Paul Riseborough
680a8f0b44 ekf2: fix rebase compile errors 2016-11-15 23:58:05 +01:00
CarlOlsson
72ad6627e1 updated beta noise
Conflicts:
	src/modules/ekf2/ekf2_params.c
2016-11-15 23:58:05 +01:00
CarlOlsson
e4f5710ec3 added logic for beta fusion 2016-11-15 23:58:05 +01:00
CarlOlsson
f00f6e6eff added parameter for when to fuse sideslip 2016-11-15 23:58:05 +01:00
CarlOlsson
d550290e63 modified ekf2_main.cpp 2016-11-15 23:58:05 +01:00
Paul Riseborough
246dc5421b ekf2: remove unnecessary variables found during review 2016-11-08 11:17:07 +01:00
Paul Riseborough
0ee75dbc6b ekf2: Allow adjustment of min arrival time delta parameter 2016-11-08 11:17:07 +01:00
Paul Riseborough
5ac73f3440 ekf2: code style fixes 2016-11-08 11:17:07 +01:00
Paul Riseborough
699edd2535 ekf2: Prevent loss of baro data due to buffer time arrival checks
Baro data arriving too soon after the last measurement due to a high sampling rate or timing jitter is rejected inside the ecl EKF to prevent the data buffer overflowing.
This patch checks the timestamp difference from the last measurement, and if to small, the data is accumulated and the average sent to the EKF when the time delta
is acceptable.
2016-11-08 11:17:07 +01:00
Paul Riseborough
ef7ed97cbd ekf2: Don't send un-usable mag and baro data to the EKF
Fixes:

1) Invalid data with a zero time stamp could be the EKF ends up in the data buffers and result in loss of 'good' data from the buffers

2) Magnetometer data was arriving at a rate faster than the data buffers could handle resulting in loss of data.
2016-11-08 11:17:07 +01:00
Beat Küng
d1a3261e81 ekf2_main: reduce stack (according to the reductions in the commit before) 2016-11-06 14:48:20 +01:00
Beat Küng
5bcfa3c7e6 ekf2_main: add {} to limit variable scope and save stack
Reformatting makes it look worse than it is, but it really only adds {}
2016-11-06 14:48:20 +01:00
Beat Küng
cc27d2a1e0 ekf2_main: move subscriptions into main thread & call orb_unsubscribe at the end 2016-11-06 14:48:20 +01:00
Beat Küng
53cf27eb84 ekf2_main: some cleanup of redundant fields 2016-11-06 14:48:20 +01:00
Beat Küng
7c6d99d30f BlockParam: remove _extern_address and create a new class BlockParamExt for this
In most cases, _extern_address was unused, thus wasting cycles & RAM. This
adds a separate class BlockParamExt with the field and uses it in ekf2_main

Frees roughly 0.5KB of RAM on Pixracer
2016-10-23 15:25:20 +02:00
Paul Riseborough
06ad477847 ekf2: publish vibration metrics 2016-10-22 12:03:05 +02:00
Roman
a978d61d9a attitude message cleanup: more cleanup
Signed-off-by: Roman <bapstroman@gmail.com>
2016-10-18 20:46:08 +02:00
Lorenz Meier
526fb8f515 Remove q_valid flag from attitude topic 2016-10-18 20:46:08 +02:00
Roman
b8a219d351 removed comments and fixed some euler bugs 2016-10-18 20:46:08 +02:00
tumbili
5e0e522903 adapted to new vehicle attitude message 2016-10-18 20:46:08 +02:00
Paul Riseborough
865b6404ec ekf2: reduce default output predictor time constant 2016-10-13 09:06:41 +02:00
Paul Riseborough
7a9e3002ff ekf2: publish output predictor tracking errors 2016-10-13 09:06:41 +02:00
Paul Riseborough
d80a233bcb ekf2: fix code style 2016-10-11 08:52:35 +02:00
Paul Riseborough
6eabf80f2a ekf2: Publish estimator solution status flags 2016-10-11 08:52:35 +02:00
Paul Riseborough
c0fe08a203 ekf2: publish estimator status position accuracy 2016-10-11 08:52:35 +02:00
Paul Riseborough
5a69f4560a ekf2: Publish innovation test status data 2016-10-11 08:52:35 +02:00
Julian Oes
8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Lorenz Meier
9a8e6de7fe EKF2: Remove QuRT hackery 2016-09-11 20:07:30 +02:00
Lorenz Meier
d810726c6e EKF2: Only use the memory it needs 2016-08-15 19:53:21 +02:00
Lorenz Meier
a130b6a65c style cleanup 2016-08-15 19:53:21 +02:00
Daniel Agar
8f01324890 ekf2 fix and enforce code style 2016-08-07 10:40:17 +02:00
Vasily Evseenko
457526ebe7 Don't push bad values from lidar to EKF2 (#5196)
Report terrain altitude
2016-08-01 23:30:40 -07:00
Lorenz Meier
a1c8585342 EKF2: Report zero as position until local pos is valid 2016-07-31 14:01:32 +02:00
Lorenz Meier
826eaed2ee EKF2: Clean up vision timestamps 2016-07-10 12:43:21 +02:00
Daniel Agar
4252511b8e add bitmask param metadata 2016-07-07 12:42:59 +02:00
Beat Küng
9c73eae941 sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In
most places the value is needed, not the integral.

Note that this breaks the replay format for sdlog2 replay
2016-07-07 11:35:50 +02:00
Beat Küng
8e136779ec stack sizes: reduce stack sizes for modules that use sensor_combined
The sensor_combined topic got reduced from ~780 bytes to 72 bytes.
2016-07-07 11:35:50 +02:00
Beat Küng
c5ea4b43be sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
2016-07-07 11:35:50 +02:00
Beat Küng
d846ad5dac sensors: move voting into sensors module
- voting is now at a central place instead of duplicated within the
  estimators
  -> this also means that estimators that did not do voting so far,
     now have voting, like ekf2
- estimators requiring more than that can still subscribe to the raw
  sensors
- allows sensors_combined to be 3 times smaller
  - reduces logger, memcpy (cache) & RAM overhead
- all modules requiring only 1 or 2 sensor values now automatically get
  the voted result
- this also adds voting to baro
2016-07-07 11:35:50 +02:00
Beat Küng
b4ecc5a8d9 sensor_combined cleanup: remove many unneeded fields
Decreases the message size from 780 to 280 bytes.
In particular, all modules using sensor_combined must use the integral now.
The sensor value can easily be reconstructed by dividing with dt.

Voters now need to be moved into sensors module, because error count and
priority is removed from the topic.

Any module that requires additional data from a sensor can subscribe to
the raw sensor topics.

At two places, values are set to zero instead of subscribing to the raw
sensors (with the assumption that no one reads them):
- mavlink mavlink_highres_imu_t::abs_pressure
- sdlog2: sensor temperatures
2016-07-07 11:35:50 +02:00
Julian Oes
3524fd7d24 ekf2: don't ignore function argument (#4990) 2016-07-05 17:40:37 +02:00
Lorenz Meier
ed19d1ff6b EKF2 wrapper: Optimize for size 2016-07-01 18:22:56 +02:00