How to extract the interrogator ID from a DF11 message?
Your calculation of $this-&gt;_pi just ORs the three parity bytes together, 
which certainly doesn't make any sense.  I'm not sure what you hope to get out of that. Even XORing them together wouldn't seem to serve any purpose.



Addressing and checksumming in the Mode S protocol work in a funky way, in order to save bits. The last 3 bytes of a message are constructed as a CRC checksum (which Annex 10 calls "parity") of the first 4/11 bytes, XORed with an address for the "conversation" the message is part of. When you receive a message you're supposed to calculate the raw CRC on your own and then XOR it out of the bytes. What is left is the address, and by comparing it to addresses you're interested in you can see if the message was for you, or alternatively either garbled or for someone else.

In the basic Mode S interrogation protocol, this "address" is just the airframe address, and the checksum-xor-address field is named AP.  For uplink messages, transponders know what their own address are, of course -- and for downlink, radars know which addresses they have interrogated recently.

In a few other cases, the "address" is the "interrogator identifier", and the checksum-xor-address field is named PI.

For DF11, the transponder knows which II to put into its replies because it gets them out of the all-call message, and the radar knows which II corresponds to its own all-calls, so it can recognize those responses.

Finally, in squitter where the transponder sends a downlink message without being prompted by an uplink message, it sets the "address" to 0.



If you have been decoding ADS-B broadcasts, you're listening for squitter -- so you can identify them as the ones where the CRC you compute equals the PI field in the message (because XORing 0 into the CRC doesn't change it). Everything with a different address will look like checksum failures to your code.

Since the DF11 message you're showing does match the cheksum, it must be DF11 squitter. There are plenty of those to hear; TCAS depends on everyone sending them continually.

In order to find DF11 messages with a nonzero interrogator identifier you should look for messages where the last three bytes after you've XORed out the CRC do begin with 17 zeros but then have at least some of the remaining 7 bits nonzero.