Skip to content

fix(mavlink): stamp every message with the receive time - #49

Merged
RickyWu18 merged 1 commit into
masterfrom
fix/mavlink-receive-time
Dec 2, 2026
Merged

RickyWu18 merged 1 commit into
masterfrom
fix/mavlink-receive-time

Conversation

@RickyWu18

Copy link
Copy Markdown
Owner

Summary

Stamp every MAVLink sample with the PC's wall-clock receive time. Before, a message with a non-zero time_usec / time_boot_ms used that payload value as its timestamp. On most autopilots that value is time since boot. Other messages (HEARTBEAT, SYS_STATUS, ...) used the receive time, so one stream mixed two clocks decades apart. time_usec / time_boot_ms are still plotted as regular fields.

Fixes #26

Target PlotJuggler version

  • PJ3 (pj3/)
  • PJ4 (pj4/)
  • Both / shared (3rdparty/, docs/, root files)

Plugin(s) affected

  • DataStreamMavlink
  • DataLoadArdupilot
  • Shared / build / CI
  • New plugin

Type of change

  • feat — new feature
  • fix — bug fix
  • refactor — no behavior change
  • docs — documentation only
  • build — CMake / vcpkg / CI

Breaking changes

  • The x-axis of a MAVLink stream is now the receive time for all messages. Messages with a payload time (ATTITUDE, SYSTEM_TIME, GPS_RAW_INT, ...) no longer use time since boot. Layouts or scripts that relied on the boot-time axis for those topics will see different x values.
  • pj_drone::mavlink::Message::embedded_timestamp_ns is removed from the shared core decoder (core/include/pj_drone_core/mavlink/decoder.hpp).

Testing

  • core/tests/mavlink_decoder_test.cpp: removed the embedded-timestamp tests. The remaining tests check that time_usec and time_boot_ms decode as regular fields, including across split frames.

@RickyWu18
RickyWu18 merged commit 4b584a4 into master Dec 2, 2026
7 checks passed
@RickyWu18
RickyWu18 deleted the fix/mavlink-receive-time branch December 2, 2026 12:04
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.

MAVLink streamer: timestamps mix boot-relative embedded time and wall-clock receive time

1 participant