flightaware/dump1090

dropped_samples counting is broken

Closed this issue · 6 comments

Modes.stats_current.samples_dropped += buf->dropped;

if (dropped) {

This fix for readsb-protobuf also applies to dump1090-fa:
Mictronics/readsb-protobuf#21

actually two issues:

  • outbuf->dropped is not reset and in dump1090.c dropped is used regardless of the magbuf discontinuous flag
  • static variable dropped is never reset in sdr_rtl.c

Thanks for the fixes. I might move the initialization of outbuf->dropped into the fifo code so it's always done

nb: static variable seems to be correctly reset already

yeah seems this wasn't correctly patched when Mictronics used your fifo code.
(i don't have any of the fifo code in my fork, still have the old dump1090 code for managing the buffers)

Pretty sure the other part of the patch was still necessary.
The static dropped would have been reset and outbuf->dropped would have been added each time the buffer was being reused.

which "other part" do you mean? The change in the linked PR resets the per-buffer dropped on each acquire. I don't think there's anything else?

Yeah you fixed that by setting outbuf-dropped to zero in fifo_acquire.
Sorry if the comment was ambiguous.
I meant you already did the part of the fix necessary for dump1090-fa