Trying to use FLARM vars from html/js

Hi I can’t find any example of usage of the FLARM simvars among the Asobo planes, and am trying to get something working.

My systems.cfg has

[RADIOS]
Audio.1 = 1
Com.1 = 1, 1
Nav.1 = 1, 1, 1
Adf.1 = 0
Transponder.1 = 1
Marker.1 = 0
CollisionAvoidance = 1, 1 ; //DEBUG!! check TCAS 1st entry
Flarm = 2000;

but in the Coherent GT Debugger I’m getting:
image

I.e. the FLARM AVAILABLE seems ok but I can’t work out how to get any sensible values out of the FLARM THREAT vars.

Have I missed something obvious? Any clues appreciated.

Is it possible to read the simvar “struct” FLARM THREAT DATA into Javascript? If so is there any example?

thanks,
B21

Hello @B21

You can find an example of it in AS8030.js used by the LS8.
Check the FLARMTrafficInstrument class that uses the GET_FLARM_PLANES coherent call from map listener to get flarm data .

As for the simvars, there is a bug that prevents them from being readable.
I have logged a bug for this.

Regards,
Sylvain

Thanks Sylvain, once again saved me much time experimenting. I should be able to decode the AS8030.js FLARM access.

Regards,
B21

1 Like