Unexpected yaw during the flight

Frame: Hex
Pixhawk 6C with 1.15.2
F9P GPS
RM3100 external compass

During the mission flight, after reaching first waypoint, drone started yawing. Flight was stable, but it just kept turning left and then turning back. Happened in 3 consecutive flights. No motor misalignment, drone is calibrated, cannot find the problem. In the previous 2 flights turning left and back was done 2-3 times, but on the last flight it did that for too many times.

This is the flight log

Looked into mission profile, it has no extra waypoints, it’s supposed to just go to a waypoint and come back to a waypoint near home.

What was the mission profile? It looks like the velocities were commanded that way… :thinking:

I couldn’t find how it was commanded to do so. Mission profile looks fine to me. It’s supposed to go to a waypoint, comeback to another waypoint. I couldn’t upload the .plan or .txt so let me paste it here:

{
    "fileType": "Plan",
    "geoFence": {
        "circles": [
        ],
        "polygons": [
        ],
        "version": 2
    },
    "groundStation": "QGroundControl",
    "mission": {
        "cruiseSpeed": 15,
        "firmwareType": 12,
        "globalPlanAltitudeMode": 1,
        "hoverSpeed": 5,
        "items": [
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 100,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 1,
                "frame": 3,
                "params": [
                    0,
                    16,
                    0,
                    null,
                    34.1667379,
                    109.12065679999999,
                    100
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 100,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 2,
                "frame": 3,
                "params": [
                    0,
                    16,
                    0,
                    null,
                    34.1588448,
                    109.1408101,
                    100
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 100,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 3,
                "frame": 3,
                "params": [
                    0,
                    1,
                    0,
                    null,
                    34.1649074,
                    109.11982909999999,
                    100
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 30,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 4,
                "frame": 3,
                "params": [
                    2,
                    1,
                    0,
                    null,
                    34.1649074,
                    109.11982909999999,
                    30
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 30,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 19,
                "doJumpId": 5,
                "frame": 3,
                "params": [
                    2,
                    0,
                    null,
                    0,
                    34.1649074,
                    109.11982909999999,
                    30
                ],
                "type": "SimpleItem"
            }
        ],
        "plannedHomePosition": [
            34.16700769617688,
            109.12065679999999,
            0
        ],
        "vehicleType": 2,
        "version": 2
    },
    "rallyPoints": {
        "points": [
        ],
        "version": 2
    },
    "version": 1
}