Why does it automatically face north in GUIDED mode?

When I send several “set_attitude_target” commands to ArduPilot in GUIDED mode, the copter automatically adjusts the yaw angle to 0, which means it automatically faces north. What is the reason for this behavior? Where can I adjust the settings to prevent it from automatically adjusting the yaw? Additionally, I set the target yaw angle in the “set_attitude_target” command to the current yaw angle of ArduPilot, not 0 degrees.

You need to specify the target type mask to not include yaw.
Currently, you’re setting both type mask to include yaw and you’re setting the yaw target to 0 (0 or 360 = north).

Which mask? Do you mean the ATTITUDE_TARGET_TYPEMASK?

I’m specifying to ignore yaw (type_mask = 0b00000111), but it still faces north.

I’m in GUIDED_NoGPS mode and have the following parameters set:

format: PARAM_NAME current_value (default_value)
GPS_TYPE None (Auto)
GPS_TYPE2 None (None)
COMPASS_AUTODEC Disabled (Enabled)
COMPASS_AUTO_ROT Disabled (Enabled)
COMPASS_ENABLE Disabled (Enabled)
COMPASS_USE Disable (Enabled)
COMPASS_USE2 Disable (Enabled)
COMPASS_USE3 Disable (Enabled)
EK3_MAG_CAL Never (After first climb yaw reset)

Here’s a video i made showing this behaviour:

Any news about this topic?