If anybody is interested in improving interoperability between AI aircraft and ATC:
durk wrote:FWIW, there is some limited ATC chatter produced by the commercial AI traffic. Startup FlightGear at EHAM for instance, and tune to 121.7. Here you'll hear (well more correctly, see printed on screen), some ATC interaction between the AI aircraft and the ground startup controller. My goal is to extend these types of interactions for more stages of Flight, to make it encompass more types of aviation, and to let user controlled aircraft take part in that interaction.
Well, it seems this should already be possible to some extent without any significant changes to the C++ source code, i.e. it should theoretically be possible to drive AI traffic largely by using Nasal scripts (see for example tanker.nas in CVS).
In other words, anybody interested in making AI traffic fully ATC aware (in the sense of properly responding aircraft), would mostly have to do something along the lines of:
- set up an instance of a Nasal driven AI aircraft (see tanker.nas in CVS)
- register a listener to the chat property in order to parse chat (ATC) messages
- inside the registered listener, look for matching callsign of the corresponding aircraft (to see if transmission is relevant)
- if callsign is correct, start parsing/validating the transmission (i.e. "HY77: Descend and maintain FL50")
- acknowledge reception of transmission to virtual ATC
- directly set the target-* properties under /ai/models/model[x]/controls/ to customize the behavior of the AI plane
This scheme could be extended to manage a whole number of Nasal driven AI aircraft, i.e. using an "ai-pilot.nas" script.
Similarly, the same thing may work the other way around, i.e. for AI aircraft scripts to write to the chat property in order to talk to the AI traffic system to request a clearance or vectors.
Most of this stuff is directly possible and requires few changes or additions to the C++ code.
Just the possibility of using Nasal to script AI aircraft behavior patterns is extremely useful and powerful.
(One could even implement the AI ATC backend using Nasal by using the same approach, but that isn't as interesting due to the performance issues involved)