Bug? Help needed with MAV_CMD_DO_REPOSITION and heading values

Hi all,

I’ve written a simple mission executive that runs on a Raspberry Pi companion computer. It issues MAVLink commands in Guided Mode to ArduPilot and subscribes to various messages to determine ACK/NACK, command completion (has a waypoint been reached) etc.

However, I have a question that I’m hoping someone can help me with…

I’m using MAV_CMD_DO_REPOSITION to fly to waypoints and have configured the heading as a Float.NaN in order to allow ArduPilot to determine and set the heading towards the destination. This all works as expected, no issues.

However, if I specify an explicit heading it appears to be ignored.

Is this expected behavior, a bug or is there something else I need to do?

Many thanks!


It might be unimplemented, I need to check but in the answer in here

I was able to hold the heading and move backwards.

My current work around is to issue a SET_POSITION_TARGET_GLOBAL_INT with the appropriate frame and mask bits.

However, I’d prefer to use MAV_CMD_DO_REPOSITION as it gets ACKed by ArduPilot, i.e. I know that the command has been seen by the flight controller.

Got your point.
I have a pr about sending other target values on position target global int messages.

Feel free to use to patch the firmware with it if you’re working on simulation.
Hope it goes into the master soon.