Plan • code • fly
Autonomy — Lua
ArduPilot Lua scripts on the flight controller: a geofence watcher, a GUIDED square as a state machine, battery-aware return home and typhoon damage mapping in the wind.
Begin with Simple steps or Blocks, then move to Python, mission files and Lua as the tasks require. Each mission lists its actual language options. These exercises include real Python and Lua execution in the browser, as well as block programming.
Autonomy — Lua
ArduPilot Lua scripts on the flight controller: a geofence watcher, a GUIDED square as a state machine, battery-aware return home and typhoon damage mapping in the wind.
A Lua geofence watcher
An onboard script that catches the drone 30 m before the crowd.
Grades 10–11A square in GUIDED from Lua
A state machine that arms, climbs, flies 4 corners with set_target_location and lands.
Grades 10–11Battery-aware return home
Work out how much battery the way home needs — and turn back in time.
Grades 10–11Typhoon damage mapping in the wind
Your Lua script is the camera trigger — measured over the ground, in a 7 m/s wind.
Grades 10–11Concepts in this track
autonomy
An autonomous task makes decisions from rules and measurements. The program still needs explicit conditions for progress and stopping.
geofence
A geofence defines a permitted area. A program must respond before crossing its boundary.
events
An event records something that happened during a run, such as reaching a point or taking a photo.
conditions
An if condition chooses an action based on a value or comparison. Check both the true and false cases.
state machines
A state machine separates a task into named stages and defines the conditions for moving from one stage to the next.
coordinates
Coordinates locate a target relative to an origin or on the Earth. Check the coordinate frame and units before moving.
battery
Battery state is a measurement to check during a mission. Plan a response before the remaining energy becomes too small for the task.
maths
Use units and relationships to predict the route, coverage or timing before executing the program.
mapping
A mapping flight collects observations across an area. Reaching a few points does not necessarily cover the whole field.
wind
Wind changes motion over the ground. A program may need to respond to measured position rather than assuming that heading alone determines the path.
How teachers use the missions
Start with the public explanation and ask students to predict what will happen. Compare the preview with that prediction, then sign in to change the controls or run a program. Ask pairs to record one change and explain its effect using the science or programming concept on the page.
Run them with a class
Read the grade bands and teaching connections, choose one activity, and share its preview with students. The description is public; opening the interactive activity requires a free account.