Continuous yaw coming in auto modes

I rig up my copter with lithium ion battery 6s 17.5 Ah and did a flight with px4 v1.6.5 stable release.
when i put my copter in hold mode or position an any other auto mode the copter is yawing continuously.Below are the flight logs could anyone help me out?

http://logs.px4.io/plot_app?log=f3861a94-407b-4f96-b7a9-3f9599e3269f

http://logs.px4.io/plot_app?log=d6c486ef-b572-46a5-bca2-3395298384d2

You can see what the yaw controller is trying to do here. http://logs.px4.io/plot_app?log=f3861a94-407b-4f96-b7a9-3f9599e3269f#Nav-Yaw-Angle

Could you describe how it works from your perspective in manual and altitude control modes? Did you check that the heading is correct in QGroundControl?

The heading is coming correct in qgc as the quad is moving in hold mode heading is changing on qgc as well.
in mannal it works fine, in position mode there is oscillations when i give roll or pitch.

Can you tell what is the plot between thrust and magnetic field describes?

It’s plotting both to show you if the throttle is creating a magnetic field that impacts your compass.

so in our logs thrust is creating a magnetic field that is affecting our compass that might be the reason?