Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Need mechanism in Copter to reset yaw to follow vehicle heading in guided mode #2427
By default when you enter guided mode, the yaw of the vehicle follows the vehicle heading. If you change the yaw using MAV_CMD_CONDITION_YAW you will have to control the yaw manually for the rest of the script, because there is no way good way to reset the yaw back to following vehicle heading (actually, you can toggle the mode away from GUIDED and back again, but then RC Controller settings for throttle etc may affect vehicle behaviour - so this is not acceptable).
A desirable implementation is to update MAV_CMD_CONDITION_YAW param4 to have a third option that sets the yaw as relative to the vehicle heading (in addition to the absolute values and relative to the last yaw setting). Setting this and a heading of zero would emulate the default behaviour. Setting this and a heading of anything else would allow a yaw to be specified relative to the vehicle's direction of travel.
A less desirable but still good implementation would be to simply reset to the default behaviour, perhaps using Param 5.