I realise there are a few detectors around. Ah well, I put my own on Starmade too. It's not too difficult to understand how this one works, if you are in logic. I guess that you need two of them, on a X-as and Y-as for a better scan.
After detection and the situation is safe again, the scanner...