Board index FlightGear Support Tools FGCom

FGCom properties / API?  Topic is solved

FGCom is a realtime voice communication system specially designed for FlightGear.

FGCom properties / API?

Postby benih » Wed Nov 08, 2017 10:02 pm

Hello,
i want to integrate FGCom with the airplanes com[0]/com[1] devices.
Is this possible? (ie: make FGCom silent when volume is turned to 0 and also select/unselect Mic source?)
User avatar
benih
 
Posts: 1679
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: FGCom properties / API?

Postby benih » Wed May 27, 2020 9:24 am

I again digged into this but was not able to find a description of the properties below /sim/fgcom.
This surely is documented somewhere, isn't it?

The source is here (i think): https://sourceforge.net/p/flightgear/fl ... /fgcom.cxx
and from that i guess the device* nodes are just hardware stuff and not belonging to the internal model.

Then there is sim/multiplay/comm-transmit-frequency-hz[/code] and [code]sim/multiplay/comm-transmit-power-norm.
I guess that those are "read only" from an client-API perspective, the are adjusted internally from the c-code.

But the actual frequency seems to be fetched from /instrumentation/comm channel (channel probably means the selected radio instance, so comm, comm1, commN...
Volume ("volume" node) and frequency ("selected-mhz" node) are fetched from the selected node then, it seems.

Maybe the actual radio is selected by changing _selected_comm_node (node "/controls/radios/comm-radio-selected")?

Conclusion (guessed):
  • Probably selected radio can be switched by just switching "/controls/radios/comm-radio-selected". The number there sets the "channel" and refers to the instance of "/instrumentation/comm<channel>" where it starts at "1" and maps to a comm-instance minus one (channel=1 -> .../comm0; channel=2 -> ../comm1; etc)
  • Radio failure may be simulated by just switching "/controls/radios/comm-radio-selected" to zero (which means "disconnect").
  • Monitoring several radios for FGCom chatter is currently not possible. Only one radio can be active at a time for transmit/receive, and it's always linked together (not possible to send on com1 and receive on com2)
User avatar
benih
 
Posts: 1679
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: FGCom properties / API?  

Postby benih » Mon Jun 01, 2020 11:12 pm

I got it working in the c182s :)

Github commit wrote:commit 0cd66c0b85a4b693ab6c04922e1f2cf34228fb75 (HEAD -> issue324_FGCom-GMAPanel)
Author: hbeni <beni@hallinger.org>
Date: Tue Jun 2 00:02:54 2020 +0200

GMA-340 / FGCOM integration
- corrected the implementation of commit d2c1b4ea9b, that one was not eintirely correct. Current implementation is much cleaner.
- GMA 340 / FGCom Integration can now be turned on in the c182s aircraft menu. Default is off (fgcom standard behaviour).
- When integration is disabled, just the LEDs blink for the radio used from FGCom, when transmitting.
- When integration is enabled, the current MIC radio is switched with the audio panel button "COM+MIC".
Then pressing space and shift-space is the same, it will transmit on the selected radio.
When the selected radio is dead, transmission will not occur.
When the GMA Panel dies, the hardwired COM1 failsafe will activate automatically.
This all was tested using 2020.2.0 / Revision: e76787fa62 using two PCs and two fgcom standalone instances for monitoring the frequencies PHNL TWR+UNICOM.


The trick was to use the `/instrumentation/comm[0]/ptt` etc nodes to trigger that manually. And to overwrite the default space-key assignment in the aircraft.
User avatar
benih
 
Posts: 1679
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit


Return to FGCom

Who is online

Users browsing this forum: No registered users and 1 guest