Create a UAV scenario, and specify the update rate, stop time, and reference location. The reference location sets the geodetic origin of the scenario in latitude, longitude, and altitude.
Add a custom inertial frame named MAP to the scenario. The MAP frame is offset 1 meter east from the default ENU (east-north-up) frame. Custom inertial frames enable you to define local coordinate systems for specific regions or tasks within the scenario.
Add one ground mesh and two cylindrical obstacle meshes to the scenario. The polygon mesh represents the ground surface. The first cylinder is specified using Cartesian coordinates relative to the scenario origin. The second cylinder uses geographic coordinates (latitude, longitude, and radius) by setting UseLatLon to true, which is useful when you want to place obstacles at known geodetic positions.
Add a UAV platform with a specified waypoint trajectory to the scenario. The trajectory defines a flight path through three waypoints with arrival times at 0, 1, and 2 seconds.
Add meshes to the UAV platform for visualization. The first mesh is a quadrotor body with a wingspan of 4 meters displayed in red. Then, add a geofence boundary to constrain the UAV flight region.
Attach an inertial navigation system (INS) sensor to the UAV platform. The INS sensor provides position, velocity, and orientation measurements during simulation.
Visualize the scenario in 3D.
Set up and start the scenario.