matlab-create-uav-scenario

Create and simulate UAV scenarios with terrain, buildings, platforms, and sensors in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-create-uav-scenario
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-create-uav-scenario
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/robotics-and-autonomous-systems/matlab-create-uav-scenario
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-create-uav-scenario

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building a UAV simulation in MATLAB requires correctly wiring together uavScenario, terrain and building meshes, platforms, and sensors, where small mistakes like wrong coordinate frames, missing color arguments, or incorrect read outputs cause silent failures or errors.

Core Features & Use Cases

  • Scenario Construction: Create a uavScenario with a reference location, then import GMTED2010 or DTED terrain and OSM buildings using addMesh with geographic or local ENU coordinates.
  • Platform and Sensor Setup: Add uavPlatform objects with waypoint trajectories and quadrotor meshes, then bind GPS and INS sensors through the uavSensor adaptor pattern.
  • Simulation and Visualization: Run the setup/advance/updateSensors loop, read sensor and platform states, and animate flight with show3D including trajectory trails and body-frame markers.
  • Use Case: Simulate a quadrotor flying a waypoint mission over Boston terrain with GPS and IMU readings, visualizing the flight path in 3D.

Quick Start

Create a UAV scenario over Boston with GMTED2010 terrain, add a quadrotor platform following a waypoint trajectory, attach a GPS sensor, and run the simulation with 3D visualization.

Frequently Asked Questions about matlab-create-uav-scenario

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a UAV simulation scenario in MATLAB?

Create a uavScenario with a ReferenceLocation and UpdateRate, add terrain and buildings with addMesh, attach a uavPlatform with a waypointTrajectory, then run the setup, advance, and updateSensors loop. The UAV Toolbox provides all required functions.

How do I add terrain and buildings to a uavScenario?

Use addMesh with the terrain type and GMTED2010 data or a custom DTED file, and the buildings type with an OSM file. Pass UseLatLon=true when using geographic coordinates, and always include the required color argument.

How do I attach GPS or IMU sensors to a UAV platform in MATLAB?

Create a gpsSensor or insSensor model, then bind it to the platform using the uavSensor adaptor with a specified UpdateRate. The sensor rate must divide evenly into the scenario UpdateRate, and readings are retrieved with read after calling updateSensors.

Why is my UAV mesh invisible or inverted in show3D?

The mesh is inverted because the NED body frame is z-down; use the quaternion [0 1 0 0] in updateMesh to flip it upright. For large scenes where the mesh is too small to see, parent a marker to the platform body frame instead of inflating the scale.

When should I not use uavScenario for UAV simulation?

Avoid uavScenario for trajectory generation like minimum-snap waypoint design, Simulink-based UAV simulation, or path planning and obstacle avoidance. It is designed for scenario construction, sensor simulation, and 3D visualization only.