Board index FlightGear Development Nasal

Spoken ATC

Nasal is the scripting language of FlightGear.

Re: Spoken ATC

Postby Hooray » Fri Dec 07, 2018 3:21 pm

the AI traffic system, and especially its route manager/autopilot are unfortunately implemented as "black boxes", so while implementing the scripting side is really easy, what is needed for that to be possible is that the C++ exposes the relevant information either via some kind of dedicated Nasal API or via corresponding properties in the tree, so that the script can access that information.

Likewise, the transponder is easy, but making it play nicely with the rest of the hard-coded code does again require an interfacing mechanism, so that it doesn't pick a number that is already in use, but also so that the C++ code is aware of transponder numbers used by scripted ai traffic
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: 11263
Joined: Tue Mar 25, 2008 8:40 am

Re: Spoken ATC

Postby rleibner » Fri Dec 07, 2018 5:25 pm

From Nasal it is possible to see the AI traffic in the vicinity of the airport (in fact, it is yet done for Spoken_GCA).
Following their trajectory I think it is possible to guess their intentions and populate "/sim/sound/voices/atc" with messages. Both, AI plane requesting clearances and ATC giving instructions.
By now, only an idea.
In order to not mess the intelligibility of the radio, I would like to differentiate the voices. (male/female, pitch, some background noise, etc).
And I'm not sure how to do it.

Regarding the transponder, I have not experience ITRW other than domestic VFR.
Would it be okay to assign 1200 to any light aircraft?
And a random squawk to others?
May be someone can enlighten me.
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 236
Joined: Fri May 19, 2017 7:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: 2180.4.0
OS: Ubuntu 18.04

Re: Spoken ATC

Postby Hooray » Fri Dec 07, 2018 6:26 pm

If you'd like the hard-coded AI system to expose additional information via the property tree, the right place to file a corresponding feature request would be the devel list and/or the issue tracker at: https://sourceforge.net/p/flightgear/codetickets/
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: 11263
Joined: Tue Mar 25, 2008 8:40 am

Re: Spoken ATC

Postby RobAndrew » Sun Dec 09, 2018 4:47 pm

Okay, thanks very much for the replies. It's also occurred to me that this system doesn't like any airports frequencies being the same when it comes to twr/ app/dep. If they are and it requests you to contact the other frequency, it will mention "contact XXX at "." " I'm not a user of nasal and haven't ever touched it. Is there a way for this to be solved?

Thanks in advanced
RobAndrew
 
Posts: 83
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: Spoken ATC

Postby massima » Sun Dec 23, 2018 8:09 pm

Great work @Rodolfo!!!! :wink:
Finally with your project there is an interactive ATC, i've waited for long times.
The install procedure posted at the first post doesn't work, i successfully used the guide posted by Torsen here.
So it needs an update same for the wiki.
Thanks
User avatar
massima
 
Posts: 211
Joined: Sat Jan 03, 2015 6:48 pm
Location: Italy
Callsign: M-AXX
Version: 2018.3.1
OS: debian testing

Re: Spoken ATC

Postby rleibner » Thu Dec 27, 2018 9:34 pm

Following the suggestion made by RobAndrew, I'm debugging a new version that includes AI-Traffic/ATC voices.
There is a lot of work to do yet, but it is in progress...
Especially because I aim to use an xml State-Machine, but ... (see the https://forum.flightgear.org/viewtopic.php?f=18&t=35182)

The general idea is not only to hear the AI-Traffic comms, but also to refine the instruction that ATC gives to you, depending on the Traffic (if rwy is bussy, etc...).
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 236
Joined: Fri May 19, 2017 7:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: 2180.4.0
OS: Ubuntu 18.04

Re: Spoken ATC

Postby clm76 » Fri Jan 04, 2019 7:20 am

Hi Rodolfo and all,
I wish you a happy new year 2019.

I recommend some changes :
1 - in README.first : line 12 - replace ">" key by "<" key (">" key is for The PAR system).

2 - To take account of meteo without Metar, like "realistic weather" :
line 62 in voice.nas, replacement of :
Code: Select all
var q_ = getprop("/environment/metar/pressure-sea-level-inhg");

by :
Code: Select all
var q_ =  getprop("/environment/pressure-sea-level-inhg");

line 81 replacement of :
Code: Select all
var a = abs(info.runways[rw].heading - getprop("/environment/metar/base-wind-dir-deg"));

by :
Code: Select all
var a = abs(info.runways[rw].heading - getprop("/environment/wind-from-heading-deg"));

line 104-105 replacement of :
Code: Select all
setprop("/satc/wind-dir-fmt", spell(sprintf("%d",getprop("/environment/metar/base-wind-dir-deg")),3));
setprop("/satc/wind-speed-fmt", sprintf("%d",getprop("/environment/metar/base-wind-speed-kt")));

by :
Code: Select all
setprop("/satc/wind-dir-fmt", spell(sprintf("%d",getprop("/environment/wind-from-heading-deg")),3));
setprop("/satc/wind-speed-fmt", sprintf("%d",getprop("/environment/wind-speed-kt")));
clm76
 
Posts: 142
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.3.0
OS: Linux Mint 18.3

Re: Spoken ATC

Postby rleibner » Fri Jan 04, 2019 4:50 pm

clm76 wrote in Fri Jan 04, 2019 7:20 am:... I recommend some changes :
1 - in README.first : line 12 - replace ">" key by "<" key (">" key is for The PAR system).
2 - To take account of meteo without Metar, like "realistic weather"


Thanks for your suggestions. I'll take them and will be included in the next version (soon).
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 236
Joined: Fri May 19, 2017 7:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: 2180.4.0
OS: Ubuntu 18.04

Previous

Return to Nasal

Who is online

Users browsing this forum: No registered users and 1 guest