Spoken GCA

From FlightGear wiki
Revision as of 15:56, 31 October 2017 by Rodolfo (talk | contribs) (→‎Roadmap)
Jump to navigation Jump to search

rleibner and hooray are working on an Spoken GCA script, and it's time to share with you the beta version.

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
Note: Although still incomplete, the information it contains is valid and available.
See history for the latest developments.
Screenshot showing rleibner's GCA/PAR screen (Canvas based) in conjunction with a Canvas driven GUI dialog to configure the GCA [1]

Spoken GCA allows the pilot to listen to the directives of the Ground Controlled Approach. (see Howto:Implementing_a_simple_GCA_system)

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. 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.

Vertical trajectory when pilot follows GCA instructions




How to install

Note  This is the latest version (Oct 10, 2017)

Latest modifications:

  • configureGCA() function accepts defaulValues and mask arguments.
  • Terrein Resolution field.
  • Safety Slope according to terrain.
  • "Apply" button.

If your FGFS version accepts Addons, you can download this feature from the Addons Repository. Download all the 9 files into the directory of your choice. Launch FlightGear including --addon argument, eg.:

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



Otherwise, follow this:

  1. - Download the Spoken_GCA.zip. There you will find a "gca.nas" file and a "gca" directory with 9 files inside.
  2. - Extract all into the $FG_HOME/Nasal directory (keeping the directory structure !).
  3. - Edit the $FG_ROOT/keyboard.xml file and include the following lines in order to bind [2] the ">" key:
    <key n="62">
        <name>greater-than</name>
        <desc>Spoken GCA</desc>
        <binding>
        <command>nasal</command>
        <script><![CDATA[
              gca.Control();
              ]]>
        </script>
        </binding>
    </key>

And that's all !
If you prefer, you can bind an unused joystick button too.

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."

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:[3]

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

(based on Readme.first)

  • In gca_class.nas: add validation of all setters arguments. Done Done
  • 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) [4] ?
  • add support for using AI/MP callsigns for looking up the proper /position root automatically ? Pending Pending[1]

Addon Version

now structured our prototype as an Addon and uploaded to the Addons repository

Testing

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

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. [6]

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. wiki.flightgear.org/Howto:Reassign_keyboard_bindings.
  3. rleibner  (Sep 26th, 2017).  Re: Spoken GCA .
  4. rleibner  (Oct 10th, 2017).  Re: Spoken GCA .
  5. rleibner  (Sep 28th, 2017).  Re: Spoken GCA .
  6. rleibner  (Sep 28th, 2017).  Re: Spoken GCA .