This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

UAV Algorithms

Guidance models and waypoint following for unmanned aerial vehicles (UAVs)

Unmanned aerial vehicles (UAVs) can be modeled and controlled using UAV Library for Robotics System Toolbox™ functions, objects, and blocks. You can simulate a reduced-order guidance model for fixed-wing and multirotor UAVs that approximates a closed-loop autopilot controller with a kinematic model. Generate control commands, UAV states, and environmental inputs using the given functions. A waypoint follower is also provided to execute flight missions based on pre-defined waypoints.


Using UAV Algorithms requires you to install the UAV Library for Robotics System Toolbox. To install add-ons, use roboticsAddons and select the desired add-on.


expand all

roboticsAddonsInstall add-ons for robotics
controlControl commands for UAV
derivativeTime derivative of UAV states
environmentEnvironmental inputs for UAV
stateUAV state vector
mavlinkdialectParse and store MAVLink dialect XML
createmsgCreate MAVLink message
createcmdCreate MAVLink command message
deserializemsgDeserialize MAVLink message from binary buffer
msginfoMessage definition for message ID
enuminfoEnum definition for enum ID
enum2numEnum value for given entry
num2enumEnum entry for given value
mavlinkioConnect with MAVLink clients to exchange messages
connectConnect to MAVLink clients through UDP port
disconnectDisconnect from MAVLink clients
sendmsgSend MAVLink message
sendudpmsgSend MAVLink message to UDP port
serializemsgSerialize MAVLink message to binary buffer
listConnectionsList all active MAVLink connections
listClientsList all connected MAVLink clients
listTopicsList all topics received by MAVLink client
mavlinksubReceive MAVLink messages
latestmsgsReceived messages from MAVLink subscriber
mavlinktlogRead MAVLink message from tlog file
readmsgRead specific messages from tlog file
plotTransformsPlot 3-D transforms from translations and rotations


expand all

multirotorGuidance model for multirotor UAVs
fixedwingGuidance model for fixed-wing UAVs
uavWaypointFollowerFollow waypoints for UAV
uavOrbitFollowerOrbit location of interest using a UAV
mavlinkdialectParse and store MAVLink dialect XML
mavlinkioConnect with MAVLink clients to exchange messages
mavlinksubReceive MAVLink messages
mavlinkclientMAVLink client information
mavlinktlogRead MAVLink message from tlog file


UAV AnimationAnimate UAV flight path using translations and rotations
UAV Guidance ModelReduced-order model for UAV
Waypoint FollowerFollow waypoints for UAV
Orbit FollowerOrbit location of interest using UAV


Approximate High-Fidelity UAV model with UAV Guidance Model block

Simulation models often need different levels of fidelity during different development stages.

Tuning Waypoint Follower for Fixed-Wing UAV

This example designs a waypoint following controller for a fixed-wing unmanned aerial vehicle (UAV) using the UAV Guidance Model and Waypoint Follower blocks from the UAV Library for Robotics System Toolbox.

Load and Playback MAVLink TLOG

This example shows how to load a telemetry log (TLOG) containing MAVLink packets into MATLAB®.

Use a MAVLink Parameter Protocol for Tuning UAV Parameters in MATLAB

This example shows how to use a MAVLink parameter protocol in MATLAB and communicate with external ground control stations.