miek / inspectrum

Radio signal analyser
GNU General Public License v3.0
2.04k stars 263 forks source link

Handle global offset in SigMF annotation indices #198

Closed povik closed 2 years ago

povik commented 2 years ago

The sample indices of a SigMF annotation include a global recording offset. Remove it to correctly handle annotations in recordings with non-zero offset.

(I asked in the SigMF spec repo to confirm this is the correct treatment of indices, see here)

schneider42 commented 2 years ago

According to https://github.com/gnuradio/SigMF/pull/154/files the idea of these changes is correct.

schneider42 commented 2 years ago

Works for me. It's a bit sad that we have to remove all annotations which have their start before the first sample. Supporting that would require larger changes to the code base though.

povik commented 2 years ago

It's a bit sad that we have to remove all annotations which have their start before the first sample.

Annotations like that are actually disallowed in the current wording of the spec, although I would rather they were not.

povik commented 2 years ago

I brought it up in an issue.

schneider42 commented 2 years ago

@povik any thoughts about my suggested change above?

povik commented 2 years ago

Seems like an improvement. Let me take up the change.