# Dealing with position drift and yaw misalignment (R\_ev\_to\_ekf) during flight with External Vision

**URL:** <https://discuss.px4.io/t/dealing-with-position-drift-and-yaw-misalignment-r-ev-to-ekf-during-flight-with-external-vision/49363>\
**Category:** Uncategorized\
**Created:** [August 13, 2026, 8:31am UTC](https://discuss.px4.io/t/dealing-with-position-drift-and-yaw-misalignment-r-ev-to-ekf-during-flight-with-external-vision/49363 "2026-08-13T08:31:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![congca](https://discuss.px4.io/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@congca](https://discuss.px4.io/u/congca)\
**Post date:** [August 13, 2026, 8:31am UTC](https://discuss.px4.io/t/dealing-with-position-drift-and-yaw-misalignment-r-ev-to-ekf-during-flight-with-external-vision/49363/1 "2026-08-13T08:31:23Z")

</div>

_When using external vision data, I notice that if there is an initial yaw misalignment between the camera (EV) and the drone (EKF), the drone tends to drift or fly diagonally after flying a short distance._  
_I understand that \_ev\_q\_error\_filt and its rotation matrix R\_ev\_to\_ekf are supposed to handle this via online yaw alignment. However, before the filter converges, the position pos gets calculated incorrectly._

- How does the EKF dynamically update \_ev\_q\_error\_filt while flying?
- Is there a way to pre-align the yaw before takeoff to prevent this initial diagonal drift, or are there specific EKF2 parameters I should tune to speed up the convergence?

---

<div class="post-metadata">

**Author:** ![congca](https://discuss.px4.io/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@congca](https://discuss.px4.io/u/congca)\
**Post date:** [August 18, 2026, 7:55am UTC](https://discuss.px4.io/t/dealing-with-position-drift-and-yaw-misalignment-r-ev-to-ekf-during-flight-with-external-vision/49363/2 "2026-08-18T07:55:18Z")

</div>

Hello, can someone help me?

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [November 16, 2026, 7:56am UTC](https://discuss.px4.io/t/dealing-with-position-drift-and-yaw-misalignment-r-ev-to-ekf-during-flight-with-external-vision/49363/3 "2026-11-16T07:56:02Z")

</div>

Closed on November 16, 2026, 7:56am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
