Arbitrary Yaw Angle when Set Mode to STABILIZE and ALT_HOLD

When i set the AUV to STABILIZE or ALT_HOLD, the AUV will turn to some yaw angle direction. Is it normal behavior for the AUV? Every time the pixhawk restarted, the yaw angle at start up is changing and it seems to be arbitrary. Could someone explain the behavior of the AUV yaw angle when setting the mode to STABILIZE and ALT_HOLD?

Current setup:
Ardusub version: 4.5.3
Parameter: Default
8 thrusther 6DOF frame configuration
Pixhawk 4

Hi @Lexciese,

The yaw behaviour in ALT_HOLD and STABILIZE modes is to maintain the heading angle the mode started in, and during operation the heading angle after the pilot’s last yaw control input (after a bit of settling time).

How are you controlling your vehicle, and which heading are you expecting it to take/hold when using those modes?

ahh, so this is the behavior. Thank you so much for the key information