CCSDS - ASM DETECTION
Data delivered from the viterbi decoder process is now available as an un-encoded bitstream. The only remaining
uncertainties are whether or not the data is inverted as a result of any remaining QPSK phase ambiguity and
where are the byte boundaries of the LRPT data. The basic format of a LRPT 'line' at this layer is a run of 8192
bits that take on the form of a 32 bit preamble, followed by 1020 8-bit bytes. The 32 bit preamble is known as
the ASM, or Attached Sync Marker. The purpose of this fixed bit pattern is to allow the receive processing
system to find the byte boundary of the payload data. The fixed pattern is scanned for and when found, the next
8160 bits immediately after the last bit of ASM are assembled into bytes. Since the ASM is a fixed pattern, the
'bit-flipped' version can also be scanned for and used to determine whether the entire bit stream needs to be
inverted to remove the last of the demodulator phase uncertainty.
The ASM fixed pattern is (in byte format) 1A CF FC 1D hex. In binary it looks like
00011010110011111111110000011101
This pattern can be searched for using a number of different methods. One of the simpler methods is to arbitarily
'byte up' the whole bitstream and just check the resultant byte stream for one of the 16 possible 3-byte patterns
formed from the various alignment options caused by a bit shift error or bit inversion.
| ASM bit pattern | Left shift | Data inversion |
| 1A CF FC 1D | None | No |
| 35 9F F8 3x | 1 bit | No |
| 6B 3F F0 7x | 2 bits | No |
| D6 7F E0 Ex | 3 bits | No |
| AC FF C1 Dx | 4 bits | No |
| 59 FF 83 xx | 5 bits | No |
| B3 FF 07 xx | 6 bits | No |
| 67 FE 0E xx | 7 bits | No |
| E5 30 03 E2 | None | Yes |
| CA 60 07 Cx | 1 bit | Yes |
| 94 C0 0F 8x | 2 bits | Yes |
| 29 80 1F 1x | 3 bits | Yes |
| 53 00 3E 2x | 4 bits | Yes |
| A6 00 7C xx | 5 bits | Yes |
| 4C 00 F8 xx | 6 bits | Yes |
| 98 01 01 xx | 7 bits | Yes |
The table above shows these 16 possible combinations of bit shift and inversion. I just loop through the data
a byte at a time looking for those first 3 bytes. When found, I note the bit shift and invert state from a pre-
prepared table and apply these corrections for the whole 1024 bytes. (Take care at either end to keep any
leftover bits for the next line etc). While the ASM pattern may seem short and could occur often elsewhere
in the data - it is the 'monostable' effect of not looking for the pattern for 1020 bytes after finding the first
occurance that quickly aligns you up on the correct (true) ASM point.
Once any shift and inversion has been determined the next 1020 bytes are assembled accordingly. This
produces the basic, 1024 byte, CADU structure - 4 byte sync and 1020 information bytes, as shown below.
The next step is to remove the Pseudo-Noise scrambling on the data field.
BACK