Skip to content

FlyView: display Catmull-Rom curve for spline waypoints#14433

Open
leonfliesthings-dev wants to merge 1 commit into
mavlink:masterfrom
leonfliesthings-dev:feature/spline-curve-display
Open

FlyView: display Catmull-Rom curve for spline waypoints#14433
leonfliesthings-dev wants to merge 1 commit into
mavlink:masterfrom
leonfliesthings-dev:feature/spline-curve-display

Conversation

@leonfliesthings-dev
Copy link
Copy Markdown

Summary

QGC draws straight lines between NAV_SPLINE_WAYPOINT (cmd 82) mission items, even though ArduPilot flies smooth Hermite/Catmull-Rom curves through them. This makes it difficult for operators to visualize the actual flight path when using spline waypoints.

This PR adds a cyan Catmull-Rom interpolation overlay on the fly map that shows the approximate spline curve between consecutive spline waypoints.

How it works

  • A MapPolyline in FlyViewMap.qml polls the mission controller's visualItems every 3 seconds
  • When spline waypoints (cmd 82) are detected, it computes Catmull-Rom interpolation between consecutive waypoints
  • The curve is drawn as a cyan overlay on the map (3px wide, 85% opacity)
  • Only renders when spline waypoints are present — no effect on regular waypoint missions
  • Minimal performance impact: computation only runs when the mission item count changes

Screenshots

The cyan line shows the approximate spline curve ArduPilot will fly, overlaid on the straight-line mission path display.

Testing

  • Loaded mission with NAV_SPLINE_WAYPOINT items in SITL
  • Cyan curve appears on the fly map showing smooth paths between waypoints
  • No curve shown for missions using only NAV_WAYPOINT (cmd 16)
  • No performance impact observed

QGC draws straight lines between NAV_SPLINE_WAYPOINT (cmd 82) items,
even though ArduPilot flies smooth Hermite curves through them. This
adds a Catmull-Rom interpolation overlay on the fly map showing the
approximate spline curve in cyan.

The curve updates automatically when the mission changes and only
renders when spline waypoints (cmd 82) are present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your first pull request! 🎉

A maintainer will review this soon. Please ensure:

  • CI checks pass
  • Code follows coding standards
  • Changes tested on relevant platforms

We appreciate your contribution to QGroundControl!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.47%. Comparing base (f29efd3) to head (0946f8b).
⚠️ Report is 32 commits behind head on master.

❌ Your project check has failed because the head coverage (26.47%) is below the target coverage (30.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14433      +/-   ##
==========================================
+ Coverage   25.47%   26.47%   +1.00%     
==========================================
  Files         769      767       -2     
  Lines       65912    66285     +373     
  Branches    30495    30667     +172     
==========================================
+ Hits        16788    17546     +758     
+ Misses      37285    36280    -1005     
- Partials    11839    12459     +620     
Flag Coverage Δ
unittests 26.47% <ø> (+1.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 133 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
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, 42 failed, 7 skipped.

Test Results

linux-coverage: 88 passed, 0 skipped
Total: 88 passed, 0 skipped

Code Coverage

Coverage Baseline Change
60.4% 60.4% +0.0%

Artifact Sizes

Artifact Size Δ from master
QGroundControl 216.77 MB -4.61 MB (decrease)
QGroundControl-aarch64 176.66 MB -0.01 MB (decrease)
QGroundControl-installer-AMD64 134.68 MB -0.00 MB (decrease)
QGroundControl-installer-AMD64-ARM64 77.48 MB -0.01 MB (decrease)
QGroundControl-installer-ARM64 106.03 MB +0.00 MB (increase)
QGroundControl-linux 186.86 MB -147.82 MB (decrease)
QGroundControl-mac 186.86 MB No change
QGroundControl-windows 186.87 MB No change
QGroundControl-x86_64 172.32 MB +0.01 MB (increase)
Total size decreased by 152.44 MB

Updated: 2026-05-24 08:59:15 UTC • Triggered by: Linux

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.

1 participant