Skip to content

Commit 8d8b196

Browse files
Mavlink: add a basic sanity checker for tlog timestamps
1 parent e21fe83 commit 8d8b196

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mavlink_common_v1.0/mavlink.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18689,7 +18689,10 @@ MAVLink.prototype.parseType = function (type) {
1868918689
this.startTime = timestamp/1000
1869018690
}
1869118691
m.time_boot_ms = timestamp/1000 - this.startTime
18692-
messages.push(m)
18692+
// Bad sanity checker, ignore messages if they claim to be more than 100 days after start of logging
18693+
if (m.time_boot_ms < 8640000000) {
18694+
messages.push(m)
18695+
}
1869318696
}
1869418697
if (messages.length > 0) {
1869518698
this.emit('message', messages)

0 commit comments

Comments
 (0)