I needed to find out how the engine reads tdf files so I could make a reader for the sensor struct and class which i made. I did not find the reader in the C++ code so I was a little lost. But I found it thanks for the help.
That... erm... it's a collection of Unit utility functions. You need to read radarHandler.cpp, IIRC. The "spotting" Unit ID would be the one performing the current set of passes, see main loop.
Units don't trigger a Radar check per frame; a radar map is maintained per side. Unit IDs are only available, in terms of Radar, when they're created or moved. If you need to catch UnitIDs, so that you have "spotter" and "spottee"... you will need to write a new system. Spring assumes that we have exactly one type of Radar.