YAW behaviour sometimes ignores ROI

Dear friends! Please anybody help what may happen, after update to arducopter 4.0.4 , pixhawk board, flying on mission, copter nose position resets sometimes. I use 2D gimbal . drone moves nose forward it movement, not POI, after passing some waypoints. I set POI in mission planner, and it flies normally for some time, and then resets again !

waypoint and log file here: https://drive.google.com/file/d/15c00itHmQlBIN2F-LrpYo7PglPRQruP3/view?usp=sharing

I added another case. Somewhere here

after WP 32 drone must still look at POI 29, turning slowly to the left, but it turned right to the direction of movement…
log and waypoints file here:

Can you please open a github issue?

I can’t see the problem. Where you indicate Yaw/DesYaw don’t change since 0º=360º, even if there is a jump in your figure. What was the real yaw behaviour? It should be clear in the .tlog file.

Thank you for the answer. I mean not a 0 - 360 jump but wrong direction of turning, a little bit earlier, it must turn to south (->180)º slowly, but not head to the north. POI is located below (on map), I attached tlog here 2020-12-11 10-56-01.tlog (678.7 KB)

What i wanted to be and what i have in simulation, using tha same waypoints, copter moves to the top of map and looks to the bottom:

What I have in fact - it looks in the same direction as moves:

ok, i will try, thank you

See this.

Changing the yaw during a mission causes the vehicle to change heading until the next waypoint.
True. It has happened to me several times (unintentionally moving yaw stick), although I think heading follows trajectory direction until next ROI.

Did you move yaw stick during mission?

In your .tlog it seems that ROI waypoint 26 is obeyed, but after heading follows trajectory direction. So if you repeat the mission making sure not to move yaw stick, it is possible that it would not happen again.

interesting idea. But I don’t see extreme changing in RCIN, except short peaks in C1, but just at about 10, what is less than threshold i guess. But I will try to extend it next time nevertheless

I agree, but see this, specially when copter touches high grass on the .tlog capture and on the video: it also loses ROI.

So there may be subtle cases for a ROI loss. Simply, repeat the mission and check again.