Yaw rate command wrapped to 180 deg/s


It’s a bit strange to me that in Guided mode the yaw rate command is being wrapped, as on the line in the source code here: https://github.com/ArduPilot/ardupilot/blob/master/ArduCopter/mode_guided.cpp#L594. This means that a command of 6.28 rad/s is interpreted as a requested zero rotation rate, and the rotation direction flips at pi. What is the rationale behind this? What if I want to rotate at 7 rad/s?

I wasn’t sure if this is considered a bug or if I’m missing something, so I post it here instead of making an issue on Github right away. Please let me know if the Github issue list is the appropriate place for this remark.


Good catch, that is a bug, can you do a github PR ?

1 Like

Sure, first time but I’ll give it a go :slight_smile:

Take a look here for some info: https://ardupilot.org/dev/docs/contributing.html

Ah that’s really useful, thanks!

Submitted the pull request. Please provide feedback if I did something that violates the requested procedure :slight_smile: