Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIS payload 168 bit or 256 bit - NRZI string #8

Open
Mas313 opened this issue May 28, 2024 · 4 comments
Open

AIS payload 168 bit or 256 bit - NRZI string #8

Mas313 opened this issue May 28, 2024 · 4 comments

Comments

@Mas313
Copy link

Mas313 commented May 28, 2024

Hi,
The Variable ID sentence in the grc file holds 168 bit payload but AIS specifications says it to be 256 bits.
My Questions for better understanding are following, might be everything is already there but i am not getting it.

  1. Does 168 bits contains encoded payload only or AVDM also encoded in these bits? if not then where AVDM is encoded?
  2. Where is the NRZI generator? since GMSK modulator for AIS requires bipolar (-1 , 1) NRZI values ?

Thanks

@Mictronics
Copy link
Owner

The entire frame, or TDMA slot, is 256 bit long, including preamble, crc, bit stuffing etc. Payload is 168 bit an holds all the AVDM data. NRZI encoder is in bitstring_to_frame_impl.cc, function void bitstring_to_frame_impl::nrz_to_nrzi(char *data, int length).

@Mas313
Copy link
Author

Mas313 commented Jun 1, 2024

Thanks for the reply. I have observed that nrz_to_nrzi() function generates NRZI but not bipolar 1s and -1s its like 0s and 1s. Does't GMSK Mod needs 1 & -1 bits for GMSK waveform shaping to limit its bandwidth.
Thanks

@Mictronics
Copy link
Owner

The GNURadio GMSK modulator expects packed unsigned bytes in (0, 1). Vector modulator expects unpacked signed bytes in (-1, 1).
Packing for GMSK is done in void bitstring_to_frame_impl::byte_packing(char *input_frame, unsigned char *out_byte, unsigned int len).

@Mas313
Copy link
Author

Mas313 commented Jun 2, 2024

Thanks for the reply.
I have genrated nrzi data file as per your procedure/code and used gnuradio with plutosdr for gmsk generation 'GMSK Mod' block with file source connected. The result is not correct, might be i have done something wrong, the generated signal occupy more than 1 Mhz of bandwidth(used sdrsharp), For AIS bandwidthis to be within AIS limits within 15-25Khz for GMSK. Have you observed any such behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants