Table of Contents
Multirotor Yaw Modes
When a multirotor is flying an autonomous mission it often doesn't make a significant difference where the front of the vehicle is pointing as it moves from waypoint to waypoint. Up until now if you defined a mission in QGroundControl the chances are you didn't change the default yaw angle for each mission item and it defaulted to 0 degrees. As a result after taking off it would spin to point north (if it wasn't already pointing north at launch) and remain pointing north right throughout the mission.
It is now possible to alter the yaw behavior of the multirotor during the mission. We'll first take a look at the modes and what they mean and at then end show a simulator demonstration of how each of these modes look in flight.
Mode 0 - Maintain Waypoint Heading [default]
At the start of the mission the multirotor will have loaded the next waypoint as its destination and will fly to that waypoint. Apart from the lat/lon and altitude of the waypoint there is also a yaw angle that should be applied at that waypoint. With this mode the original behavior is maintained, which is to assume the yaw angle of the destination waypoint as soon as that waypoint becomes the current destination.
So, for example, if the multirotor has completed waypoint 0 and is just setting out for waypoint 1 it will yaw to point in the direction defined in waypoint 1's yaw angle immediately.
Mode 1 - Point to Next Waypoint
As the title indicates, the multirotor will always point in the direction of destination waypoint as it progresses towards it. If wind should shift its trajectory it will constantly update its heading.
Mode 2 - Point to Home Location
In this mode the front of the multirotor will constantly update its heading so that the front of the multirotor is pointing to the home location. The home location is normally the point at which the multirotor was armed. This assumes you have an operational GPS installed and a 3D lock before arming.
Set up a circular mission, put a camera on the front of your multirotor and let it film you as it flies around you! Note that it will point to the home location, not you, so you may need to move to where it took off from if it wasn't close.
Mode 3 - Point Away from Home Location
This is the same as for the Point to Home mode except that it is facing 180 degrees in the opposite direction so that the back of the multirotor is always pointing to the home location.
You will find this mode most useful if you are not used to flying a multirotor yet and always want the back facing you so at anytime during a mission you can take over manual control without having to deal with it pointing in odd directions (ie: at you requiring reversed controls).
What about the Yaw Angles in QGroundControl?
There is a slight change in the way the yaw angles that are defined in QGroundControl are handled now. Seeing a yaw angle must be defined and defaults to 0 degrees we don't want the multirotor snapping to north every time it reaches a waypoint if you don't intend that.
So the new behavior is to ignore the yaw angle if the time to loiter at that waypoint is 0. If you want it to respect the yaw angle just give it a non-zero time and it will yaw in that direction, wait the time interval you specified then move on to the next waypoint.
How to Set the Yaw Mode
Currently the only way to change the yaw mode is to modify a parameter using the Parameters button in the Setup tab in QGroundControl (or in the Onboard Parameters widget if you activate it). One day this will probably be part of the Setup process in QGroundControl.
You will find the MIS_YAWMODE parameter under the MIS branch. Simply change the value to any of the above mode numbers to activate that mode. For example, MIS_YAWMODE 1 will activate the Point to Next Waypoint mode. Note that changing this parameter will take effect immediately and it is safe to change in flight during a mission.
Here is an actual flight using the Pixhawk with a Hardware in the Loop (HIL) simulation showing the difference between these modes as we switch them during flight.
And a real flight:
Where to Next?
Some more refinements and additions to yaw mode are on the way :)