plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

tracernz avatar image
tracernz asked tracernz edited

WASM Facility Subscription Does Not Return Region

I have been working a little with the WASM facility API. I would like to subscribe to all of the VHF navaids in the vicinity of the aircraft, and get some detailed information about them. If I subscribe with `SimConnect_SubscribeToFacilities_EX1`, then I would like to request more detailed information with `SimConnect_RequestFacilityData_EX1` (after having previously set up a VOR definition with all of the data I desire). The problem is that the `SIMCONNECT_DATA_FACILITY_VOR` provided in the list from `SimConnect_SubscribeToFacilities_EX1` does not give the region of the navaid, which I then seemingly require for `SimConnect_RequestFacilityData_EX1` . The documentation suggests that if region is left empty all the of the matching facilities will be returned, but in-fact only a subset of the facilities are returned without a region code. The question is how to call RequestFacilityData using the information given by SubscribeToUtilities?

It would be nice if both `SimConnect_SubscribeToFacilities_EX1` and `SimConnect_RequestFacilityData_EX1` would provide the region, and for terminal navaids also the airport ident. Both of those pieces of information are available in the JS facility API.

I also note an issue in the documentation for the VOR type:

1673753690232.png

ILS facilities give type 4, not type 6 as the docs suggest, amongst others. Instead the type seems to match the vorClass type in the JS API (https://github.com/flybywiresim/a32nx/blob/5697964080ec93223b3271ad5ac1ea626959cc49/src/fmgc/src/types/fstypes/FSEnums.ts#L208).

wasm
1673753690232.png (86.5 KiB)
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
Arzop avatar image
Arzop answered tracernz edited

Hi

Can you check in the Icao field, both information should be in there.

This is a char[9] field where:

  • Ident is located from 0 to 5
  • Region is located from 6 to 9


Best Regards

Maxile / Asobo

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

tracernz avatar image tracernz commented ·

Ah, that makes a lot of sense, and yes, it does work for VORs.

For ILS/LOC the region is empty (as in JS API as well... they are attached to an airport instead). I can retrieve the VOR/DME navaids fine now with RequestFacilityData using that region encoded in the Icao, but ILS/LOC with blank region do not work... I get an empty list back. If I hardcode the region in my RequestFacilityData call for those, I do receive them.

Using the region encoded in Icao field of SubscribeToFacilityData result list, ILS (IDN, IMN) returns empty result:
1673942065224.pngIf I hardcode the region in my RequestFacilityData call to NZ the ILS are succesfull:

1673942112497.png

0 Likes 0 ·
1673942065224.png (161.5 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.