Skip to content

feat(PlanView): choose PX4 VTOL takeoff mode - #14986

Open
alireza787b wants to merge 1 commit into
mavlink:masterfrom
alireza787b:feat/px4-vtol-takeoff-choice
Open

feat(PlanView): choose PX4 VTOL takeoff mode#14986
alireza787b wants to merge 1 commit into
mavlink:masterfrom
alireza787b:feat/px4-vtol-takeoff-choice

Conversation

@alireza787b

@alireza787b alireza787b commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Feature Description

QGroundControl currently inserts MAV_CMD_NAV_VTOL_TAKEOFF whenever the plan
vehicle is a VTOL. PX4 also supports an ordinary MAV_CMD_NAV_TAKEOFF for a
VTOL that should start and continue the mission in multicopter mode.

For PX4 VTOL plans, the Takeoff tool now offers two choices:

  • VTOL takeoff inserts MAV_CMD_NAV_VTOL_TAKEOFF. It remains the first and
    default choice, so the existing workflow does not change.
  • Multicopter takeoff inserts MAV_CMD_NAV_TAKEOFF and keeps the mission in
    multicopter mode until an explicit transition item is reached.

ArduPilot and non-VTOL vehicles keep the existing single-action Takeoff tool.
This PR is limited to QGroundControl mission planning. It does not add a
MAVLink command, change the mission format, require a PX4 change, or include
any video/networking work.

Implementation Details

  • The PX4 firmware plugin advertises the additional VTOL capability. Plan View
    does not contain a firmware-name check.
  • The selection belongs to the inserted mission item; there is no global or
    persistent takeoff-mode setting.
  • Mission geometry and VTOL mode calculations follow the command that is
    actually stored in the plan.
  • PX4 VTOL command metadata identifies an ordinary Takeoff item as a
    multicopter-mode takeoff after insertion or reload.
  • MAV_CMD_DO_VTOL_TRANSITION is unchanged. Its existing target-state selector
    remains the way to transition later in the mission.

Testing

  • Tested locally (Linux, offline PX4 VTOL Plan View)
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware

Manual check:

  • Checked the offline PX4 VTOL flow in Plan View on Linux.
  • Confirmed both choices are shown, VTOL takeoff is the default, and each choice
    inserts a takeoff mission item.

Automated coverage includes:

  • default and explicit command insertion;
  • unsupported-command rejection without changing the plan;
  • QGC JSON and WPL load/save behavior;
  • mission geometry and following-waypoint VTOL mode;
  • unchanged ArduPilot, PX4 multicopter, and PX4 fixed-wing behavior;
  • offline PX4 VTOL Plan View interaction and command metadata loading.

The full feasible suite is run by the QGroundControl GitHub Actions matrix for
this commit. No SITL or hardware evidence is claimed here.

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4 (offline planning)
  • ArduPilot

Screenshots / Demo

PX4 VTOL takeoff choices

Compatibility

  • Existing PX4 VTOL plans and the default insertion path are unchanged.
  • Saved missions use standard MAVLink command IDs and need no migration.
  • Firmware that does not advertise the capability does not show the additional
    choice.
  • ArduPilot behavior is covered by a focused compatibility test.

Checklist

  • I have read the Contribution Guidelines
  • My code follows the project's coding standards
  • I have added tests that prove my feature works
  • Focused and full feasible unit tests pass in GitHub Actions

The full QGC build/test toolchain was not available in the local checkout; the
local validation was limited to static checks and the manual Linux UI flow.


By submitting this pull request, I confirm that my contribution is made under
the terms of the project's dual license (Apache 2.0 and GPL v3).

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.08511% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.61%. Comparing base (f29efd3) to head (9391baf).
⚠️ Report is 354 commits behind head on master.

Files with missing lines Patch % Lines
src/MissionManager/MissionController.cc 60.00% 0 Missing and 12 partials ⚠️
...rc/MissionManager/MissionFlightStatusCalculator.cc 75.00% 1 Missing and 1 partial ⚠️
src/MissionManager/TakeoffMissionItem.cc 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14986      +/-   ##
==========================================
+ Coverage   25.47%   34.61%   +9.14%     
==========================================
  Files         769      945     +176     
  Lines       65912    85662   +19750     
  Branches    30495    39480    +8985     
==========================================
+ Hits        16788    29653   +12865     
+ Misses      37285    36332     -953     
- Partials    11839    19677    +7838     
Flag Coverage Δ
unittests 34.61% <68.08%> (+9.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/FirmwarePlugin/FirmwarePlugin.h 51.42% <ø> (+10.00%) ⬆️
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc 32.65% <100.00%> (+0.85%) ⬆️
src/MissionManager/MissionController.h 70.96% <ø> (+38.70%) ⬆️
src/MissionManager/MissionFlightStatusCalculator.h 100.00% <ø> (ø)
src/Vehicle/VehicleSupports.cc 68.42% <100.00%> (+43.42%) ⬆️
src/MissionManager/TakeoffMissionItem.cc 54.08% <80.00%> (+20.03%) ⬆️
...rc/MissionManager/MissionFlightStatusCalculator.cc 69.43% <75.00%> (+18.53%) ⬆️
src/MissionManager/MissionController.cc 46.60% <60.00%> (+11.13%) ⬆️

... and 656 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8150b0...9391baf. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Passed View

All builds passed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 2 passed, 76 failed, 7 skipped.

Test Results

linux-coverage-integration: 52 passed, 0 skipped
linux-coverage-unit: 185 passed, 0 skipped
linux-sanitizers-integration: 31 passed, 0 skipped
linux-sanitizers-unit: 185 passed, 0 skipped
Total: 453 passed, 0 skipped

Code Coverage

Coverage: 70.7%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 253.10 MB
QGroundControl-aarch64 177.32 MB
QGroundControl-installer-AMD64 128.44 MB
QGroundControl-installer-AMD64-ARM64 70.82 MB
QGroundControl-installer-ARM64 99.56 MB
QGroundControl-linux 84.76 MB
QGroundControl-mac 84.76 MB
QGroundControl-x86_64 189.58 MB
No baseline available for comparison

Updated: 2026-09-03 04:34:33 UTC • Commit: 9391baf • Triggered by: Linux

@DonLakeFlyer DonLakeFlyer added this to the Release V5.2 milestone Aug 29, 2026
@alireza787b
alireza787b force-pushed the feat/px4-vtol-takeoff-choice branch 4 times, most recently from b0c90ae to 808b949 Compare August 30, 2026 04:53
@alireza787b
alireza787b marked this pull request as ready for review August 30, 2026 06:40
Offer VTOL takeoff and multicopter takeoff choices for PX4 VTOL missions while keeping VTOL takeoff as the default. Use the existing MAVLink commands and preserve the current behavior for ArduPilot and non-VTOL vehicles.

Update mission-state calculations, PX4 command metadata, the Plan View guide, and focused tests for insertion, persistence, path state, compatibility, and the offline planning UI.
@alireza787b
alireza787b force-pushed the feat/px4-vtol-takeoff-choice branch from 808b949 to 9391baf Compare September 3, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants