How to adjust yaw angle towards a setpoint in offboard mode

I am using ROS2 foxy/FastRTPS to control PX4 in offboard mode. Currently, I can navigate through desired setpoints that are sent via PositionSetpointTriplet uORB message from ROS2 to PX4.
I can specify the yaw angle manually. However, I would like the yaw angle to point to the next setpoint similar to the behaviour in mission mode when MPC_YAW_MODE = towards_waypoint.

Is this even possible to achieve or do I have to calculate the angle manually in ROS2?

I have the same question. Does MPC_YAW_MODE have any effect for offboard mode? The docs suggest so but when I tried it, it doesn’t seem to have any effect.

image

I’m using MAVSDK to send a PositionNedYaw Struct and suspect that the yaw_deg might be affecting it - how can I send a NaN value for the yaw_deg through MAVSDK, so that I can use MPC_YAW_MODE?