Issue Reading TACAN Parameters via Sim Connect

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
KartavyaGupta
Posts: 3
Joined: Wed Apr 24, 2019 4:23 am

Issue Reading TACAN Parameters via Sim Connect

Post by KartavyaGupta »

Hi,

I am trying to read TACAN details via Simconnect on my C# code in addition to some more parameters. TACAN Details starting from TACAN ACTIVE CHANNEL to TACAN DMESPEED in the list. The problem I am facing is With the P3D built in F22 Tuned in to TACAN at OETF; I can see the Radial and DME on the Panel but the data on sim connect is completely different.

Is there any known issue or something that would be making simconnect data received to be wrong.
Mike Schroeter
Lockheed Martin
Posts: 341
Joined: Thu Jan 12, 2012 7:05 pm

Re: Issue Reading TACAN Parameters via Sim Connect

Post by Mike Schroeter »

True TACAN functionality was new to Prepar3D in v3. Prior to that aircraft would tend to use co-located VOR/TACAN to create the perception of using TACAN. The properties you are querying are set up specifically for actual TACANs. Try the VOR simulation variables instead.

At this time we do not yet have any TACAN facility data included in default Preapar3D. The SDK does allow for custom navaids, including TACAN stations.

Hope this helps,
Mike
KartavyaGupta
Posts: 3
Joined: Wed Apr 24, 2019 4:23 am

Re: Issue Reading TACAN Parameters via Sim Connect

Post by KartavyaGupta »

Hi Mike,

Thanks for the response.

So I added the following to the scenery file "NVX07030.BGL" Compiled it and placed it back and restarted P3D v4. Placed my Aircraft on a runway at OETF and tried reading the simconnect parameter and still didnt get the value desired.

Did i miss anything?

I have shared my Sim connect definitions if you think that might be a reason.

Tacan Addition in XML and Compiled via BglComp in SDK v4.5
<Tacan
lat="21.486472338438"
lon="40.5472500622272"
alt="1463.04M"
range="360"
magvar="-3"
region="OE"
ident="TIF"
channel="74X"
dmeOnly="FALSE"
name="A Taif">
</Tacan>

Simconnect Definitions in the Code

simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN IDENT", null, SIMCONNECT_DATATYPE.STRING256, 0.0f, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN ACTIVE CHANNEL:1", "Number", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN STANDBY CHANNEL:1", "Number", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN XY BAND:1", "Enum", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN RADIAL:1", "degrees", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN SIGNAL:1", "Number", SIMCONNECT_DATATYPE.INT32, 0, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN AVAILABLE:1", "Bool", SIMCONNECT_DATATYPE.FLOAT32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN HAS NAV:1", "Bool", SIMCONNECT_DATATYPE.FLOAT32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN MAGVAR:1", "Degrees", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
simconnect.AddToDataDefinition(DEFINITIONS.Struct_tacan, "TACAN DME:1", "feet", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
Mike Schroeter
Lockheed Martin
Posts: 341
Joined: Thu Jan 12, 2012 7:05 pm

Re: Issue Reading TACAN Parameters via Sim Connect

Post by Mike Schroeter »

Can you confirm 1) Is the functionality actually there, or is the problem just with the SimConnect... in other words can you configure a basic radio without your SC code? 2) Can you confirm your SimConnect code works as expected with conventional VORs?

Mike
KartavyaGupta
Posts: 3
Joined: Wed Apr 24, 2019 4:23 am

Re: Issue Reading TACAN Parameters via Sim Connect

Post by KartavyaGupta »

Hi,

1) i tried receiving the data for VOR at the same location and i was able to configure the same.
2) The Sim-connect interface worked for conventional VOR.

Is there a non Simconnect way that i can use for read TACAN information?

Yes the primary issue is reading the right data via Simconnect.
Mike Schroeter
Lockheed Martin
Posts: 341
Joined: Thu Jan 12, 2012 7:05 pm

Re: Issue Reading TACAN Parameters via Sim Connect

Post by Mike Schroeter »

I noticed that you've specified a range of "360" on your Tacan. The default units is meters, so that could be a source of your issue. You probably want "360N" for nautical miles. The default if not specified at all is about 195nm.

Mike
Post Reply