We are using a Pixhawk Cube unit with no external GPS or magnetometer, we only have a TFMini connected on the TELEM2 port. The PX4 Software version is v1.9.0 (RC). We were testing the yawing behaviour of the quadcopter by holding it in the hands and giving yaw input using a transmitter. The flight log is here: https://logs.px4.io/plot_app?log=70c4582e-3f91-472e-9e8b-4ba039184943.
We observed that the yaw setpoint is going beyond 180 degrees and carrying over from -180 degrees frequently, when a yaw input is set to maximum in one direction. Here is a picture of this behaviour:
This causes the yaw rate setpoint to wildly switch from high positive values to high negative values, as seen here:
This also happens for relatively small yaw inputs. What could be the reason behind this? And what can be done to fix this?