• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FGCom-mumble radio sim via SimConnect (solved)

Messages
7
Country
germany
Hello everybody,

before asking my question, please let me introduce my topic a little.


The upcoming release of the mumble 1.4.0 VOIP software will (most probably) include a new plugin-framework.

I developed such a plugin featuring simulation of radio comms. In essence it allows everyone to stay in the same mumble channel and get separatet locally and by frequency (simulation of a continuous radiowave spectrum). Signal degadation is simulated too, so there is static on the signal, eventually fading into white noise and getting cut off from the suqelch.
The project is hosted at https://github.com/hbeni/fgcom-mumble.

Recently, i wanted to add SimConnect support, so it's usable by not only FlightGear (and ATC-tools) but also mainly MSFS2020.
FGCom-mumble has a java RadioGUI that can hook into the mumble plugin to provide location and radio information; and the RadioGUI can also act as a bridge between the plugin and SimConnect.
The code in question is here: https://github.com/hbeni/fgcom-mumb...java/hbeni/fgcom_mumble/SimConnectBridge.java

A built of the RadioGUI is enough to test this: https://github.com/hbeni/fgcom-mumb...radioGUI-0.10.0-jar-with-dependencies.jar.zip
Just run the Jar, go to the Options and set up the SimConnect parameters, then hit the Simconnect option from the Main menu bar.
It should activate the bridge, connect to the SimConnect port and mirror the read data in the radios and location information.
You can disregard the "connect" button in the lower left, as that is used to connect the RadioGUI to the mumble plugin (but as said, that's not necceesary to test this).


Ok, here is the question:
:whiteflag The problem i currently face is that it can not connect - and i neither know why or am able to test it (no MSFS2020 here, just got a test report from someone else).
❓I hope that maybe some java literate SimConnect here can help me get this started...
 
Last edited:
Messages
1
Country
unitedstates
Hi...I as of late reworked the radio model to be object oriented, so now we can trade/add models without any problem. I accepted the open door and added an extremely essential HF and UHF reproduction notwithstanding the just ported VHF model. So now we would now be able to tune HF frequencies and prattle into the great beyond.

pcb assembly quote
 
Last edited:
Messages
7
Country
germany
Hello - sure you picked the right thread?
FGCom-mumble has HF and UHF (and an object oriented radio model too) since Release 0.4.0 from August 2020, and I'm pretty sure i did that myself.
And how does your answer relate to my SimConnect compatibility question?
 
Messages
7
Country
germany
OK, i got an update.
With alternate code i can now connect and read data successfully.

However i still have a little problem:
  • Frequency is updated on change, but either I interpret the data incorrectly or simconnect gets garbage:
    • tuning 124.85 yields "9349.0"
    • tuning 128.50 yields "10320.0"
  • com1_ptt is always "1"
  • com2_ptt is always "0"
  • com1_state is always "0"
  • com2_state is always "0"

This is my data definiton:
Java:
// Set up the data definition, but do not yet do anything with it
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "ATC ID", null,
                        SimConnectDataType.STRING256);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "Plane Latitude",
                        "degrees", SimConnectDataType.FLOAT64);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "Plane Longitude",
                        "degrees", SimConnectDataType.FLOAT64);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "Plane ALT ABOVE GROUND",
                        "feet", SimConnectDataType.FLOAT64);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM ACTIVE FREQUENCY:1",
                        "Frequency BCD16", SimConnectDataType.FLOAT64);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM ACTIVE FREQUENCY:2",
                        "Frequency BCD16", SimConnectDataType.FLOAT64);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM TRANSMIT:1",
                        "Bool", SimConnectDataType.INT32);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM TRANSMIT:2",
                        "Bool", SimConnectDataType.INT32);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM STATUS:1",
                        "Enum", SimConnectDataType.INT32);
        sc.addToDataDefinition(DATA_DEFINE_ID.DEFINITION_1, "COM STATUS:2",
                        "Enum", SimConnectDataType.INT32);

And this is how i process it:
Java:
String callsign   = e.getDataString256();
            double lat        = e.getDataFloat64();
            double lon        = e.getDataFloat64();
            double alt        = e.getDataFloat64();
            double com1_frq   = e.getDataFloat64();
            double com2_frq   = e.getDataFloat64();
            int    com1_ptt   = e.getDataInt32();
            int    com2_ptt   = e.getDataInt32();
            int    com1_state = e.getDataInt32();
            int    com2_state = e.getDataInt32();


Edit: i learned from https://www.fsdeveloper.com/forum/threads/simconnect-bcd16-and-bco16.449792/
that the frequencies are integer values. Those need to be converted to Hexadecimal and prefixed with a "1", so:
int(9349) = hex(2485) => prefixed(12485) => decimal added is final result: 124.85

This leaves me to the PTT and state issue :)
 
Last edited:
Messages
7
Country
germany
Just a heads back, as FGCom-mumble 0.14.1 was released today.
The https://github.com/hbeni/fgcom-mumble release should have a fully functional SimConnect bridge now, and you can use mumbles PTT-Button to send transmissions on COM1.
So this should in practice be 100% compatible to the common SimConnect supported sims like MSFS2020 or FSX
 
Last edited:
Messages
7
Country
germany
Now that Mumble 1.4 finally hit the light, FGCom-Mumble also did it's 1.0.0 release:

Have fun!
 
Top