Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-07 Thread DrC

On Tue, 2008-10-07 at 04:06 +0200, Csaba Halász wrote:
 * property to select active radio for transmission (maybe be per-radio
 flag?)

The intercom panels on the aircraft I fly have:
An On-Off switch for each receiver (comms and nav - vors, adf, dme .. )
to listen to comms traffic and nav ident signals.   All selected sound
sources are mixed into the headset - but one rarely selects more than
active comms plus one nav ident at a time.
A rotary switch to select Comm1 or Comm2 for the ptt transmit switch.

All this is part of the aircraft intercom panel wiring.   The comms
transmit channel is not selected at either radio.

Hope this helps - if not, disregard.

Chris


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-07 Thread Csaba Halász
On Tue, Oct 7, 2008 at 8:51 PM, DrC [EMAIL PROTECTED] wrote:

 The intercom panels on the aircraft I fly have:

snip

 Hope this helps - if not, disregard.

Thanks a lot for the info!

-- 
Csaba/Jester

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-07 Thread Jon Stockill
DrC wrote:
 On Tue, 2008-10-07 at 04:06 +0200, Csaba Halász wrote:
 * property to select active radio for transmission (maybe be per-radio
 flag?)
 
 The intercom panels on the aircraft I fly have:
 An On-Off switch for each receiver (comms and nav - vors, adf, dme .. )
 to listen to comms traffic and nav ident signals.   All selected sound
 sources are mixed into the headset - but one rarely selects more than
 active comms plus one nav ident at a time.
 A rotary switch to select Comm1 or Comm2 for the ptt transmit switch.
 
 All this is part of the aircraft intercom panel wiring.   The comms
 transmit channel is not selected at either radio.
 
 Hope this helps - if not, disregard.

The KMA26 audio panel in the grob 115 is mostly functional. That has a 
rotary switch which allows you to select the com radio to transmit on, 
including an emergency setting which bypasses the audio panel and 
connects the mic direct to com1, then a number of pushbuttons which 
illuminate to indicate the selected audio sources (the tx radio is auto 
selected, and the other radios can be toggled on/off by pressing the 
button).

If you need more info you can download the manual from the bendix/king 
website.

Jon

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-07 Thread Csaba Halász
On Tue, Oct 7, 2008 at 9:15 PM, Jon Stockill [EMAIL PROTECTED] wrote:

 The KMA26 audio panel in the grob 115 is mostly functional. That has a
 rotary switch which allows you to select the com radio to transmit on,
 including an emergency setting which bypasses the audio panel and
 connects the mic direct to com1, then a number of pushbuttons which
 illuminate to indicate the selected audio sources (the tx radio is auto
 selected, and the other radios can be toggled on/off by pressing the
 button).

We could add a selected property to every radio, that should be
generic across aircrafts to take over the function of
/instrumentation/kma26/com1sel and friends.
We'd also need a replacement for the primary-radio property, I guess
that should simply be /instrumentation/primary-radio.

-- 
Csaba/Jester

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-06 Thread Michael Smith
Is it possible in Flightgear to chat on mutliplayer though frequencies?

Gijs and Natovr found this line in preferences.xml under the mutliplay 
section:  transmission-freq-hz 
type=string11850/transmission-freq-hz
but they changed the line and they still could see others messages. Is 
this suppost to work or is it something there for a futute feature or what?

Michael Smith [EMAIL PROTECTED]


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-06 Thread Csaba Halász
On Mon, Oct 6, 2008 at 5:51 PM, Michael Smith [EMAIL PROTECTED] wrote:
 Is it possible in Flightgear to chat on mutliplayer though frequencies?

 Gijs and Natovr found this line in preferences.xml under the mutliplay
 section:  transmission-freq-hz
 type=string11850/transmission-freq-hz
 but they changed the line and they still could see others messages. Is
 this suppost to work or is it something there for a futute feature or what?

It doesn't check for frequency match AFAICT, but seems to be pretty
easy to add to multiplayer.nas.
Might be advisable to change default comm frequency to some magic
number meaning all frequencies. Not realistic, I know. So maybe
GUARD? And display a simulated ATC warning about that, directing
pilots to switch to a proper frequency.

-- 
Csaba/Jester

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-06 Thread Stuart Buchanan
Csaba/Jester wrote:

 On Mon, Oct 6, 2008 at 5:51 PM, Michael Smith wrote:
  Is it possible in Flightgear to chat on mutliplayer though frequencies?
 
  Gijs and Natovr found this line in preferences.xml under the mutliplay
  section:  
  type=string11850
  but they changed the line and they still could see others messages. Is
  this suppost to work or is it something there for a futute feature or what?
 
 It doesn't check for frequency match AFAICT, but seems to be pretty
 easy to add to multiplayer.nas.
 Might be advisable to change default comm frequency to some magic
 number meaning all frequencies. Not realistic, I know. So maybe
 GUARD? And display a simulated ATC warning about that, directing
 pilots to switch to a proper frequency.

When I originally wrote the MP chat, I had quite a lot of difficulty doing the 
frequency matching between the sender and receiver, possibly because I was 
doing a float comparison, or because the property is transfered as a float, or 
because the radio frequency was a float. 

I'm sure it would be pretty easy to sort out, but I never returned to it. If 
anyone wants to take a look, they are more than welcome.

-Stuart



  

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Multiplayer Chat Frequencies?

2008-10-06 Thread Csaba Halász
On Mon, Oct 6, 2008 at 6:52 PM, Stuart Buchanan
[EMAIL PROTECTED] wrote:

 When I originally wrote the MP chat, I had quite a lot of difficulty doing 
 the frequency matching between the sender and receiver, possibly because I 
 was doing a float comparison, or because the property is transfered as a 
 float, or because the radio frequency was a float.

 I'm sure it would be pretty easy to sort out, but I never returned to it. If 
 anyone wants to take a look, they are more than welcome.

Here is a first whack at the problem. Listens on all comm radios,
transmits on first one. Incoming messages without frequency or zero
frequency will always be received. Note, fg has comm1 set to 118.5MHz
by default.

I have the following additional ideas:
* separate property to disable frequency matching (receive-all, this
is done by selecting 0 freq in the patch)
* property to select active radio for transmission (maybe be per-radio flag?)
* startup warning message telling pilot to tune to an appropriate frequency
* comm1 automatically tuned to nearest tower, comm2 to guard on startup
* separate receive and transmit serviceable flags

Comments welcome.

-- 
Csaba/Jester
Index: multiplayer.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Nasal/multiplayer.nas,v
retrieving revision 1.9
diff -u -r1.9 multiplayer.nas
--- multiplayer.nas	2 Oct 2008 20:12:00 -	1.9
+++ multiplayer.nas	6 Oct 2008 22:47:56 -
@@ -10,6 +10,29 @@
 
 var messages = {};
 
+# check if any comm radio is tuned to freq (in Hz)
+var check_freq = func(freq)
+{
+  freq = num(freq);
+  if (freq == nil or freq == 0) return 1;
+  freq = freq / 100;
+  var comm_nodes = props.globals.getNode(/instrumentation).getChildren(comm);
+  foreach (var comm_node; comm_nodes)
+  {
+var serviceable_node = comm_node.getNode(serviceable);
+if (serviceable_node != nil and serviceable_node.getBoolValue())
+{
+  var selected_freq_node = comm_node.getNode(frequencies/selected-mhz);
+  var selected_freq = selected_freq_node == nil ? nil : selected_freq_node.getValue();
+  if (selected_freq != nil and (math.abs(selected_freq - freq)  0.01 or selected_freq == 0))
+  {
+return 1;
+  }
+}
+  }
+  return 0;
+}
+
 var check_messages = func
 {
 
@@ -41,8 +64,12 @@
   # Save the message so we don't repeat it.
   messages[lcallsign] = lmsg;
 
-  # Display the message.
-  echo_message(lmsg, lcallsign);
+  var lfreq = getprop(i.getPath() ~ /sim/multiplay/transmission-freq-hz);
+  if (check_freq(lfreq))
+  {
+# Display the message.
+echo_message(lmsg, lcallsign);
+  }
 }
   }
 }
@@ -87,15 +114,23 @@
   }
 }
 
-settimer(func {
-  # Call-back to ensure we see our own messages.
-  setlistener(/sim/multiplay/chat, func(n) {
-echo_message(n.getValue(), getprop(/sim/multiplay/callsign));
-  });
+var update_transmission_freq = func(n)
+{
+  setprop(/sim/multiplay/transmission-freq-hz, n.getValue() * 100);
+}
 
-  # check for new messages
-  check_messages();
-}, 1);
+_setlistener(/sim/signals/nasal-dir-initialized, func {
+  settimer(func {
+# Call-back to ensure we see our own messages.
+setlistener(/sim/multiplay/chat, func(n) {
+  echo_message(n.getValue(), getprop(/sim/multiplay/callsign));
+});
+
+# check for new messages
+check_messages();
+  }, 1);
+  setlistener(/instrumentation/comm/frequencies/selected-mhz, update_transmission_freq, 1);
+});
 
 # Message composition function, activated using the - key.
 var prefix = Chat Message:;
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel