Starting with X-Plane 12.4.1, both AI traffic and plugin-injected traffic can generate TCAS traffic advisories and resolution advisories. This works through the API introduced in X-Plane 11.50, the same that is also responsible for creating wake turbulence. If you haven’t already done so, read about the TCAS API on how to tell X-Plane the state of your traffic targets, and how to generate wake turbulence.
For traffic and online flying plugins
Plugins injecting traffic into X-Plane, whether from real world sources such as ADS-B Exchange, or for collaborative online flying on a network, should be using the TCAS API since X-Plane 11.50. In order to work with TCAS in a user-aircraft, two datarefs are vitally important:
sim/cockpit2/tcas/targets/modeS_id[]each traffic target needs a unique 24bit number as an identifier. In real life, every aircraft with a mode-S transponder has a unique 24bit hexcode that is stored in the transponder of the aircraft. Note that this is distinct from the octal transponder or squawk code. There can be multiple aircraft on the same squawk (1200for VFR operations, for example) but the hexcode must be unique.sim/cockpit2/tcas/targets/ssr_mode[]an airborne target must be squawking at least mode Charlie (also known as squawk alt). Dataref values3(mode C),5(GND),6(TA only) and7(TA/RA) allow the target to participate in threat detection and advisory. If a target’s transponder is off, or not squawking altitude, the altitude of the aircraft is unknown to the TCAS of the user aircraft and it thus won’t participate in threat detection and resolution.
X-Plane by default treats injected traffic as squawking mode C, unless the plugin updates the dataref index with a different value for a specific target. Simply speaking: If you see your traffic on the scope of a default X-Plane aircraft displayed with (relative) altitude, your traffic is participating.
Since X-Plane 8, the sim has always run a rudimentary proximity check for nearby aircraft and issued a traffic advisory using the sound file alert/tcas.wav and the dataref sim/cockpit2/tcas/indicators/tcas_alert. This simplified functionality is retained for aircraft that have the “TCAS equipped” option checked in Plane Maker under “Special Equipment”.
Starting with X-Plane 12.4.1, under “Special Equipment” the TCAS equipment now offers three options:
- None – this corresponds to the box left un-checked in earlier versions. The
alert/tcas.wavis not played and the datarefsim/cockpit2/tcas/indicators/tcas_alertis not updated - TA – this corresponds to the box being checked in earlier versions.
sim/cockpit2/tcas/indicators/tcas_alertis updated andalert/tcas.wavis played as traffic advisory according to a simplified logic - TCAS II – this setting is new and equips the aircraft with a TCAS II v7.1 logic to generate traffic advisories and resolution advisories, using barometric altitude. This enables all datarefs and changes below
sim/cockpit2/radios/actuators/transponder_mode is an old dataref – the enumeration values 6 (TA only) and 7 (TA/RA) are now taken into account whether the system should generate resolution advisories. Setting the dataref to 4 (Test) initiates a 12 second test sequence that will display synthetic targets in the slots 1-4 and conclude with message dataref indicating to play either “TCAS test pass” or “TCAS test fail” according to the failure sim/operation/failures/rel_xpndr
The new dataref sim/cockpit2/radios/actuators/tcas_sys_select allows you to select the pilot (0) or copilot (1) pitot/static system as a source for the pressure altitude
The new dataref sim/cockpit2/radios/actuators/tcas_filter selects the filter:
Note that this filter influences the traffic symbols shown on default instruments such as cockpit\EFIS\EFIS maps\map_s_HM or the G1000 or Primus MFD screens. If you are drawing your own navdisplay, it is up to you to take this dataref into account when displaying traffic symbols
0– Normal / All1– Threats only2– Above (-2700+9900)3– Below (-9900+2700)4– Unrestricted
The dataref sim/cockpit2/tcas/indicators/tcas_sensitivity is mostly informational – it shows the sensitivity level the TCAS logic is currently using to determine threat assignment. The dataref cannot be written directly but rather responds to the selected mode (via sim/cockpit2/radios/actuators/transponder_mode) and the user aircrafts altitude.
The dataref sim/cockpit2/tcas/indicators/tcas_message is the most important one for aircraft designers – It indicates which aural message should be played. This is what must be used in FMOD to generate a realistic callout at the right time:
0– Silence1– Climb, Climb2– Climb, Crossing, Climb3– Climb, Increase Climb4– Climb, Climb Now5– Clear of Conflict6– Descend, Descend7– Descend, Crossing, Descend8– Descend, Increase Descend9– Descend, Descend Now10– Monitor Vertical Speed11– Maintain Vertical Speed, Maintain12– Maintain Vertical Speed, Crossing, Maintain13– Level Off, Level Off14– Traffic, Traffic15– TCAS Test Pass16– TCAS Test Fail
The dataref sim/cockpit2/tcas/indicators/tcas_active_advisory is informational and indicates 1 when a traffic advisory is currently active, and 2 when a resolution advisory is currently active. This can be used for example to alert the pilot to incompatible display range settings.
The dataref array sim/cockpit2/tcas/indicators/tcas_vs_bands[6] indicates the lower red, green and upper red bands to be displayed on the vertical speed indicator in feet per minute. Each band has a lower and upper limit, where the limit of a red band might be the maximum or minimum 32bit floating point number (+/-3.40282e+38) to indicate the band should extend to the lower or upper limit of the vertical speed indicator. If both upper and lower limit of a band are equal, this indicates the band should not be displayed (vertical speed remains black). Note that both red bands are seldom indicated together, the green band is most often indicated with only the lower or only the upper red band. This must be used to animate the vertical speed indicator and sometimes also pitch cues on the PFD.
Finally, if you are making your own navigation display, the dataref array sim/cockpit2/tcas/targets/threat[64] indicates for each traffic target which threat level the TCAS logic has assigned to it:
-1– unassigned / not tracked0– Other1– Proximity2– Traffic Advisory3– Resolution Advisory (Preventive)4– Resolution Advisory (Corrective)
This allows you to display the correct symbol (open diamond, filled diamond, yellow circle or red square) to each target. Use this in combination with sim/cockpit2/radios/actuators/tcas_filter to determine whether a target should be drawn at all (such as when the “threat only” filter has been selected).
G1000 aircraft
Changing the equipment in Plane Maker automatically changes the PFD softkeys of a G1000 in X-Plane. The XPDR softkey is replaced with the TCAS/TFC softkey allowing the user to select TCAS modes, test and filters. It is up to the aircraft author to add appropriate FMOD sounds obeying the sim/cockpit2/tcas/indicators/tcas_message dataref.