MAVLINKHUD

Mission Scenario: Drone Light Show (Swarm)

Objective

Coordinate 50 drones to launch simultaneously and form a geometric shape in the sky. Timing must be synchronized to the millisecond to prevent collisions and ensure visual coherence.

Vehicle Configuration

  • Type: Small Quadcopters (RTK GPS required).
  • Payload: RGB LED Module.
  • Comms: Broadcast MAVLink over Wifi (UDP).

Key Concepts

  • UTC Synchronization: Using NAV_DELAY with absolute UTC time ensures every drone executes the next command at the exact same instant, regardless of boot time or minor GPS variances.
  • Geofencing: Strict NAV_FENCE_POLYGON boundaries prevent "rogue" drones from leaving the performance volume.

Mission Plan (Drone #12 of 50)

Seq Command Parameters Description
1 NAV_DELAY Time: [20:00:00 UTC] Wait for the "Show Start" time.
2 DO_SET_SERVO Ch: 5, PWM: 1500 LEDs: RED (Standby).
3 NAV_TAKEOFF Alt: 30m Climb to formation altitude.
4 NAV_DELAY Time: [20:00:15 UTC] Wait for entire swarm to reach altitude.
5 DO_SET_SERVO Ch: 5, PWM: 1900 LEDs: GREEN (Formation Start).
6 NAV_WAYPOINT Lat/Lon: [Shape Pos 12] Move to assigned vertex in the "Star" shape.
7 NAV_DELAY Time: [20:00:45 UTC] Hold shape for 30 seconds.
8 DO_SET_SERVO Ch: 5, PWM: 1100 LEDs: BLUE (Transition).
9 NAV_SPLINE_WAYPOINT Lat/Lon: [Helix Pos 12] Fly a curved path to the "DNA Helix" shape.
10 NAV_RETURN_TO_LAUNCH - End of show.

Pro-Tips

  • RTK is Mandatory: For swarm spacing of < 2 meters, standard GPS (accuracy 2.5m) is dangerous. RTK (accuracy 0.02m) is required.
  • LED Control: Use DO_SET_SERVO if your LEDs act like servos (PWM). If you use WS2812 LEDs connected to a flight controller output, use Lua Scripting and DO_SEND_SCRIPT_MESSAGE to trigger complex animations like "Rainbow Fade" or "Sparkle" which are stored on the drone itself.