MATLAB AIS Example Decoder Function Error

9 vues (au cours des 30 derniers jours)
Hamza
Hamza le 12 Juin 2025
Réponse apportée : Shlok le 16 Juil 2025
In MATLAB AIS Example " Ship Tracking Using AIS Signals " , the decoding part which is coded in helperAISRxPhyBitParser function, the Message ID is decoded as (% Decode message type msgID = bit2int(payloadBits(3:8),6,false);), However as per ITU Rec 1371-5 standard , the message ID bits are from 1 to 6 but the function decode bits from 3 to 8. This difference is unclear, can anyone help me out with understanding this?

Réponses (1)

Shlok
Shlok le 16 Juil 2025
Hi Hamza,
From what I understand, the ITU-R M.1371-5 specification (as described in Section 5.1 of this document) defines the Message ID as occupying bits 1-6 of the AIS message, immediately followed by the Repeat Indicator in bits 7-8.
In the MATLAB AIS example, the bitstream is first processed by removing the 8-bit start flag. The resulting "payloadBits" then begins at position 1. Based on the indexing used in the code, my understanding is that the first two bits represent the Repeat Indicator and are intentionally skipped during decoding. As a result, bits 3 to 8 in "payloadBits" are used to extract the Message ID, which would align with the standard’s bit positions 1-6.

Catégories

En savoir plus sur Error Detection and Correction dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by