JS_NPCPlane Parameter Name always empty [MSFS2020/2024]

Version: 1.38.2.0

Frequency: Consistently

Severity: Blocker

Context: Building ATSAW System for Airbus requires multiple data like Speed, Aircraft Type and Callsign. Fetching (AI / Multiplayer) Traffic through GET_AIR_TRAFFIC to obtain the callsign of the Airtraffic don’t have the Name Parameter filled (always empty).

Bug description:
Name Parameter of JS_NPCPlane is always empty. The SimConnect SDK deliver the correct callsign.

Additionally it would be nice to also Obtain the Speed and Aircraft Type through JS_NPCPlane.

Repro steps:

Coherent.call("GET_AIR_TRAFFIC").then((result) => {
  console.log("TRAFFIC: " + result.length , result);
});

Attachments:

Private attachments: Send a PM to @PrivateContent with the link to this topic and the link to download your content

3 Likes

We have implemented a fully spec compliant TCAS II for all of our airplanes using just this call. You can sample the position of each aircraft once per second or half second and then use vector math to determine speed and direction.

The implementation is available in the MSFS Framework here: msfs-avionics-mirror/src/sdk/traffic/TCAS.ts at main · microsoft/msfs-avionics-mirror · GitHub

As for the name field, that’s probably something that needs investigation. It may not always be available at that call site.

-Matt

1 Like