Skip to content

feat(plot): read GNSS data from vehicle_gnss - #347

Merged
dakejahl merged 2 commits into
mainfrom
dakejahl/gnss-topic-rename
Oct 16, 2026
Merged

dakejahl merged 2 commits into
mainfrom
dakejahl/gnss-topic-rename

Conversation

@dakejahl

@dakejahl dakejahl commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reads GNSS data from vehicle_gnss, which PX4 main logs instead of vehicle_gps_position, while still reading vehicle_gps_position from older logs.

Problem

PX4/PX4-Autopilot#24399 (RFC, PX4 GNSS board) renamed vehicle_gps_position to vehicle_gnss. The new message nests the receiver sample under receiver. and drops the units from its field names (latitude_deg → receiver.latitude, s_variance_m_s → receiver.speed_accuracy, noise_per_ms → receiver.noise, vel_m_s → receiver.ground_speed). Flight Review didn't load the new topic, so logs from PX4 main have no map, GPS plots, 3D view, overview image or UTC start time.

Solution

GnssTopic reads vehicle_gnss, falling back to vehicle_gps_position in older logs, and maps vehicle_gnss receiver field names to their vehicle_gps_position names. Every consumer reads through it, and vehicle_gnss is added to the loaded topics. The rest of the rename (PX4/PX4-Autopilot#28957) doesn't change the log format. The selection fields added by the same work (usable, failed_checks, selection_count, sensors_status_gnss) aren't plotted yet.

PX4 renamed vehicle_gps_position to vehicle_gnss, nested the receiver sample under 'receiver.' and dropped the units from its field names (PX4/PX4-Autopilot#24399). Logs from PX4 main no longer had a map, GPS plots, 3D view or UTC start time. Both names are read so older logs keep working.
@dakejahl
dakejahl requested a review from ThomasRigi October 1, 2026 23:43
@dakejahl dakejahl added this to PX4 GNSS Oct 1, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in PX4 GNSS Oct 1, 2026
@dakejahl dakejahl moved this from Backlog to In progress in PX4 GNSS Oct 1, 2026

@bkueng bkueng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this still draft? Did you test it?

pyulog also makes use of the topic: https://github.com/search?q=repo%3APX4%2Fpyulog+vehicle_gps_position&type=code.

Comment thread app/plot_app/helper.py Outdated
vehicle_gps_position is only there for older logs, so it should be the fallback rather than the topic checked first.
@dakejahl

Copy link
Copy Markdown
Contributor Author

@bkueng tested and updated. pyulog PR is here PX4/pyulog#129. And I found a small edge case during testing #351

Also opened a QGC PR here mavlink/qgroundcontrol#15317

@dakejahl
dakejahl merged commit 0bbd15a into main Oct 16, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in PX4 GNSS Oct 16, 2026
@dakejahl
dakejahl deleted the dakejahl/gnss-topic-rename branch October 16, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants