Spoken GCA: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (+cat: FlightGear addons)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
rleibner and hooray are working on an '''Spoken GCA''' script, and it's time to share with you the beta version.
{{note|
SpokenGCA is being replaced by the [[PAR_instrument|PAR addon]].


{{WIP|Although still incomplete, the information it contains is valid and available. |nocat=}}
We strongly recommend using the new PAR.
}}
<!--
{{WIP|Although still incomplete, the information it contains is valid and available. |nocat=}}-->


[[File:Gca-ui.png|thumb|Screenshot showing rleibner's GCA/PAR screen (Canvas based) in conjunction with a Canvas driven GUI dialog to configure the GCA <ref>https://forum.flightgear.org/viewtopic.php?f=30&t=32882&p=319257#p319257</ref>]]
[[File:Gca-ui.png|thumb|Screenshot showing rleibner's GCA/PAR screen (Canvas based) in conjunction with a Canvas driven GUI dialog to configure the GCA <ref>https://forum.flightgear.org/viewtopic.php?f=30&t=32882&p=319257#p319257</ref>]]


[[Spoken GCA]] allows the pilot to listen to the directives of the ''Ground Controlled Approach''.
{{see also|Howto:Implementing a simple GCA system}}
(see [[Howto:Implementing_a_simple_GCA_system]])
The '''Spoken GCA''' [[addon]] allows the pilot to listen to the directives of the ''Ground Controlled Approach''.
= Background =
 
== Background ==
{{FGCquote
{{FGCquote
   |Is there any work on GCA (ground controlled approach) in progress, or have missed it? GCA is surprisingly accurate and easy to use, both as a pilot and a controller.  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=193941#p193941
   |Is there any work on GCA (ground controlled approach) in progress, or have missed it? GCA is surprisingly accurate and easy to use, both as a pilot and a controller.  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=193941#p193941
Line 15: Line 20:
   }}
   }}
}}
}}
= What GCA is =
 
== What GCA is ==
* https://secretsofcoldwarradar.omeka.net/exhibits/show/cold-war-radar-technology/radar-equipment/ground-controlled-approach-and
* https://secretsofcoldwarradar.omeka.net/exhibits/show/cold-war-radar-technology/radar-equipment/ground-controlled-approach-and
* https://aroundthepattern.com/training/ground-controlled-approaches-gca/
* https://aroundthepattern.com/training/ground-controlled-approaches-gca/
Line 21: Line 27:
* http://www.rquirk.com/cdnradar/cor/chapter21.pdf
* http://www.rquirk.com/cdnradar/cor/chapter21.pdf


= What can you expect from GCA =
== What can you expect from GCA ==
[[File:Gca1.png|left|thumb|Horizontal trajectory when pilot follows GCA instructions]]
Arriving in the vicinity of the airport with little or no visibility, the pilot can request the GCA service.
{{-}}
[[File:Gca2.png|left|thumb|Vertical trajectory when pilot follows GCA instructions]]
The Controller, assisted by a PAR (''Precision Approach Radar''), will guide you through a safe path (both in heading and in altitude) that will take you to the head of the used runway.
{{-}}
 
== How to install ==
{{note|This is the latest version (Nov 24, 2017)


[[File:Gca1.png|left|thumb|Horizontal trajectory when pilot follows GCA instructions]]Arriving in the vicinity of the airport with little or no visibility, the pilot can request the GCA service.
Latest modifications:
The Controller, assisted by a PAR (''Precision Approach Radar''), will guide you through a safe path (both in heading and in altitude) that will take you to the head of the used runway.[[File:Gca2.png|center|thumb|Vertical trajectory when pilot follows GCA instructions]]<br />
* plot2D helpers available.  
<br />
* {{key press|Track}} button at PAR screen chooses which aircraft must be tracked.
<br />
* PAR screen shows local traffic.
* {{key press|RWY}}, {{key press|FLIP}} and {{key press|+}}  {{key press|-}} zoom buttons at PAR screen.
}}


= How to install =
If your FGFS version accepts [[addon]]s, you can download this feature from the {{fgaddon source |path=Addons/SpokenGCA |text=FGAddon repository}}. Download all the 9 files into the directory of your choice.
{{note |    This is the latest version (Oct 1, 2017)<br />
Latest modifications:<br />
* Safety Slope according to terrain.
* "Apply" button.
}}
If your FGFS version accepts [[Addons]], you can download this feature from <big>(not uploaded yet)</big>. Read the [[FGAddon#Obtaining_aircraft|directions]] as a reference.


Otherwise, follow this:
Launch FlightGear including <code>--addon</code> argument, in essence:  
#- Download the [https://drive.google.com/file/d/0BzzojFuPdeyMWGpCV3VLS0QxUVU/view?usp=sharing Spoken_GCA.zip]. There you will find a "''gca.nas''" file and a "''gca''" directory with 9 files inside.
<syntaxhighlight>
#- Extract all into the ''[[$FG_HOME]]/Nasal'' directory '''(keeping the directory structure !)'''.
fgfs <usual args> --addon=/path/to/fgaddon/SpokenGCA</syntaxhighlight>
#- Edit the ''[[$FG_ROOT]]/keyboard.xml'' file and include the following lines in order to bind <ref>{{cite web
 
  |url    = http://wiki.flightgear.org/Howto:Reassign_keyboard_bindings
Otherwise, you can install it as a submodule. Contact the author for further instructions.
  |title  = wiki.flightgear.org/Howto:Reassign_keyboard_bindings
 
  }}</ref> the "'''>'''" key:
And that's all!
<syntaxhighlight lang="xml">
 
    <key n="62">
If you prefer (as I do), you can bind an unused joystick button to request GCA service.
        <name>greater-than</name>
        <desc>Spoken GCA</desc>
        <binding>
        <command>nasal</command>
        <script><![CDATA[
              gca.Control();
              ]]>
        </script>
        </binding>
    </key>
</syntaxhighlight>


And that's all !<br />
== How to use it ==
If you prefer, you can bind an unused joystick button too.<br />
[[File:PARS-by-rleibner.png|thumb|Screenshot showing the latest GCA addon, featuring support for plotting terrain profiles and customizing other parameters of the GCA addon at runtime]]


= How to use it =
When you are about 10 or 15 miles from your destination, tune Comm1 to an available ATC frequency (you can find them at ''Menu/Location/Airfield information''),
When you are about 10 or 15 miles from your destination, tune Comm1 to an available ATC frequency (you can find them at ''Menu/Location/Airfield information''),
and press the "'''>'''" key to request GCA assistance.<br />
and press the {{key press|&gt;}} key to request GCA assistance.
You will hear the GCA's answer ''"<callsign>, this will be a PAR approach to <airport> runway <rwy>."''<br />
 
You will hear the GCA's answer ''"<callsign>, this will be a PAR approach to <airport> runway <rwy>."'
 
Depending on your position and altitude, it will give you a vector towards the base leg or towards the final one. Also will instruct to climb or descend if necessary.


Depending on your position and altitude, it will give you a vector towards the base leg or towards the final one. Also will instruct to climb or descend if necessary.<br />
Follow closely those instructions making standard turns first, and half standard ones when indicated.
Follow closely those instructions making standard turns first, and half standard ones when indicated.
Adopt about 90 to 110 kts IAS until you hear ''"Begin descent"'', and configure a "final" atitude then.<br />
Adopt about 90 to 110 kts IAS until you hear ''"Begin descent"'', and configure a "final" atitude then.
If you are adviced ''"<Well/Slightly> <left/right> of course."'' then make "S" turns to fix that. Little ones if "Slightly", big ones if "Well".<br />
 
If you are adviced ''"<Well/Slightly> <left/right> of course."'' then make "S" turns to fix that. Little ones if "Slightly", big ones if "Well".
 
Correct your vertical speed if you hear ''"<Above/Below> glidepath."''
Correct your vertical speed if you hear ''"<Above/Below> glidepath."''
= How control.nas script works =
{{-}}
 
== The PAR screen ==
From version 0.5 onwards, the script calls an enhanced PARscreen. Unlike <code>parscreen_class.nas</code>, which it replaces, the new <code>par_class.nas</code> provides a stand-alone canvas window.
 
That means that you can instance as many PAR objects as you like.
From the Nasal console try this:
<syntaxhighlight>
var par24= gca.PAR(icao:"SUMU", rwy:"24").wndow.move(600,0);
var par06= gca.PAR(icao:"SUMU", rwy:"06").flipX();
</syntaxhighlight>[[File:TouchAndGo.png|none]]
 
This way (choosing opposite runways) you can check your ''touch-n-go'' skills. And this without using the GCA itself at all!
 
== Phraseology customization ==
You can customize the phraseology by editing the <code>phraseology.xml</code> file.
 
There you can find groups of tags like:
<syntaxhighlight lang="xml">
    . . . .
  <foo type="string">Hello world. </foo>
  <foo type="string">It is a good </foo>
  <foo type="string">day </foo>
  <foo type="string">to fly. </foo>
    . . . .  </syntaxhighlight>
 
which will be read as a single sentence (''"Hello world. It is a good day to fly. "'').
 
=== Literals ===
Those in the example above are literal sentences that you can change by the strings you want.
{{note |
* You should not include either <code>"</code> or <code>'</code>.
* Punctuation is meaningfull. }}
 
=== Substitutions ===
Strings starting by <code>%</code> will call some <code>property value</code>.
In the example above replace <code>day</code> by <code>% /sim/startup/time-offset-type</code>.
 
Now the sentence will be read as ''"Hello world. It is a good morning to fly. "'' or ''"Hello world. It is a good evening to fly. "'' depending on the time.
 
{{note |
* The called property must be a string.}}
 
=== Concatenation ===
Strings starting by <code>~</code> will append the sentence with another one.
 
Try this:
<syntaxhighlight lang="xml">
    . . . .
  <short type="string">% /satc/callsign-fmt</short>
  <short type="string">, </short>
 
  <foo type="string">Have a nice fly, </foo>
  <foo type="string">~short</foo>
    . . . .  </syntaxhighlight>when calling ''foo'' you should hear ''"Have a nice fly, <your-callsign> , "''
 
=== Word Replacement ===
If you find that the word ''Wind'' is not pronounced clearly, you can change it by ''Winnded'' or similar to increase its intelligibility..
 
Better? Fine, but what about the message on the screen?
Include a tag with the pattern  <code><nowiki><replace type="string">'''old''':'''new'''</replace></nowiki></code>:
<syntaxhighlight lang="xml">
    . . . .
  <replace type="string">Winnded:Wind</replace>
    . . . .
</syntaxhighlight>
 
== How control.nas script works ==
[[File:Gca schema1.png|right|This is the general (simplified) scheme of the gca module:<ref>{{cite web  |url    =  https://forum.flightgear.org/viewtopic.php?p=319409#p319409  |title  =  <nowiki> Re: Spoken GCA </nowiki>  |author =  <nowiki> rleibner </nowiki>  |date  =  Sep 26th, 2017  |added  =  Sep 26th, 2017  |script_version = 0.40  }}</ref>]]
[[File:Gca schema1.png|right|This is the general (simplified) scheme of the gca module:<ref>{{cite web  |url    =  https://forum.flightgear.org/viewtopic.php?p=319409#p319409  |title  =  <nowiki> Re: Spoken GCA </nowiki>  |author =  <nowiki> rleibner </nowiki>  |date  =  Sep 26th, 2017  |added  =  Sep 26th, 2017  |script_version = 0.40  }}</ref>]]


The ''gca.Control()'' function instances an object from ''gca_class'' and sets destination values. <br />
The <code>gca.Control()</code> function instances an object from <code>gca_class</code> and sets destination values.
That GCAobject contains all the AI to design the approaching path and will check the aircraft's position once per second. Instructions are built and transmitted to the caller.<br />


It also instances an object from ''PARScreen_class'' to track the aircraft on the PAR screen.<br />
That <code>GCAobject</code> contains all the AI to design the approaching path and will check the aircraft's position once per second. Instructions are built and transmitted to the caller.
 
It also instances an object from <code>PARScreen_class</code> to track the aircraft on the PAR screen.
   
   
Each second, the script receives an instruction. But it is neither possible nor convenient to pass these instructions to the pilot every second !<br />
Each second, the script receives an instruction. But it is neither possible nor convenient to pass these instructions to the pilot every second!
So it checks the ''demo.phrase'' and ''demo.maxsecs'' members. (''demo.phrase'' is not the instruction itself, but the "instruction-type". And ''demo.maxsecs'' is the maximum elapsed time between consecutive "spoken" instructions.)<br />
 
If the received ''demo.phrase'' is the same as the previous one, the script waits <demo.maxsecs> seconds before instruct the pilot.<br />
So it checks the <code>demo.phrase</code> and <code>demo.maxsecs</code> members. (<code>demo.phrase</code> is not the instruction itself, but the <code>instruction-type</code>. And <code>demo.maxsecs</code> is the maximum elapsed time between consecutive "spoken" instructions.)
But if ''demo.phrase'' changes, then the pilot will be instructed immediately.<br />
 
<big>(To be continued . . . )</big><br />
If the received <code>demo.phrase</code> is the same as the previous one, the script waits <code><nowiki><</nowiki>''demo.maxsecs<nowiki>></nowiki></code> seconds before instruct the pilot.


But if <code>demo.phrase</code> changes, then the pilot will be instructed immediately.


= Roadmap =
<big>(To be continued . . . )</big>
(based on  Readme.first)
{{-}}


* In gca_class.nas: add validation of all setters arguments.
== Roadmap ==
* In gca_class.nas: add validation of all setters arguments. {{done}}
* Let user to open the UI dialog from the "Set" button" at Par screen.  {{progressbar|20}}
* Move join() function and phraseology.xml to be accesible for gca_class.nas.
* Move join() function and phraseology.xml to be accesible for gca_class.nas.
* Add a version control.
* Add a version control. {{done}}
* improvements & optimizations
* Improvements & optimizations
* Support for different GUI modes/tabs (pilot, controller, developer) {{pending}} <ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=320294#p320294
  |title  =  <nowiki> Re: Spoken GCA </nowiki>
  |author =  <nowiki> rleibner </nowiki>
  |date  =  Oct 10th, 2017
  |added  =  Oct 10th, 2017
  |script_version = 0.40
  }}</ref> ?
* Add support for using AI/MP callsigns for looking up the proper /position root automatically. {{done}} [https://forum.flightgear.org/viewtopic.php?f=30&t=32882&p=320328#p320328]
* Add [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Nasal/canvas/gui/widgets/CheckBox.nas checkboxes] to the PAR dialog to show/hide optional elements (labels, flight history etc) ?
 
== Addon version ==
Sow structured our prototype as an Addon and uploaded to the {{fgaddon source |path=Addons/SpokenGCA |text=FGAddon repository}}.
 
== Testing ==
For testing/debugging I'm using a challenging situation:<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=319553#p319553
  |title  =  <nowiki> Re: Spoken GCA </nowiki>
  |author =  <nowiki> rleibner </nowiki>
  |date  =  Sep 28th, 2017
  |added  =  Sep 28th, 2017
  |script_version = 0.40
  }}</ref>
 
<pre>
fgfs --aircraft=c172p --airport=SLLP --com1=119.5 --prop:/engines/engine[0]/running=true --offset-distance=10 --offset-azimuth=280 --altitude=14000 --vc=80 --wind=280@10
</pre>
 
If you try it, be careful:
# At such altitudes a C172 can hardly fly.
# Pilot must manage the Mixture (for starting engines and later often when descending).
# You will be soon flying into the "mushing regime".
# If you fly a heavy aircraft, select rwy 28, cause the 28R is a grass short one. <ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=319553#p319553
  |title  =  <nowiki> Re: Spoken GCA </nowiki>
  |author =  <nowiki> rleibner </nowiki>
  |date  =  Sep 28th, 2017
  |added  =  Sep 28th, 2017
  |script_version = 0.40
  }}</ref>
 
Another interesting one:
<pre>
fgfs --aircraft=c172p --airport=LOWI --com1=119.27 --prop:/engines/engine[0]/running=true --offset-distance=6 --offset-azimuth=82 --altitude=10000 --vc=80 --wind=80@10
</pre>
Try editing "Final Approach" and "Glide Slope" values (use the "Apply" button).


== References ==
== References ==
{{Appendix}}
{{Appendix}}
== Related content ==
=== Wiki articles ===
* [[Spoken ATC]]
* [[Howto:Implementing a simple GCA system]]
[[Category:Air Traffic Control]]
[[Category:FlightGear addons]]

Latest revision as of 16:32, 14 July 2020

Note

SpokenGCA is being replaced by the PAR addon.

We strongly recommend using the new PAR.

Screenshot showing rleibner's GCA/PAR screen (Canvas based) in conjunction with a Canvas driven GUI dialog to configure the GCA [1]

The Spoken GCA addon allows the pilot to listen to the directives of the Ground Controlled Approach.

Background

Cquote1.png Is there any work on GCA (ground controlled approach) in progress, or have missed it? GCA is surprisingly accurate and easy to use, both as a pilot and a controller.
— Alant (Sun Ago 13). Re: Spoken ATC.
(powered by Instant-Cquotes)
Cquote2.png

What GCA is

What can you expect from GCA

Horizontal trajectory when pilot follows GCA instructions

Arriving in the vicinity of the airport with little or no visibility, the pilot can request the GCA service.

Vertical trajectory when pilot follows GCA instructions

The Controller, assisted by a PAR (Precision Approach Radar), will guide you through a safe path (both in heading and in altitude) that will take you to the head of the used runway.

How to install

Note  This is the latest version (Nov 24, 2017)

Latest modifications:

  • plot2D helpers available.
  • Track button at PAR screen chooses which aircraft must be tracked.
  • PAR screen shows local traffic.
  • RWY, FLIP and + - zoom buttons at PAR screen.

If your FGFS version accepts addons, you can download this feature from the FGAddon repository. Download all the 9 files into the directory of your choice.

Launch FlightGear including --addon argument, in essence:

 fgfs <usual args> --addon=/path/to/fgaddon/SpokenGCA

Otherwise, you can install it as a submodule. Contact the author for further instructions.

And that's all!

If you prefer (as I do), you can bind an unused joystick button to request GCA service.

How to use it

Screenshot showing the latest GCA addon, featuring support for plotting terrain profiles and customizing other parameters of the GCA addon at runtime

When you are about 10 or 15 miles from your destination, tune Comm1 to an available ATC frequency (you can find them at Menu/Location/Airfield information), and press the > key to request GCA assistance.

You will hear the GCA's answer "<callsign>, this will be a PAR approach to <airport> runway <rwy>."'

Depending on your position and altitude, it will give you a vector towards the base leg or towards the final one. Also will instruct to climb or descend if necessary.

Follow closely those instructions making standard turns first, and half standard ones when indicated. Adopt about 90 to 110 kts IAS until you hear "Begin descent", and configure a "final" atitude then.

If you are adviced "<Well/Slightly> <left/right> of course." then make "S" turns to fix that. Little ones if "Slightly", big ones if "Well".

Correct your vertical speed if you hear "<Above/Below> glidepath."

The PAR screen

From version 0.5 onwards, the script calls an enhanced PARscreen. Unlike parscreen_class.nas, which it replaces, the new par_class.nas provides a stand-alone canvas window.

That means that you can instance as many PAR objects as you like. From the Nasal console try this:

var par24= gca.PAR(icao:"SUMU", rwy:"24").wndow.move(600,0);
var par06= gca.PAR(icao:"SUMU", rwy:"06").flipX();
TouchAndGo.png

This way (choosing opposite runways) you can check your touch-n-go skills. And this without using the GCA itself at all!

Phraseology customization

You can customize the phraseology by editing the phraseology.xml file.

There you can find groups of tags like:

    . . . . 
  <foo type="string">Hello world. </foo>
  <foo type="string">It is a good </foo>
  <foo type="string">day </foo>
  <foo type="string">to fly. </foo>
    . . . .

which will be read as a single sentence ("Hello world. It is a good day to fly. ").

Literals

Those in the example above are literal sentences that you can change by the strings you want.

Note
  • You should not include either " or '.
  • Punctuation is meaningfull.

Substitutions

Strings starting by % will call some property value. In the example above replace day by % /sim/startup/time-offset-type.

Now the sentence will be read as "Hello world. It is a good morning to fly. " or "Hello world. It is a good evening to fly. " depending on the time.

Note
  • The called property must be a string.

Concatenation

Strings starting by ~ will append the sentence with another one.

Try this:

    . . . . 
  <short type="string">% /satc/callsign-fmt</short>	
  <short type="string">, </short>

  <foo type="string">Have a nice fly, </foo>
  <foo type="string">~short</foo>
    . . . .

when calling foo you should hear "Have a nice fly, <your-callsign> , "

Word Replacement

If you find that the word Wind is not pronounced clearly, you can change it by Winnded or similar to increase its intelligibility..

Better? Fine, but what about the message on the screen? Include a tag with the pattern <replace type="string">'''old''':'''new'''</replace>:

    . . . . 
  <replace type="string">Winnded:Wind</replace> 
    . . . .

How control.nas script works

This is the general (simplified) scheme of the gca module:[2]

The gca.Control() function instances an object from gca_class and sets destination values.

That GCAobject contains all the AI to design the approaching path and will check the aircraft's position once per second. Instructions are built and transmitted to the caller.

It also instances an object from PARScreen_class to track the aircraft on the PAR screen.

Each second, the script receives an instruction. But it is neither possible nor convenient to pass these instructions to the pilot every second!

So it checks the demo.phrase and demo.maxsecs members. (demo.phrase is not the instruction itself, but the instruction-type. And demo.maxsecs is the maximum elapsed time between consecutive "spoken" instructions.)

If the received demo.phrase is the same as the previous one, the script waits <demo.maxsecs> seconds before instruct the pilot.

But if demo.phrase changes, then the pilot will be instructed immediately.

(To be continued . . . )

Roadmap

  • In gca_class.nas: add validation of all setters arguments. Done Done
  • Let user to open the UI dialog from the "Set" button" at Par screen. 20}% completed
  • Move join() function and phraseology.xml to be accesible for gca_class.nas.
  • Add a version control. Done Done
  • Improvements & optimizations
  • Support for different GUI modes/tabs (pilot, controller, developer) Pending Pending [3] ?
  • Add support for using AI/MP callsigns for looking up the proper /position root automatically. Done Done [1]
  • Add checkboxes to the PAR dialog to show/hide optional elements (labels, flight history etc) ?

Addon version

Sow structured our prototype as an Addon and uploaded to the FGAddon repository.

Testing

For testing/debugging I'm using a challenging situation:[4]

fgfs --aircraft=c172p --airport=SLLP --com1=119.5 --prop:/engines/engine[0]/running=true --offset-distance=10 --offset-azimuth=280 --altitude=14000 --vc=80 --wind=280@10

If you try it, be careful:

  1. At such altitudes a C172 can hardly fly.
  2. Pilot must manage the Mixture (for starting engines and later often when descending).
  3. You will be soon flying into the "mushing regime".
  4. If you fly a heavy aircraft, select rwy 28, cause the 28R is a grass short one. [5]

Another interesting one:

fgfs --aircraft=c172p --airport=LOWI --com1=119.27 --prop:/engines/engine[0]/running=true --offset-distance=6 --offset-azimuth=82 --altitude=10000 --vc=80 --wind=80@10

Try editing "Final Approach" and "Glide Slope" values (use the "Apply" button).

References

References
  1. https://forum.flightgear.org/viewtopic.php?f=30&t=32882&p=319257#p319257
  2. rleibner  (Sep 26th, 2017).  Re: Spoken GCA .
  3. rleibner  (Oct 10th, 2017).  Re: Spoken GCA .
  4. rleibner  (Sep 28th, 2017).  Re: Spoken GCA .
  5. rleibner  (Sep 28th, 2017).  Re: Spoken GCA .

Related content

Wiki articles