Board index FlightGear Support

Whatever happened to random radio chatter?

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Re: Whatever happened to radom radio chatter??

Postby blcjr » Sun Sep 25, 2016 8:56 pm

AndersG wrote in Sun Sep 25, 2016 7:30 pm:Don't use \ in the property path (--prop:\addons\ATCChatter\path=...), use /.


That didn't fix it. Besides, based on the error message, it seems it is getting hung up on the very first backslash in "--config=C:\users\" trying to parse "\u" as an escape character.
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to radom radio chatter??

Postby AndersG » Sun Sep 25, 2016 9:28 pm

But your "--fg-aircraft=C:\users\blcjr\Documents\FlightGear\addons" command line option normally works?
If so, that would mean FG can properly eat Windows style paths. It'd be weird (but not that surprising, I guess) if the --config option handles paths differently. How do you start FG? From a command line shell or via some launcher app (FGRun? the new built in one?)?

If \u is read as an escape character you could possibly try \\u instead. I'm on Linux and always start FG from a command line shell, so I'm rather vague on Windows oddities, but I know for sure that the path separator for property paths is '/', hence that was an obvious error..
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2444
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Whatever happened to radom radio chatter??

Postby blcjr » Mon Sep 26, 2016 10:53 am

I'm using FGGo as a launcher, and that seems to be what is having issues with the backslashes. Using two backslashes gets past that issue. But with that fixed, FFGo cannot launch fgfs with the full config string as put in the README file. I can get it to load only by putting the part of the string that begins with "--prop" on a separate line. Maybe FGGo can only handle strings of a certain length? But putting the rest of the string on a new line should work, and the sim does load now.

So I've got FG running. Now what? There are no instructions in the README about what to do within the sim to hear the chatter. I would think that the radio would have to be on and tuned to a particular channel. But from what little I can find about how ATCChatter previously worked, well, it just worked? Whatever, I'm not hearing anything, and don't know what I'm supposed to do in the sim to be sure I'm hearing anything. (I can hear ASOS/ATIS fine when tuned to an appropriate frequency.)

So what, next?
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to radom radio chatter??

Postby wkitty42 » Mon Sep 26, 2016 5:22 pm

what do you get when you tune to the GND or TWR frequency for your airport?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Whatever happened to radom radio chatter??

Postby blcjr » Mon Sep 26, 2016 7:47 pm

wkitty42 wrote in Mon Sep 26, 2016 5:22 pm:what do you get when you tune to the GND or TWR frequency for your airport?
Nothing. Now normally, I don't fly at controlled airports, so I wouldn't have access to a tower or ground frequency. But I positioned myself at the dirt strip for PALH where I am in range of PANC and tuned to the tower and ground frequences, and got nothing.

Is this way chatter worked previously, tuning to a particular frequency? ITRW ("In the real world") not everyone flies in and out of airports with towers and ground control. At PAAQ where I often take off and land in FG I have three frequencies "in range" -- ASOS, CTAF, and Anchorage Center. It would be "realistic" to hear chatter on either CTAF or a Center frequency. Also FSS, like Kenai FSS in south central AK. I see Kenai FSS reported as "in range" sometimes by FG. Not at PAAQ, which might be realistic as PAAQ has a satellite FSS (but this is apparently not in FG).

I'm not real picky about what frequency I would hear sound on. I'm more suspicious about whether the ATCChatter addon is actually working, given the trouble I've had with passing the startup strings. I PM'd Torsten yesterday about this thread, and the problem I was having at that time, hoping he'd have some ideas. Maybe he will, yet.
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to radom radio chatter??

Postby wkitty42 » Mon Sep 26, 2016 8:00 pm

to be honest, i don't know how it used to work... i have followed the instructions in the README and posted for assistance in the dev mailing list, though...

my problem that i'm seeing now, since trying out this addon, is that i cannot get the F12 dialog's "ATC in Range" button to work... it was working yesterday but not now since i tried this :/

[EDIT]

i don't know why or how but my "ATC in Range" is now working again... time to go back and see if i can duplicate it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Whatever happened to radom radio chatter??

Postby Hooray » Tue Sep 27, 2016 8:19 pm

Just for the record, Torsten ended up using a fairly clever method to come up with this idea for implementing addon support via PropertyList-XML overlays loaded via the --config argument - however, that also brings with it all the power for conflicting with stuff you are loading using the same mechanism, and/or any defaults you have customized. So just be aware of how this works - and again, kudos to Torsten for coming up with such a fancy approach to make this work, despite people arguing for the better part of a decade that FlightGear would not have "proper addon/modding" support" ... ;-)

With that being said, it would probably be a good idea to formalize the whole method and stop using tons of embedded Nasal, and instead document/favor the use of io.load_nasal() and/or io.include() to load Nasal code from the addon directory.

Equally, such code should ideally wrap setlistener and settimer/maketimer to honor the /sim/signal "events" - but apart from that, it's a really clever idea
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: Whatever happened to radom radio chatter??

Postby blcjr » Tue Sep 27, 2016 10:12 pm

But was it tested, especially on Windows? As I've chronicled, I've got the files installed correctly, and the --config argument at least not crashing FFGo, but I have no sound, and don't know where to begin to identify the problem. A big question is how is this supposed to work with the radio? There aren't any instructions on using it beyond the instructions for loading it.
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to radom radio chatter??

Postby wkitty42 » Wed Sep 28, 2016 10:27 am

looking at the script, the sound files are simply played some random number of seconds between 20 and 40...

i suspect there's a problem in parsing the --config option... i can't get it to work on linux using the new --launcher and placing the two required lines in the "additional options" box... i plan to have a play trying it on the command line but i have to do some scripting first since my install is built with the download_and_compile.sh script which means that i use the run_fgfs scripts which ensure that certain settings are in place before running fgfs...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Whatever happened to radom radio chatter??

Postby blcjr » Wed Sep 28, 2016 12:51 pm

I broke the --config, --prop and --fg-aircraft up into three separate lines in the FFGo script I run. I am not sure how to confirm that --config and --fg-aircraft are being parsed correctly, but I can confirm that --prop is being parsed correctly with the '/' properties browser inside FG; it shows the path to atcchatter correctly. The latter is helpful to me in that it shows the path with single backslashes, though I have to use double backslashes in FFGo script to get past FFGo thinking a single backslash is an escape character.

So how do we check whether the --config and --fg-aircraft commands are doing what they are supposed to be doing?
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to radom radio chatter??

Postby AndersG » Wed Sep 28, 2016 4:01 pm

Another shot in the dark: can you check the format of other file paths stored in properties, e.g. the path to the 3d model in /sim/model (IIRC). It might be that they should not be Windows formatted so the path set with --prop might have to be translated accordingly first.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2444
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Whatever happened to radom radio chatter??

Postby wkitty42 » Wed Sep 28, 2016 4:09 pm

--fg-aircraft is only needed IF your FGFS cannot access the specified directories for the wav files... --config is the important one... if it works, then on the console one should see something like this (from an ongoing dev mailing list conversation about this)...
Code: Select all
ATC Chatter initializing...
  chatter directory is /home/torsten/FlightGear/fgaddon/trunk/Addons/ATCChatter/sounds/UK
  found 198 files
ATC Chatter initialized.
next chatter in 29 seconds

only if the config.xml is actually read and processed will /sim/sound/chatter/enabled be TRUE... this property is set TRUE by the xml in the first block of the PropertyList... then the next part is if the embedded nasal script is loaded and executed... it will only execute if /sim/sound/chatter/enabled=TRUE...

one thing i'm not sure about is the embedded nasal script's use of "print" and "printlog"... personally i want to see it all in the log and on the screen when i'm running with --log-level=debug... it should also be noted, if not already, that i'm using the built-in --launcher...

on your comment about confirming they are parsed, you can run --log-level=debug and look in your ~/.fgfs/fgfs.log file for lines like these... this will tell you if they are even being passed to fgfs for processing... they appear in the top section(s) of the log where all the options being loaded are shown...
Code: Select all
        option:config = /home/myuser/myflightgear/Addons/ATCChatter/config.xml
        option:prop = string:/addons/ATCChatter/path=/home/myuser/myflightgear/Addons/ATCChatter

after that, the config.xml has to be loaded and executed for anything else to work...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5695
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Whatever happened to random radio chatter?

Postby blcjr » Wed Sep 28, 2016 5:43 pm

Here's what I'm seeing in my log file:

Code: Select all
NasalSys.cxx:427:ATC Chatter initializing...
NasalSys.cxx:427:  chatter directory is C:\users\blcjr\documents\flightgear\addons\atcchatter /sounds/UK
NasalSys.cxx:1141:Nasal runtime error: object has no size()
NasalSys.cxx:1147:  at /nasal[0]/atc-chatter[0], line 32
NasalSys.cxx:1151:  called from: /nasal[0]/atc-chatter[0], line 103
NasalSys.cxx:1151:  called from: C:/Program Files/FlightGear 2016.3.1/data/Nasal/globals.nas, line 119
fg_init.cxx:903:Nasal init took:3991


The second line doesn't look right, does it? There is a space after "atcchatter" and then forward slashes for /sounds/UK. So what is the "chatter directory?" ..atcchatter, or ...sounds\UK?

This is the relevant code from config.xml:

Code: Select all
var chatter_root = nil;
var chatter = "UK";
var chatter_dir = "";

 print("ATC Chatter initializing...");
    # default values
    chatter_root = getprop("/addons/ATCChatter/path");
    chatter_dir = sprintf("%s/sounds/%s", chatter_root, chatter);
    print("  chatter directory is " ~ chatter_dir );


I haven't coded in years, but it looks like line "chatter_dir = sprintf("%s/sounds/%s", chatter_root, chatter)" is not constructing the "chatter directory" correctly. I tried changing '/' to '\' and that gives me:

Code: Select all
C:\users\blcjr\documents\flightgear\addons\atcchatter \sounds\UK


Still has the space. Since I don't really know what I'm doing, I'm not going to do anything more for now. (What I am tempted to try to do is just hard code the correct path in the config.xml file.) If the correct "chatter directory" can get constructed, would that change the "Nasal runtime error: object has no size()"?
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to random radio chatter?

Postby blcjr » Wed Sep 28, 2016 6:00 pm

Well, I figured why not...hard code the "chatter_dir" which I did:

Code: Select all
var chatter_dir = "C:\users\blcjr\documents\flightgear\addons\atcchatter\sounds\UK"


I was rewarded with this:

Code: Select all
nasal:5:G:\Jenkins\workspace\Windows-release\flightgear\src\Scripting\NasalSys.cxx:427:ATC Chatter initializing...
nasal:5:G:\Jenkins\workspace\Windows-release\flightgear\src\Scripting\NasalSys.cxx:427:  chatter directory is C:\users\blcjr\documents\flightgear\addons\atcchatter\sounds\UK
nasal:5:G:\Jenkins\workspace\Windows-release\flightgear\src\Scripting\NasalSys.cxx:427:  found 198 files
nasal:5:G:\Jenkins\workspace\Windows-release\flightgear\src\Scripting\NasalSys.cxx:427:ATC Chatter initialized.
nasal:5:G:\Jenkins\workspace\Windows-release\flightgear\src\Scripting\NasalSys.cxx:427:next chatter in 33 seconds


And...it worked, there was now chatter! In my case, the config.xml code doesn't seem to correctly construct the "chatter_dir". Maybe that's a Windows issue?
blcjr
 
Posts: 63
Joined: Fri Sep 02, 2016 1:24 pm

Re: Whatever happened to random radio chatter?

Postby AndersG » Wed Sep 28, 2016 7:23 pm

Can you try your hard-coded approach but with forward slashes (/)? (Possibly starting with /C/... or C:/... . Btw. since others claim they set --fg-aircraft for the ATCChatter I don't understand why a manually set path property is needed at all.)
I think FG internally prefers to use those (though, apparently it does handle back slash (\) too in internal paths) while it would obviously be bad to have these internal paths OS dependent (and likewise for paths in -set, model and sound XML files - there / is universally used).
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2444
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

PreviousNext

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest