I've written a class which decodes raw Mode S messages. Whilst browsing the ICAO specs the other day I noticed that the Interrogator ID is sent back in the DF11 message.
I thought that it would be a fun exercise to determine where in my coverage area interrogations from particular radar installations can be seen.
But I'm having a really hard time figuring out how to extract the interrogator ID.
For this DF11 message:
5D406FDB0D62DD
I've got the following:
Binary: 01011101010000000110111111011011000011010110001011011101
Integer Words:
[0] => 93
[1] => 64
[2] => 111
[3] => 219
[4] => 13
[5] => 98
[6] => 221
CA: 5
AA: 4222939
Address: 406FDB
Parity: 255
Residual: 0
As the Residual value is 0 I know that this is a valid DF11 message and the address checks out as well.
From the ICAO spec:
"The code used in downlink PI field generation shall be formed by a sequence of 24 bits (a1, a2,..., a24), where the first 17 bits are ZEROs, the next three bits are a replica of the code label (CL) field (3.1.2.5.2.1.3) and the last four bits are a replica of the interrogator code (IC) field (3.1.2.5.2.1.2)."
In that case I would expect the end of the last three integer words (4,5 and 6) to be mostly 0's but they aren't.
I've gone through the documentation numerous times but just can't see how to get the II and SL codes out of Parity value ?
I'm calculating the Parity value by doing the following:
$this->_pi = $this->_int[4] | $this->_int[5] | $this->_int[6];
where | in PHP is the OR operator. Is this my mistake ?