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:
I've got the following:
Binary: 01011101010000000110111111011011000011010110001011011101 Integer Words:  => 93  => 64  => 111  => 219  => 13  => 98  => 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 (184.108.40.206.2.1.3) and the last four bits are a replica of the interrogator code (IC) field (220.127.116.11.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 | $this->_int | $this->_int;
where | in PHP is the OR operator. Is this my mistake ?