# Maximum value EKF2\_EV\_DELAY

**URL:** <https://discuss.px4.io/t/maximum-value-ekf2-ev-delay/16087>\
**Category:** QGroundControl\
**Created:** [April 5, 2020, 3:17pm UTC](https://discuss.px4.io/t/maximum-value-ekf2-ev-delay/16087 "2020-04-05T15:17:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![D0z1](https://discuss.px4.io/letter_avatar_proxy/v4/letter/d/a3d4f5/32.png) [@D0z1](https://discuss.px4.io/u/D0z1)\
**Post date:** [April 5, 2020, 3:17pm UTC](https://discuss.px4.io/t/maximum-value-ekf2-ev-delay/16087/1 "2020-04-05T15:17:34Z")

</div>

Hi everyone,

I am using a Pixhawk 2.1 Cube flight controller running PX4 1.8.2 on a Tarot 680. We are using the vision estimator where I provided a position (geometry\_msgs/poseStamped) into the vision\_pose/pose topic of mavros.

Results were ok, but while using the system-wide replay for the EKF2. I realized the estimation would be perfect with EKF2\_EV\_DELAY = 525ms.

I had 2 questions concerning the EKF2\_EV\_DELAY parameters.

1. I’ve followed the ekf2\_ev\_delay tuning section of the documentation. Following the guide, I would need an approximate parameters of 425 ms, which is bigger than the maximum allowed by QGroundControl. Why is the buffer limited to 300 ms? Is it a RAM limitation? Would it be dangerous to allow a longer buffer? (See first log)

2. Second question, my vision position and estimator are synchronize,but it seems like my local position (fusion of the data) is delayed in time of a couple of hundred of ms? Why is my local position late from my estimator and SLAM data?

Here’s a picture of the estimation at 300 ms (EKF2\_EV\_DELAY)

 ![ek2_ev_delay_300](https://discuss.px4.io/uploads/default/original/2X/c/c79d9c917ce182e829937d243055071905c4ba2c.png)

Here’s a picture of the estimation at 525 ms (EKF2\_EV\_DELAY)

 ![ekf2_ev_delay_525](https://discuss.px4.io/uploads/default/original/2X/1/1037a7ed1f16e1719f86d6a87cb0551ed1d8a849.png)

Log 1 : [https://logs.px4.io/plot\_app?log=c3a795c7-ee51-4ccd-90d3-a042167ebd32](https://logs.px4.io/plot_app?log=c3a795c7-ee51-4ccd-90d3-a042167ebd32)  
Log 2 : [https://logs.px4.io/plot\_app?log=f2ad84a7-160c-43ff-a55b-17767ee238dc](https://logs.px4.io/plot_app?log=f2ad84a7-160c-43ff-a55b-17767ee238dc)

---

<div class="post-metadata">

**Author:** ![D0z1](https://discuss.px4.io/letter_avatar_proxy/v4/letter/d/a3d4f5/32.png) [@D0z1](https://discuss.px4.io/u/D0z1)\
**Post date:** [April 23, 2020, 1:45pm UTC](https://discuss.px4.io/t/maximum-value-ekf2-ev-delay/16087/2 "2020-04-23T13:45:07Z")

</div>

Does anybody had that problem? Anyone can help with the tuning of EKF2 (documentation, solution, etc…)

Thank you
