by sanhozay » Wed Jun 07, 2017 8:45 am
@jam007: Thanks for that link, very useful.
In addition, I've been reading the Wikipedia pages on transponder modes and also had a look at transponder manuals. I'm coming to the conclusion that the transponder instrument should not transmit its mode over MP, only the squawk code and altitude.
Let's fall back to real life for a moment. A radar station scans the airspace with a rotating beam. From the perspective of an aircraft, this looks like a periodic interrogation of its transponder. Depending on the capability of that transponder (mode) and its configuration (knob-mode), the transponder transmits a response that includes an identifying number (squawk code) and altitude. In addition, Mode-S transponders transmit additional identification information including a 24-bit serial number. The radar station combines what is a very simple response (ident + altitude) with the radar echo to display the position, ident and altitude of an aircraft on a radar screen.
In Flightgear, we don't have an independent radar simulation. We do it using multiplayer packets, which include lots of information that is not transmitted by a real transponder. The primary purpose of multiplayer is to render a third-party model in the simulator, so it includes all sorts of stuff like landing lights, gear position, etc.
For an ATC client, it has access to much more information than radar provides. If it wants to create a pure radar simulation, it should really just be looking at these items:
latitude/longitude (the radar echo)
ident (transponder squawk code)
altitude (transponder altitude)
I don't see that transponder mode should be transmitted over MP and I don't see that an aircraft needs to do anything with the mode other than set it to a fixed mode (usually S) that indicates its capability. The transponder instrument transmits ident and altitude based on the position of knob mode.
The bottom line is that I think the transponder instrument is doing a reasonable simulation. It doesn't deal with the mode S serial numbers and I'd question whether it should be transmitting ident in SBY mode but my feeling now is that it's working as it should. An ATC client has no business knowing the position of the transponder knob (knob-mode) or the capability (mode) of the transponder. The only information it should get from a transponder is the ident and altitude, which I think it does.
EDIT: I haven't tested whether ATC clients see ident and altitude correctly based on the (fixed) setting of mode and the cockpit setting of knob-mode. I am assuming that works.