Main Content

Generate Course and Yaw Commands for Orbit Following in Simulink®

This example shows how to use the UAV Orbit Follower block to generate course and yaw commands for orbiting a location of interest with a UAV.

Open the model. Click Open Live Script to get a copy of the Simulink® model. This model illustrates the inputs and the outputs of the block.

You must specify the current UAV pose as an [x;y;z;course] column vector. Typically, the pose is gathered from telemetry data from the UAV.

Also, specify the orbit center location in xyz-coordinates, orbit radius, turn direction, and lookahead distance on the path. The lookahead distance is important for tuning the path tracking. Higher values smooth the path, but lower values can improve tracking of the actual orbit.

open_system("uav_orbit_follower_ex1.slx")

Run the model to get the desired course and yaw for following the orbit. These outputs can be used to generate commands for a UAV.

sim("uav_orbit_follower_ex1.slx");

Close the model with:

close_system("uav_orbit_follower_ex1.slx", 0);