- Thread starter SCPD
- Start date

- Status
- Not open for further replies.

0. translation: if the IF isn't centered around the desired frequency - you'll need to translate by multiplying by a quadrature sine wave.

1. decimation: if the IF sample rate is well above normal audio sample rates (above 96 khz), you'll need to re-sample the data at a lower rate. This will also lower CPU cost for subsequent stages.

2. Low pass filter both I and Q channels - around 6 to 7 khz wide.

3. FM demodulate - you can use the arc-tangent function for this. Now you have discriminator audio.

4. Low pass filter - the P25 standard recommends a cut-off at 2880 hertz.

5. symbol recovery - convert a 1/4800th segment of audio samples to a symbol value where each symbol is two bits. Your code needs to recognize the boundary where one symbol ends and then next begins.

6. frame synchronization - as these symbols fly past, you must locate the frame synchronization pattern. The pattern is 24 symbols long.

7. Accumulate symbols. Know that every 36th symbol is a status symbol. These are stripped out when assembling TSBKs.

8. NID - the next 32 symbols carry the NID which is a 12 bit NAC, 4 bit DUID and 48 bits of error correction. Skip the 12th symbol - which is a status symbol (see 7 above).

9. Use the correction bits to get a reliable NAC and DUID. The TIA docs explain how to compose the NID bits given a DUID and NAC. You want the reverse.

10. When the DUID equals 12 or 7, you have one or more TSBKs following.

11. Accumulate symbols. These are interleaved "constellation" symbols.

12. De-interleave: the TIA docs explain the interleave schedule for transmit. You want the reverse.

13. The TIA docs explain how to map trellis symbols to constellation symbols for transmit. Again, you want the reverse.

14. Apply half-rate trellis correction to the trellis symbols. For every four bits in, you get two bits out.

15: TSBKs! To validate each TSBK, apply the CCITT CRC-16 to the first 10 bytes. The result should match the last two bytes.

When in doubt, consult the TIA docs.

- Status
- Not open for further replies.