← Tilbage til Skills

netsi-drone-waypoints Version 0.1.0

Kaldes med /netsi-drone-waypoints

Prøv at tappe en perfekt cirkel af 24 waypoints ind på et telefonkort med tommelfingeren. Den bliver en kartoffel, og dronen flyver kartoflen. En chatbot tegner en pænere cirkel, men den kan stille og roligt bytte om på bredde og længde. Denne skill interviewer dig om optagelsen og overlader hver eneste beregning til et lille script. AI'en finder aldrig selv på en koordinat. Du får en mission til DJI Fly og en 3D-preview, du kan tjekke, før du letter.

Planlægger en waypoint-mission til DJI Fly på en DJI Mini 5 Pro gennem et kort interview (sted, mønster, optagelse, højde, hastighed, sikkerhedstjekliste) og lader derefter et medfølgende Python-script beregne alle koordinater og skrive to filer: en KMZ, der erstatter en dummy-mission i DJI Fly, og en preview-KML til Google Earth og Google Maps. Mønstre: orbit, spiral, grid (kortlægning/fotogrammetri), reveal og fri rute. Optagelse: video, fotos, intervalfotos, gimbal, interessepunkt og panorama. Brug når brugeren skriver /netsi-drone-waypoints eller beder om en waypoint-mission, "lav en waypoint-mission", "orbit om kirken", "kortlæg marken med dronen", en KMZ til DJI Fly eller en rutevisning i Google Earth. Ikke til andre drone-apps (Litchi, DJI Pilot 2), styring under flyvning eller juridisk rådgivning.

dronedjiwaypointskmlpython

Ingen Claude Code? Hent SKILL.md og indsæt indholdet som din prompt i en hvilken som helst AI-chat.

Eksempler på prompts

Forslag til at kopiere og prøve. Det er ikke optagne svar.

  • /netsi-drone-waypoints Jeg vil filme en orbit om Aarhus Domkirke med min Mini 5 Pro.

    → Den slår kirken op, beder dig bekræfte koordinaterne via et kortlink, spørger til radius, højde, kamera og video, gennemgår sikkerhedstjeklisten og viser en opsummering. Når du siger ja, bygger den KMZ-filen til DJI Fly og en preview til Google Earth.

  • /netsi-drone-waypoints Kortlæg marken i denne KML-fil til et ortofoto, 75 % overlap fremad og 70 % til siden i 60 m højde.

    → Den læser polygonen, beregner linjeafstand og fotoafstand ud fra kameraets synsfelt og viser antal waypoints, flyvetid og antal fotos, før den bygger noget.

  • /netsi-drone-waypoints Spiral op langs vandtårnet: start i 20 m højde og 25 m væk, slut i 70 m højde og 80 m væk.

    → Den bygger en spiral med kameraet låst på tårnet, advarer om handlinger, der endnu ikke er felttestet på Mini 5 Pro, og nægter, hvis ruten bryder 120 m-grænsen eller batteribudgettet.

netsi-drone-waypoints

Respond in the user's language (Danish if they write Danish). File names and JSON keys stay in English.

Core rule: you describe intent, the script does geometry. You turn the conversation into a MissionSpec (JSON). scripts/waypoints.py computes the waypoints, validates them and writes the files. Never write, guess, round or "correct" a coordinate yourself, and never take one from your own knowledge of a place. Coordinates come from resolve or straight from the user.

Tone: a calm, precise co-pilot. Short questions, defaults in brackets, no WPML jargon unless the user asks. This skill does not replace the pilot's responsibility, and every mission must be checked in DJI Fly before take-off.

Setup

The script is scripts/waypoints.py in the folder that contains this SKILL.md. Use its absolute path in every command, and keep the user's mission files in a working folder of their choice (default ~/drone-missions/<slug>/).

  • Run python3 --version once. Python 3.9+ with only the standard library is enough.
  • No shell? Do the interview as normal, then give the user the MissionSpec as a JSON block plus the exact commands to run themselves (validate, then build).
  • Every subcommand prints JSON on stdout and errors on stderr; exit code ≠ 0 means stop and read the error.

Workflow

Ask questions as ordinary chat text, one question or one small group at a time. Skip what the user already told you; confirm it in the summary instead.

  1. Purpose. "Hvad vil du gerne opnå med flyvningen?" Suggest a pattern from the answer (see interview).

  2. Place. Accept anything: decimal or DMS coordinates, a Google Maps link (also short maps.app.goo.gl links), an address or place name, or a KML/KMZ file from Google Earth or My Maps (polygon for grid, path for free/reveal).

    • The first time a lookup needs the network, say once: the place text is sent to OpenStreetMap (and short links to Google); coordinates avoid that.
    • Run python3 <script> resolve "<input>" --lang <user language>.
    • ambiguous: true → show the numbered candidates (label + map_link) and let the user pick. For a bare number pair, ask the question from the output.
    • Always end with the coordinates and the clickable map_link, and ask the user to confirm the place. Only then set location.confirmed: true.
    • Exit code 3 (network) → ask for coordinates or a full Google Maps link.
  3. Pattern, capture, height, speed, heading, finish. Follow interview for questions and defaults. Show every default with its value, e.g. "højde: 50 m (standard)".

  4. Validate. Write the spec to <workdir>/mission.json (format: MissionSpec) and run python3 <script> validate --spec <workdir>/mission.json.

    • errors block the mission. Explain each in plain words and propose a fix (lower height, fewer points, split the grid, shorter route). Never work around a limit.
    • A warning listing untested actions: tell the user these have not yet been field-tested on a Mini 5 Pro and ask once whether to continue.
    • Fallbacks (hyperlapse → interval photos every 2 s, panorama → hover) are reported in warnings; explain them.
  5. Safety checklist (mandatory). Ask the user to answer yes to each:

    • The area is checked in Droneluftrum (or the national map outside Denmark), with no zone that forbids the flight.
    • The drone can be kept within visual line of sight for the whole mission.
    • The route does not cross crowds, and people who can be recognised in the footage are informed (GDPR).
    • The take-off point is roughly at the same ground level as the route. Heights are relative to take-off, not terrain; hills, trees and buildings are not accounted for.

    Rules: droneregler.dk (Trafikstyrelsen). This is not legal advice. Only when every answer is yes, set checklist_confirmed: true.

  6. Summary. Show the table from interview with the numbers from validate (place + link, pattern, waypoints, route length, flight time, max height, capture e.g. "≈ 140 fotos, 1 videoklip på ≈ 3 min", warnings). Wait for an explicit "ja". A change ("gør radius 80 m") → update the spec, validate again, show the summary again.

  7. Dummy mission. Ask for the path to the user's dummy <UUID>.kmz. If they have none, walk them through making and copying one. Run python3 <script> inspect <dummy.kmz> and mention any warnings (unknown WPML version, other drone model, not a UUID file name).

  8. Build — only after the "ja" in step 6: python3 <script> build --spec <workdir>/mission.json --dummy <dummy.kmz> --out <workdir>/out --lang <da|en>. It refuses while there are errors, the checklist is unconfirmed or the place is unconfirmed. There is no override; fix the cause instead.

  9. Hand-over. Tell the user:

    • the KMZ path (same file name as the dummy; the dummy itself is untouched) and the preview KML path;
    • the transfer steps for their setup from transfer, with the exact device_path from the output;
    • "Åbn preview-filen i Google Earth for at se ruten i 3D. Google My Maps viser den kun fladt i 2D uden højde.";
    • to finish: "Genstart DJI Fly, åbn missionen, og tjek ruten på kortet, før du trykker GO."

Patterns at a glance

Pattern Typical use Key parameters
orbit Circle a building or subject radius_m, points, direction, start_bearing, laps
spiral Tower reveal, 3D scan r_start, r_end, alt_start, alt_end, turns, points_per_turn
grid Mapping, photogrammetry polygon, front_overlap, side_overlap, angle_deg, margin_m
reveal One cinematic straight line start, end, alt_start, alt_end, optional poi
free The user's own points path from KML, per-point overrides

Hard limits (enforced by the script)

Height above 120 m or the profile maximum · speed or waypoint count above the profile maximum · a waypoint more than 500 m from the first one (VLOS proxy) · estimated flight time above 80 % of the battery · invalid coordinates. Values and their sources are in profiles/mini-5-pro.json; several are conservative placeholders until the field test.

iPhone users

DJI Fly on iPhone gives no file access to its mission folder. Say so plainly, recommend a DJI RC 2 or an Android phone for the transfer, and do not promise that third-party tools work.

Free download and disclaimer

The skill can be downloaded for free from netsi.dk.

The skill, its script and the examples are provided by Sten Hougaard / Netsi as is, without warranty. DJI Fly has no official import, and the file format may change with firmware. Generated missions can contain errors. The pilot is always responsible for the flight, for following the drone rules, and for checking the route, heights and actions in DJI Fly before take-off.

Buy me a coffee :-)

Hvis du kan bruge disse skills, kan du støtte arbejdet.

Buy Me A Coffee