ais-simulator icon indicating copy to clipboard operation
ais-simulator copied to clipboard

Bursts are eight times longer than expected

Open vtmmm opened this issue 1 year ago • 2 comments

It seems that each burst has ~26.7 ms of data (which is expected since that matches the AIS timeslot duration), and then ~187 ms of a constant carrier. The entire thing lasts about 213 ms, or 8 times longer than intended.

I don't believe the incoming PDU has a ton of trailing 0s or anything, so I'm not sure why this is.

A single message burst open with Inpspectrum showing 26.7 ms of data followed by a constant carrier:

image

To generate this file, I'm using ais-simulator.grc but I've replaced the Omso sink with a File Sink, then generating one message from the ais-simulator web interface.

image

vtmmm avatar Sep 07 '24 18:09 vtmmm

Here is a debug print output that shows the extra 0s on the output of the Bit String to Frame.

image

I added a /8 to the end of line 441 of bitstring_to_frame_impl.cc, changing it to:

                noutput_items = len_frame_real/8;

... and that seems to fix it. Not sure if there's something I'm missing, or if that's the bug fix. But I'm still getting good decodes, and my bursts don't last as long.

(Note that I'm only writing to IQ files and using them to decode, not sending the data to a radio.)

vtmmm avatar Sep 10 '24 00:09 vtmmm

Thanks. I will try your fix against a Saab R5A transponder in the future.

Mictronics avatar Sep 10 '24 14:09 Mictronics