Virtual CoPilot: Difference between revisions
(Switch to {{simgear commit}} to fix the broken Gitorious link.) |
(Switch to the {{forum url}} and {{forum link}} templates for all "flightgear.org/forum" forum links.) |
||
Line 18: | Line 18: | ||
== Problem == | == Problem == | ||
{{Note|{{FGCquote | {{Note|{{FGCquote | ||
|Update: There are now at least 3 different solutions to implement a virtual copilot for FG: | |Update: There are now at least 3 different solutions to implement a virtual copilot for FG: {{forum link|hilit=copilot|p=144294|text="copilot" forum search}} | ||
|{{cite web |url= | |{{cite web |url={{forum url|p=146708}} | ||
|title=<nowiki>Re: The Virtual Co-pilot!!!!!</nowiki> | |title=<nowiki>Re: The Virtual Co-pilot!!!!!</nowiki> | ||
|author=<nowiki>Hooray</nowiki> | |author=<nowiki>Hooray</nowiki> | ||
Line 289: | Line 289: | ||
## | ## | ||
# implements a very simple prototype of a timer based virtual 'copilot' script in Nasal issuing "FREDA" reminders to the console, screen and to the festival TTS | # implements a very simple prototype of a timer based virtual 'copilot' script in Nasal issuing "FREDA" reminders to the console, screen and to the festival TTS | ||
# see: | # see: {{forum url|t=9556}} | ||
# | # | ||
# for details on FREDA please see: | # for details on FREDA please see: |
Latest revision as of 13:47, 6 June 2019
This article is a stub. You can help the wiki by expanding it. |
Started in | 09/2014 |
---|---|
Description | Scripted CoPilot systems |
Maintainer(s) | ... |
Contributor(s) | onox [1] (since 09/2014), |
Status | Under active development as of 09/2014 |
Problem
Note
|
I am absolutely convinced that these autopilot/copilot tools are a great idea for FG, but I also believe anybody not coding this directly IN FlightGear by using Nasal, is making it more complicated than necessary. So, I will try to support anybody who is actually looking into porting this over to "native FlightGear space" by reimplemting such efforts in Nasal space instead - adding a bunch of extension functions to enrich the API is easy and well documented actually. Anybody knowing C++ (or Java for that matter), should be able to understand what's involved: Howto:Extending_Nasal
|
Background
state machines would be helpful here, IMO, unless you just need something basic. Offtopic, but I've thought a little bit about this and I think a custom syntax (read: DSL) would be helpful... [/egoist] (oh wait, I still need to get it off the ground) But I do not like the idea of using XML at all as I think you (Hooray) might've suggested before, my limit of XML tolerance is FDMs and PropertyList, not scripts, as those tags get comber some. Maybe having something in a Nasal object would be possible as well, something like a pseudo-linked list with loops would not be hard. — Philosopher (Sat Jan 19). Re: Copilot announcements: Nasal don't works!.
(powered by Instant-Cquotes) |
Zakalawe has recently started adding state machine support to SimGear: SimGear commit 22ea8ebe258da45df9fc2b77904c2dcf79cd0f57 It will probably take a while until this becomes available to Nasal scripts, but Tom has added a module called "cppbind" to SimGear to more easily expose C++ stuff to Nasal scripts (and vice versa). |
Basically, PropertyList XML files already support stateful expressions using the SGCondition syntax. While that's pretty verbose, it's still pretty straightforward. I think the tutorial system uses them, too (? - havent' checked) |
Objective
Runway Overrun Protection System
Some kind of separate Nasal submodule would seem to make - for details, see: Creating_new_Nasal_scripts#Nasal_sub_modules
|
It uses math, geo, and apt, so I guess it should live in Nasal/runway/runway_announcer.nas then.
|
FREDA Announcements
If you want to make changes to it, you can directly fork the script here: http://codepad.org/sSM4Guru
|
Porting FGFSCoPilot to Nasal
I applaud you for actually considering the port now! I'd suggest to use a Nasal sub module, so that you can easily structure your code and use separate Nasal source files for the main features: Nasal_scripting_language#Nasal_sub_modules
|