Skip to content

Mission item detail: add MAV_CMD_NAV_TAKEOFF - #763

Draft
hamishwillee wants to merge 8 commits into
pr_mission_item_docsfrom
nav_takeoff_mission_item_docs
Draft

hamishwillee wants to merge 8 commits into
pr_mission_item_docsfrom
nav_takeoff_mission_item_docs

Conversation

@hamishwillee

Copy link
Copy Markdown
Collaborator

Stacked on #761.

Summary

Adds Params and Autopilot Support sections for MAV_CMD_NAV_TAKEOFF, following the same pattern already established for the other NAV_ items and for MAV_CMD_CONDITION_GATE on this page.

Autopilot Support is based on source review of both flight stacks (PX4's mavlink_mission.cpp/mission_block.cpp, ArduPilot's AP_Mission.cpp/commands_logic.cpp/mode_auto.cpp) cross-checked against live protocol testing on PX4 multicopter/fixed-wing/VTOL and ArduCopter/ArduPlane/QuadPlane.

  • PX4: Pitch and Flags are never stored on any vehicle type — the internal mission-item representation has no field for either. Yaw is stored and normalised correctly but discarded at takeoff execution — it does not command the vehicle's heading.
  • ArduPilot: Pitch is stored and genuinely used as climb-out pitch on fixed-wing, but not read by multicopters — a real per-vehicle functional difference, not a storage gap. Flags and Yaw are never stored on any vehicle type. NaN is rejected for the unused param2, and INT32_MAX is rejected for the "use current position" location sentinel — both spec violations.

The underlying test data will also be published to mavlink-compat-data.

npm run lint passes on the changed files (also added quadplane to cspell.json's word list — already used elsewhere in the docs, e.g. en/messages/common.md, but that file is cspell-exempt).

Test plan

  • markdownlint-cli2, prettier --check, cspell all pass on the changed files
  • Links resolve to existing anchors in en/messages/common.md (MAV_CMD_NAV_TAKEOFF, NAV_TAKEOFF_FLAGS)

🤖 Generated with Claude Code

https://claude.ai/code/session_017VNs1WcVq23Y3tFbT3bidX

hamishwillee and others added 6 commits September 12, 2026 09:42
Adds the new Mission Item Detail page with the MAV_CMD_NAV_WAYPOINT
and MAV_CMD_CONDITION_GATE sections, and registers the page in
SUMMARY.md. The Loiter commands (currently documented in
mission.md) will be moved across in a follow-up commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGievqkKSBz7ke63mjZXdj
Copies the "Loiter Commands" section from mission.md into
mission_item_detail.md unchanged (still covering all four
MAV_CMD_NAV_LOITER_* commands together), and replaces it in
mission.md with a pointer to the new page. Splitting the section
into one subsection per command follows in a separate commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGievqkKSBz7ke63mjZXdj
Splits the combined Loiter Commands section into a subsection per
MAV_CMD_NAV_LOITER_* command, matching the structure already used
for MAV_CMD_NAV_WAYPOINT and MAV_CMD_CONDITION_GATE.

Per-command param tables reuse the exact original wording where the
old combined tables documented that param (radius/lat/lon/alt for
all four commands; heading required/xtrack for LOITER_TIME and
LOITER_TURNS only, matching the original's stated scope). Where the
original had no table text for a field (LOITER_TIME/TURNS param 1,
LOITER_TO_ALT's params, LOITER_UNLIM's params 1/2/4), the
corresponding MAV_CMD_NAV_LOITER_* description is taken from the
XML-derived message reference instead.

The shared exit-conditions explanation is kept, unchanged, under
LOITER_TIME (its original scope), with LOITER_TURNS linking to it.
No wording is otherwise reworded, corrected, or extended in this
commit - see follow-up discussion for suggested improvements found
while doing this split.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGievqkKSBz7ke63mjZXdj
- Add "See Exit Conditions" links from LOITER_TO_ALT's Heading
  Required and Xtrack Location params: both fields are defined in
  the XML for this command, so the link is a protocol-level fact
  regardless of whether a given autopilot actually honors them.
- Reformat LOITER_TIME/LOITER_TO_ALT/LOITER_TURNS wording and merge
  the LOITER_TO_ALT NOTE per hand edits.
- Replace the unverified LOITER_TIME/LOITER_TO_ALT Autopilot Support
  claims with a commented-out "Untested" placeholder: none of that
  wording was backed by testing or a source citation, so it
  shouldn't be asserted as fact until it is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGievqkKSBz7ke63mjZXdj
Works through the mavlink-command-review skill's report on this
page:

- Fix the Exit Conditions scope contradiction: it now correctly
  names LOITER_TO_ALT alongside LOITER_TIME/TURNS, with anchor
  links to all three headings.
- Revert the LOITER_TURNS "multicopters circle" claim (uncited,
  contradicted the XML and every sibling section) - no vehicle-type
  claim is made in that intro anymore, and its Radius description
  no longer implies an answer either way.
- Comment out claims added by Claude with no supporting evidence
  (NaN-altitude validation, the whole Pass Radius subsection incl.
  its Autopilot Support bullets) rather than publish them as fact.
- Fix a dangling #pass_radius link left over from commenting out
  its target heading, and a "loiter.radius" typo.
- Standardize formatting: Autopilot Support heading capitalization,
  empty-param notation ("-"), min/max/increment notation, added
  Units columns to the WAYPOINT/GATE Params tables, and reworded
  LOITER_UNLIM's intro line to match its siblings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGievqkKSBz7ke63mjZXdj
The trigger line was documented and drawn as perpendicular to the
inbound path, anchored at the gate. Source (PX4 mission_block.cpp's
NAV_CMD_CONDITION_GATE branch) shows it's actually perpendicular to
the vector from the gate to the *next waypoint* -- not to the path.
For an off-path gate these differ measurably (confirmed by flight
telemetry against real PX4 SITL), so the diagram's marked crossing
point was geometrically wrong. Redrawn to show the gate->next-waypoint
reference vector and the true perpendicular trigger line, and reworded
the prose and the Geometry param description to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VNs1WcVq23Y3tFbT3bidX
@hamishwillee
hamishwillee marked this pull request as draft September 13, 2026 19:51
hamishwillee and others added 2 commits September 17, 2026 09:22
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrites the placeholder XML description into docs prose linking back
to the XML definition, extends the param descriptions with
per-vehicle-type constraints, and fills in Autopilot Support based on
source review of both flight stacks (PX4's
mavlink_mission.cpp/mission_block.cpp, ArduPilot's
AP_Mission.cpp/commands_logic.cpp/mode_auto.cpp) cross-checked against
live protocol testing on PX4 multicopter/fixed-wing/VTOL and
ArduCopter/ArduPlane/QuadPlane.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hamishwillee
hamishwillee force-pushed the nav_takeoff_mission_item_docs branch from ca5127d to d9034e8 Compare September 16, 2026 23:26
Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode.
[MAV_CMD_NAV_TAKEOFF](../messages/common.md#MAV_CMD_NAV_TAKEOFF) causes a vehicle to take off and climb to the specified altitude.
Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other info to consider (plus think about adding to skill #767 AND XML).

A note about what isn't covered by the spec. I.e

  • we don't actually define what happens with the sentinel value, so it might not provide an altitude. Ditto for Lat/Lon. We should. I think there is a PR discussion on that I need to resolve.
  • Note that pitch is no relevant for hover vehicles and the yaw isn't relevant for forward-flying vehicles. We probably need to note this explicitly in XML.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, for my review skill, would be good to make sure it suggests images to show how pitch and yaw affect the vehicle behaviour "in theory".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant