Skip to content

feat(GeoMap): map item overlays with 3D vehicle marker and flight path ribbon - #14876

Merged
DonLakeFlyer merged 1 commit into
mavlink:masterfrom
DonLakeFlyer:geomap-map-items
Aug 16, 2026
Merged

feat(GeoMap): map item overlays with 3D vehicle marker and flight path ribbon#14876
DonLakeFlyer merged 1 commit into
mavlink:masterfrom
DonLakeFlyer:geomap-map-items

Conversation

@DonLakeFlyer

@DonLakeFlyer DonLakeFlyer commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Map item framework and first consumers for the GeoMap 3D engine.

Map item framework

  • GeoMapItem: screen-space 2D overlay items anchored to geographic coordinates, with altitude modes (ClampToGround/Absolute), an optional delegate3D scene node with 2D↔3D crossfade (plus crossfade3D opt-out for items with no 2D counterpart), and shared auto-centering via MapPositionTracker
  • GeoMapPin: teardrop pin item

Vehicle marker

  • GeoMapVehicleItem with a paper-airplane 3D model (PaperPlaneGeometry)
  • Uses coordinate.altitude (GPS frame) instead of the altitudeAMSL fact, which diverges to baro frame on PX4 — keeps the marker consistent with the trajectory and HOME_POSITION

Flight path ribbon

  • GeoMapFlightPath renders the vehicle trajectory as a camera-facing ribbon in 3D, consuming the same incremental TrajectoryPoints signals as the 2D trail
  • FlightPathGeometry maintains an incremental vertex buffer: the per-position hot path (updateLastPoint) is an O(1) partial GPU upload; appends (rare, post-decimation direction changes) re-upload the buffer
  • Shaders expand each vertex perpendicular to the path tangent and view direction (billboarding) so vertical climbs stay visible; a depth pull defeats residual terrain height in 2D mode

TrajectoryPoints

  • 3D distance gate + east/north/up direction colinearity: purely vertical flight now generates trajectory points (previously dropped by the horizontal-only gate)
  • Flight distance now accumulates through-the-air (3D) distance

Camera/scene fixes

  • Recenter solve at the point's rendered height with terrain-following pivot elevation (scene API takes true meters)
  • Terrain-following look-at keeps the close-zoom 3D camera above the mesh

Tests

GeoMapItem lifecycle/crossfade, FlightPathGeometry incremental == rebuild equivalence, TrajectoryPoints vertical motion/decimation/3D distance, GeoScene solve round-trip and elevation units, PaperPlaneGeometry, MapPositionTracker.

Copilot AI balanced review requested due to automatic review settings August 16, 2026 01:59
@DonLakeFlyer
DonLakeFlyer requested a review from HTRamsey as a code owner August 16, 2026 01:59

This comment was marked as resolved.

…h ribbon

Map item framework and first consumers for the GeoMap 3D engine:

- GeoMapItem: screen-space 2D overlay items with altitude modes
  (ClampToSurface/RelativeToSurface/Absolute), optional delegate3D scene
  node with 2D<->3D crossfade (and crossfade3D opt-out for items with no
  2D counterpart), teardrop GeoMapPin, shared auto-centering
- GeoMapVehicleItem: vehicle marker with paper-airplane 3D model; uses
  coordinate.altitude (GPS frame) instead of the altitudeAMSL fact,
  which diverges to baro frame on PX4
- GeoMapFlightPath: vehicle trajectory rendered as a camera-facing
  ribbon; FlightPathGeometry keeps an incremental vertex buffer (O(1)
  append/update with partial GPU upload); shaders expand perpendicular
  to tangent and view direction so vertical climbs stay visible, with
  depth pull to defeat residual terrain height in 2D mode
- TrajectoryPoints: 3D distance gate and east/north/up direction
  colinearity so purely vertical flight generates trajectory points;
  flight distance now accumulates through-the-air (3D) distance
- GeoScene/GeoMapCamera: recenter solve at the point's rendered height
  with terrain-following pivot elevation; terrain-following look-at
  keeps the close-zoom 3D camera above the mesh
- Tests: GeoMapItem lifecycle/crossfade, FlightPathGeometry incremental
  == rebuild equivalence, TrajectoryPoints vertical motion/decimation/3D
  distance, GeoScene solve round-trip and elevation units

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/QmlControls/MapPositionTracker.cc:106

  • Enabling hard follow with an already-valid vehicle coordinate does not center the map until another coordinate update arrives. The periodic inset evaluator explicitly returns while hard follow is enabled, so switching into PIP/keep-centered mode while the vehicle is stationary can leave the old center indefinitely. Re-evaluate the one-shot and otherwise emit the current coordinate when keep becomes true.
    _keepVehicleCentered = keep;
    emit keepVehicleCenteredChanged();

src/GeoMap/GeoMapPin.qml:30

  • The stated clamp does not cover height < _headRadius: the denominator becomes negative and the ratio can be below -1, so Math.acos returns NaN and the marker shape disappears. Guard non-positive geometry before evaluating the tangent formula.
    readonly property real _tangentAngle: Math.acos(Math.min(1, _headRadius / (height - _headRadius)))

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 177 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.01%. Comparing base (f29efd3) to head (e1597f2).
⚠️ Report is 288 commits behind head on master.

Files with missing lines Patch % Lines
src/GeoMap/GeoMapItem.cc 65.05% 15 Missing and 50 partials ⚠️
src/GeoMap/FlightPathGeometry.cc 73.20% 7 Missing and 34 partials ⚠️
src/QmlControls/MapPositionTracker.cc 79.80% 2 Missing and 19 partials ⚠️
src/GeoMap/PaperPlaneGeometry.cc 62.50% 0 Missing and 12 partials ⚠️
src/GeoMap/GeoScene.cc 61.53% 3 Missing and 7 partials ⚠️
src/GeoMap/GeoMapCamera.cc 78.12% 1 Missing and 6 partials ⚠️
src/QmlControls/MapPositionTracker.h 41.66% 7 Missing ⚠️
src/GeoMap/GeoMapItem.h 58.33% 5 Missing ⚠️
src/GeoMap/SurfacePatchModel.cc 44.44% 2 Missing and 3 partials ⚠️
src/Vehicle/TrajectoryPoints.cc 87.50% 0 Missing and 2 partials ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14876      +/-   ##
==========================================
+ Coverage   25.47%   34.01%   +8.54%     
==========================================
  Files         769      940     +171     
  Lines       65912    85188   +19276     
  Branches    30495    39331    +8836     
==========================================
+ Hits        16788    28978   +12190     
+ Misses      37285    36873     -412     
- Partials    11839    19337    +7498     
Flag Coverage Δ
unittests 34.01% <70.00%> (+8.54%) ⬆️

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

Files with missing lines Coverage Δ
src/GeoMap/GeoMapCamera.h 100.00% <100.00%> (ø)
src/GeoMap/GeoScene.h 100.00% <100.00%> (ø)
src/GeoMap/SurfacePatchModel.h 83.33% <ø> (ø)
src/Vehicle/TrajectoryPoints.h 100.00% <ø> (+100.00%) ⬆️
src/GeoMap/FlightPathGeometry.h 66.66% <66.66%> (ø)
src/GeoMap/SurfaceModel.cc 64.06% <50.00%> (ø)
src/Vehicle/TrajectoryPoints.cc 70.45% <87.50%> (+27.59%) ⬆️
src/GeoMap/GeoMapItem.h 58.33% <58.33%> (ø)
src/GeoMap/SurfacePatchModel.cc 40.60% <44.44%> (ø)
src/GeoMap/GeoMapCamera.cc 78.45% <78.12%> (ø)
... and 6 more

... and 630 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 e409a94...e1597f2. 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.

@DonLakeFlyer
DonLakeFlyer merged commit 01d4628 into mavlink:master Aug 16, 2026
53 of 58 checks passed
@DonLakeFlyer
DonLakeFlyer deleted the geomap-map-items branch August 16, 2026 03:03
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