Skip to content

Commit

Permalink
fix bogus clock jump detection with --ro-interval 1 (dump1090/readsb)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Sep 24, 2020
1 parent 8fb082e commit 38769db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modes_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ static int timestamp_check(modesreader *self, unsigned long long timestamp)
if (self->last_timestamp < timestamp)
diff = (timestamp - self->last_timestamp);

if (diff > 1 * self->frequency + sys_elapsed || diff + 1 * self->frequency < sys_elapsed) {
if (diff > 1.25 * self->frequency + sys_elapsed || diff + 1.25 * self->frequency < sys_elapsed) {
//unsigned long long toms = self->frequency / 1000;
//fprintf(stderr, "diff: %llu, ts: %llu, last_ts: %llu, sys_elapsed: %llu\n", diff / toms, timestamp / toms, self->last_timestamp / toms, sys_elapsed / toms);
self->outliers++;
Expand Down

0 comments on commit 38769db

Please sign in to comment.