Closed hbeni closed 3 years ago
FS2020 uses simconnect, though it is not completely implemented yet. But I think it is complete enough for this purpose.
OK, then what i found out is, that probably someone needs to make a small bridge application that uses SimConnect to read out the needed values and converts it to FGCom-mumble UDP protocol messages.
That should be simple, yet i lack the development and testing platform for that, so someone else has to step in here unfortunately....
There is a java library for simconnect: https://github.com/mharj/jsimconnect
@mharj: you don't happen to have code already to continuously read out the following properties via Simconnect, do you?
Maybe you have time to code up a starting point for me, that i can integrate into my project? (I unfortunately can't make sense of the simconnect stuff, nor can I test it, so I'm unable to succeed on this on my own...)
I made a new experimental branch. No idea if it works, tough: simConnectSupport
For testing: FGCom-mumble-radioGUI-0.9.0-jar-with-dependencies.jar.zip
@hbeni I don't have any examples atm for those (but I remember that position was relatively easy to read). Code itself is just original copy from lc0277 site with permission, so it's easier to work/clone in github.
@mharj Thanks Marko, for the response! I coded up some test code yesterday. I am very unsure if i did it right, but at least it's a start to test. The interesting bits are in the class SimConnectBridge.
Do you have MSFS2020 and want to give it a shot? (just run the jar, open the RadioGUI menu option, slave it to SimConnect and see if the values are synced with MSFS?)
And it might very well be, that i need to read in a loop - is this correct?
I think this might be just a one-shot read attempt? https://github.com/hbeni/fgcom-mumble/blob/423bdc9f487e6f53c8a8e699b46f03a9ca9ae162/client/radioGUI/src/main/java/hbeni/fgcom_mumble/SimConnectBridge.java#L104-L112
Added a new test: FGCom-mumble-radioGUI-0.9.0-jar-with-dependencies.jar.zip It requests data in a 100ms loop now (i hope)
Added a new test: FGCom-mumble-radioGUI-0.10.0-jar-with-dependencies.jar.zip It adds Config options to define the SimConnect connection parameters
When the new SDK is released, we could (easily?) add support for MSFS 2020. What is needed is just an interface that takes the simulators plane position and radio configuration and generate UDP packets to the mumble plugin (as per specification).
A quick google said, that maybe msfs2020 is compatible to SimConnect.
That said, it's still open if this compatibility could be reached by this project here, or if it better would be a separate project by its own. I do not own MSFS2020 so probably will never be able to implement this (Help wanted!)
Useful ressources:
ATC ID
PLANE LATITUDE
PLANE LONGITUDE
PLANE ALT ABOVE GROUND
COM ACTIVE FREQUENCY:1
/COM ACTIVE FREQUENCY:2
COM TRANSMIT:1
/COM TRANSMIT:2
COM STATUS:1
/COM STATUS:2
0
toCOM_PWR=1
and everything else toCOM_PWR=0
and leave the serviceable etc at default, which should handle all cases "powered/failed/not-present")