Board index FlightGear Development AI Traffic

ATC for training

Intelligent, computer controlled vehicles that drive/fly over the planet!

ATC for training

Postby tfreriks » Mon Dec 31, 2018 9:59 pm

Some of you might remember the early days of FS. My company was SimuTech Corporation and we made ATC scenarios for MSFS. When MS changed the code in the 90's sometime, we couldn't link to the source anymore and the product died. It's okay: we had built up a nice business with training scenarios for other sims.

The question is: Will the FlightGear opensource allow for third-party "adventure" scripts like the old days? The compiler we used was initially developed by BAO.

Thanks for any answers.
tfreriks
 
Posts: 23
Joined: Mon Dec 31, 2018 9:52 pm

And the answer is: it does already ...

Postby Hooray » Mon Dec 31, 2018 11:49 pm

Hi & welcome,

given your background, I will just use the corresponding ATC/aviation acronyms and coding lingo and post the corresponding pointers, okay ?

FlightGear isn't just open source, but it's also extensible using non-proprietary extension mechanisms.
This works primarily via 3 methods:

- a built-in LDAP-like key/value storage called the "property tree": http://wiki.flightgear.org/Property_tree
- a subset of XML mapped to this key/value storage called "PropertyList XML files": http://wiki.flightgear.org/PropertyList_XML_File
- a scripting language (plain text) based on ECMAScript, called "Nasal" (similar to JavaScript): http://wiki.flightgear.org/Nasal

In addition, the property tree data structure is accessible via a plethora of I/O means (interfaces), such as a built-in telnet daemon (server), as well as a httpd (server) based on mongoose, which exposes a websockets based interface on top of the property tree data structure.

http://wiki.flightgear.org/Telnet_usage
http://wiki.flightgear.org/Property_Tree/Web_Server

Furthermore, there is the additional possibility to create custom XML-based I/O protocols using the so called "generic" protocol system.

http://wiki.flightgear.org/Generic_protocol

For anything involving high throughput, i.e. binary I/O at several Hz, there is also the option of adding a corresponding C++ file and linking that into the binary.

This means, that middleware like FSUIPC isn't needed to look at fgfs internals (usually).

http://wiki.flightgear.org/Property_Tree/Sockets

There is text-to-speech support, using either festival or the built-in FLITE TTS engine.

http://wiki.flightgear.org/Flite_TTS

We also have a "Spoken ATC" add-on:

http://wiki.flightgear.org/Spoken_ATC
Image

There is a also a built-in OpenGL based UI engine which is made accessible on top of the property tree and PropertyList XML files, where each GUI dialog supports "bindings" (think actions). These bindings can trigger so called "fgcommands" (pre-defined built-in commands operating on a set of properties and/or triggering native code). Finally, these bindings can also execute scripted code in the form of "Nasal" blobs.

http://wiki.flightgear.org/PUI
http://wiki.flightgear.org/Bindings

For 2D drawing purposes (think plotting), there is an OpenGL-based drawing framework available that is fully accessible via properties (i.e. the built-in property tree), for the sake of convencience, there are OOP-enabled wrappers available implemented in Nasal mapping the property tree API onto classes and objects.

http://wiki.flightgear.org/Canvas

Tthere are also existing features simulating various aspects of ATC, the most recent additions include add-ons created by rleibner implementing virtual GCA/PAR functionality.


http://wiki.flightgear.org/Spoken_GCA
Image

In addition, there are standalone ATC front-ends (ATC-Pie (Python) and OpenRadar).

http://wiki.flightgear.org/ATC-pie
Image


In addition, there is a scripted "tutorial" system that makes it possible to create XML-based tutorials (which may also contain scripts) to create fairly sophisticated tutorials and/or "missions/adventures".

http://wiki.flightgear.org/Tutorials
Image

Also, Marius_A has been working on a dedicated "missions" add-on:

http://wiki.flightgear.org/FlightGear_M ... Adventures


We also have a handful of scripted AI scenarios, as well as a whole scripted dog-fighting/combat system implemented using Nasal, which is to say that it would be fairly straightforward for a coder to take these features apart and re-assemble them to come up with a custom ATC simulation, probably matching (if not even exceeding) what MSFS offered in the late 90s or early/mid 2000s.

http://wiki.flightgear.org/Bombable


All of this is to say, it would probably be fairly straightforward to look at such scenarios to see if/how some of the APIs/building blocks could be mapped to the equivalent fgfs interfaces. However, the question is what your primary motivation is here ? To be perfectly honest, it is unlikely that FlightGear as a community is going to be too interested in any commercial/proprietary efforts, to see for yourself you could do some research using "DRM" as a search query:

viewtopic.php?f=6&t=7351
https://sourceforge.net/p/flightgear/ma ... rch/?q=DRM

Thus, any commercial/properietary effort would literally have to be multiplayer/server based to be viable from a business perspective:

search.php?st=0&sk=t&sd=d&sr=posts&keywords=affero
viewtopic.php?f=49&t=23933

However, if you are primarily interested in making some old scenarios work again in fgfs, it's possible that we could find people interested in supporting this, especially because we already have numerous pieces in place for this (as you can surely tell by now)

Technically, it's likely that there won't be a 1:1 mapping or translation possible anyway, i.e. many critical things will diverge significantly - think about stuff like "hard-coded" assumptions, e.g. altitudes, airspeeds, terrain elevations, navaid locations and so on.

Thus, I'd say it's more likely that we might be able to create a "parser" to semi-automatically translate /some/ parts of such scenarios into a format that can be understood/processed by FlightGear, but that we'd still need a way to review and customize such scenarios to make them work at all. For example, using some kind of wizard UI

http://wiki.flightgear.org/Aircraft_Generation_Wizard
Image

Speaking as someone who is familiar with the property tree/XML and Nasal/Canvas side of his, my assertion is that a scripted parser/translator could indeed be created, but that doing so may involve a fair bit of reverse engineering unless BAO internals are easily available on line ?
And even then, the question is how much hand-editing would be required to make even the most basic scenario just work ?

Thus, the question is whether it's worth the hassle at all ?

The point being, there is certain a break/even point here, i.e. how many scenarios are still available, and just how complex are they ?

I mean, it's very well possible that creating even just a simple scripted parser/translator may take a full month of spare time coding, whereas manually translating a plain text description of a scenario into a format that FlightGear understands, may just take a fraction of the time.

Then again, if those scenarios are even just moderately complex and you've got acccess to not just a handful scenarios, writing a parser/translator would obviously pay off more quickly.

Depending on the complexity of the scenarios, and the underlying BAO compiler, this could very well be a whole project in its own right, possibly involving several flight simulator communities (think x-plane).

In summary, I believe, it's fairly accurate to say that nobody around here is likely to be interested in supporting binary-style proprietary scenarios - but that there might be people interested in looking at such scenarios to help bootstrap some scenarios for FlightGear specifically using our existing infrastructure and interfaces (which likely means that such scenarios would end up being stubs converted to XML, filled with FlightGear specifics like fgcommands and Nasal).

Those stubs would likely only resemble 50-60% of the original scenario given how much time has passed (terrain elevation, navigation data, difference in aircraft availability etc).

But depending on the nature of those scenarios, it might actually be possible to use even crudely-translated scenarios in some form of "mission generator"-like script to easily create missions using a handful of configurable variables (location, airport/runway, aircraft, weight&balance, weather, aircraft failures, navaid failures)

viewtopic.php?f=79&t=34988

As a matter of fact, some aircraft have XML-based checklists, that contain aircraft specific data that could be used to easily create "polymorphic" scenarios that way - where a tutorial would no longer contain only hard-coded assumptions, but also work in terms of such variables that are dynamically-looked up (imagine a tutorial/scenario that is aware of aircraft performance characteristics, W&B etc - such a scenario could randomly select all suitable airports (runway lenght) in the vicinity of a certain location and also change METAR accordingly).

http://wiki.flightgear.org/Aircraft_Checklists
Image

Note that none of this would be very difficult, and it would certainly not require any binary compiler - all of this is perfectly possible using mostly XML and scripting.

But if you are looking at some kind of commercial effort, I believe that only a server-based setup could work well enough, at which point you'd still have to work around all the issues mentioned above (underlying data/assumptions mismatching, due to being MSFS specific) - basically, the equivalent of our fgms (multiplayer) server, with full access to a fgdata copy, including all scenery/terrain - so that the corresponding missions work without requiring binary plugins and/or DRM.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: ATC for training

Postby tfreriks » Tue Jan 01, 2019 3:57 am

Goodness! That was a ton of reply. I'm familiar with XML as a data source for compiled code. Our (BAO) "adventure" language was more Cish, like this simple example:

if (40, To, 100.23, 86.245) {
playFiles (pID, L, 210, D, 4000);
}

That simply means that when the plane gets 40 miles from a certain LAT/LONG, it concatenates real-voice files. The result is the ATC clearance "Cessna 45WhiskeyJuliet, turn left heading 210, descend and maintain 4000."

Initially, it was linear, as in from X field to Y field, with standard clearances. However, we got a bit out of control and had a VB feeder that allowed the pilot to select any destination and any origination fields. It would select departures and enroute clearances then randomly select one of the available approaches there. It monitored compliance with the clearances (the controller would give an angry "Did you copy last clearance" if the pilot deviated from the plan. Like:

var clearHdg = 150;

checkHdg(clearHdg, currHdg); //currRad is built-in funciton showing his heading;

function checkHdg(x, y) {
if(x <> y) {
playFiles (pID, copyClear);
}
}

I can see clearHdg (and clearAlt, clearRad, and so on) coming from an XML file. Actually, all the variables, like lat/longs, distances, etc. can too.

The text-to-speech thing was in its infancy back in the day, so we used real controllers to record all the voices. Before we hung it up, we ask a bunch of pilots if they liked the real voices or the TTS. 90% preferred real voices; it added to the realism.

So, are you saying there's not enough interest in this sort of thing today?
tfreriks
 
Posts: 23
Joined: Mon Dec 31, 2018 9:52 pm

Re: ATC for training

Postby Hooray » Tue Jan 01, 2019 12:08 pm

tfreriks wrote in Tue Jan 01, 2019 3:57 am:So, are you saying there's not enough interest in this sort of thing today?


No, li I said, it depends entirely on your goals and your sitation.
Which is why I posed a handful of questions, too ;-)

I was just trying to suggest that if you are looking for a viable "business model", this may be more complicated than you think.
Simply because FlightGear already provides many features related to this, and because we have a rather active community of contributors able and willing to extend the system via XML files and scripts.

I'm familiar with XML as a data source for compiled code. Our (BAO) "adventure" language was more Cish, like this simple example:

if (40, To, 100.23, 86.245) {
playFiles (pID, L, 210, D, 4000);
}


This, too, would be easy to do via FlightGear directly. Either using pure XML files or by using scripts.
It would obviously also be possible to write a parser for such code.
"Nasal" is in fact, also C-ish - but I would only see the benefits of writing a parser if you have many of these scripts, otherwise I would probably just use Nasal directly - it even has a dedicated module for handling geographic computations (computing offsets, bearings, ranges, approach speeds and so on).


That simply means that when the plane gets 40 miles from a certain LAT/LONG, it concatenates real-voice files. The result is the ATC clearance "Cessna 45WhiskeyJuliet, turn left heading 210, descend and maintain 4000."


Again, we have a number of such ATC related features that can either use the built-in TTS engine or simply play/concatenate pre-recorder audio files.

Initially, it was linear, as in from X field to Y field, with standard clearances. However, we got a bit out of control and had a VB feeder that allowed the pilot to select any destination and any origination fields. It would select departures and enroute clearances then randomly select one of the available approaches there. It monitored compliance with the clearances (the controller would give an angry "Did you copy last clearance" if the pilot deviated from the plan. Like:

var clearHdg = 150;

checkHdg(clearHdg, currHdg); //currRad is built-in funciton showing his heading;

function checkHdg(x, y) {
if(x <> y) {
playFiles (pID, copyClear);
}
}

I can see clearHdg (and clearAlt, clearRad, and so on) coming from an XML file. Actually, all the variables, like lat/longs, distances, etc. can too.


This can be implemented almost exactly like this in Nasal, the only thing that really differs here is the comparison operator and the function definition:

Code: Select all

var checkHdg = func(x,y) {
if (x == y )  {
playFiles(copyClear);
}
return;
}




The text-to-speech thing was in its infancy back in the day, so we used real controllers to record all the voices. Before we hung it up, we ask a bunch of pilots if they liked the real voices or the TTS. 90% preferred real voices; it added to the realism.


Yeah, that is also how the so called "chatter" feature started out in FlightGear, it would randomly select background chatter and replay that. So the hooks are all there to do this, and you will find in fact many people/projects who have previously done related things.

That is exactly why the original response was as comprehensive as it is, to enable you to look up related features and see if/how they relate to your ideas. ;-)

Thus, the question remains, what are your goals ?
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: ATC for training

Postby tfreriks » Tue Jan 01, 2019 1:30 pm

I'll have to take some time to study nasal and, especially, my goals. I was heavily involved with flight sims for many years and have had upteen hours in some sort of sim. I have many hours in real planes, too. Actually, I started flying to figure out the original BAO sim (MSFS) but kept going. ATC simulation was my focus because, like most pilots, flying is easy but talking on the radio is NOT. It needs practice.

SimuTech evolved and flight sim became a smaller part. I started writing simulated scenarios for corporate sales, customer service, and other interpersonal skill development.

I sold the software businesses and am now an active novelist; I just published by 11th book. Sooooo, "what are my goals?" is a great question. Starting a new endeavor would be cool, but if there is no revenue-generating market, it's probably not worth it. Writing keeps me busy 10 hours a day. Visit timothyfreriks.com.

Anyway, let me study on it. If you see a market that could support a new twist on ATC, let me know. BTW, maybe you remember the games I wrote: Behind Enemy Lines, Rescue Air 911 and five or six other adventures. Now, gaming was a twist on ATC interaction. They sold well in computer stores. Fun.

Thanks again. I'll be in touch.
tfreriks
 
Posts: 23
Joined: Mon Dec 31, 2018 9:52 pm

Re: ATC for training

Postby Hooray » Tue Jan 01, 2019 1:56 pm

Thanks for sharing some of your background, that's indeed fascinating.

I definitely don't think that I can speak on behalf of the whole community, I can only share my impression that coming up with a viable commercial, and proprietary, business model solely based on creating "adventures", "missions" or "scenarios" for FlightGear is unlikely to work out particularly well (IMO).

There is the obvious challenge that FlightGear is "designed to be open", i.e. we don't do proprietary stuff usually, and we don't support DRM.

If in doubt, look at the two links I posted previously when I talked about "DRM" in my original response.

Thus, the only way to do something along those lines, is coming up with a 3rd party middleware that "talks" to FlightGear, e.g. some kind of multiplayer/world-server and then use a network connection.

Obviously, that would require people to be on line.

Other than that, we've got at least half a dozen of contributors who have created scripted systems to support tutorials, missions and scenarios - many of whom have become pretty familiar with fgfs over the years. So, a proprietary "scenario system" could probably be matched/exceeded in terms of functionality within weeks, without obfuscating anything.

On the other hand, there are some specialized FG related communities who seem to be closer to the "payware-world", and who might be interested in hearing more about your ideas/goals and priorities, i.e. people particularly interested in some flightsim related aspects such as combat simulation, virtual airlines or historic flight.

You could try to reach out to those folks and make up your own mind.

Most of us who do end up using FlightGear in a proprietary way (dayjob) end up using some form of custom-made middleware, so that we can comply with the GPL without having to share any of our work.

You could obviously try to create revenue by creating your own multiplayer system and charging people for that, but I highly doubt that this would create much revenue.

For starters, it may make sense to run a few polls and learn more about the FG community - so that you can determine for yourself, whether it's worth it or not (demographics). You could actually start here:

Navigraph's Flight simulator Survey Results.



PS: To get started with Nasal, there is a built-in "Nasal console" that you can use to type/execute code and see what it is doing.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: ATC for training

Postby tdammers » Thu Jan 03, 2019 7:52 am

Let me just throw in my $0.02 on the business angle of things here.

FlightGear is OpenSource, and for many users, this is *the* decisive advantage over other flightsims - after all, buying and installing FSX is a million times easier than getting FG to work and do what you want. This means that you will almost certainly have a hard time selling proprietary software to FG users.

That doesn't mean people aren't willing to spend money on their hobby though. Just that it won't go towards proprietary software licenses. So as long as all the client software needed to access your (paid) service is open source, I think you could have a market. It would still have to be pretty darn good to be profitable though.

One thing I can imagine might work would be an alternative MP server (or server network) providing full AI-driven ATC and AI traffic. That is, you'd run a server that people could log onto, and apart from "real" clients (human pilots interfacing with the server via FG), you'd also have AI pilots and AI ATC. The idea being that you get an ATC experience that is more realistic in some ways: more realistic traffic volume, multiple controllers per airport, ATC coverage of larger areas, etc. But it would have to be pretty damn good to make up for the lack of real human interaction.
tdammers
 
Posts: 150
Joined: Wed Dec 13, 2017 10:35 am
Callsign: NL256
IRC name: nl256

Re: ATC for training

Postby Hooray » Thu Jan 03, 2019 9:55 am

Yeah, that's a good response - I completely agree with that, probably because I suggested the same thing ;-)

That being said, it may still be difficult to come up with a viable business model.
Personally, if I were interested in doing this sort of thing, I would approach it a bit differently.

I would use the existing add-on infrastructure to implement the client-side interface, in conjunction with the corresponding C++ patches, e.g. to expose sockets/networking to scripting space, and all the XDR handling stuff.

That's a proven method, i.e. we already have numerous hard-coded I/O protocols for proprietary middleware.

Next, I would create a custom fgms/multiplayer replacement, but not just as a packet multiplexer for aircraft/vehicles, but for arbitrary world state using key/value pairs (e.g. the property tree, with certain state being returned based on the position/volume the client is located in).

That way, some of the more tightly-knit fgfs communities could use this framework to create their own environments (combat, virtual airlines, flight training, historic flight, sailing/submarines etc)

Equally, the existing fgfs community could use this for all sorts of purposes, so that they'd be motivated to make bug reports and feature requests.

In addition to that, some fgcom/teamspeak-like equivalent would make it possible for clients to talk to each other, which could in turn be used for some kind of sophisticated ATC environment, including not just server-side text-to-speech, but also speech-to-text, so that an actual AI could drive such scenarios and respond to pilots, without them being aware that they're talking to an AI.

Yeah, and finally, from a business standpoint, I'd market the whole thing and reach out to professional users who may need a corresponding ATC/AI environment. That way, you could charge for access to the server (monthly subscription) but also sell a license to industry users, with non-professionals getting free but limited access.

And obviously it would make sense to look at the limitations of the existing hard-coded AI/ATC environment, referring especially to the shortcomings identified and discussed by Durk when he came up with the proposal to re-implement the whole system from scratch on top of HLA/RTI, which he called "FGTraffic".

Such an MP/AI environment with ATC support using HLA/RTI or DIS could actually become pretty interesting, and also create sufficient revenue.

Otherwise, I consider it next to impossible to create a viable business model around a fgfs extension that is focused solely on ATC, especially given the plethora of related features we have already, and the low barrier to entry for creating new stuff, or extending existing features.

Still, I don't see many of us paying for access to such a MP environment, if in doubt, look at the number/demographics of MP users, and how many of them are paying for stuff like navaid data (navigraph) - so the whole thing would have to target professional/semi-professional users (think student pilots, CFIs or FTOs) - and fgfs would have to be much more polished than it is, as in "working out of the box" - it would basically have to use a tailored version of the Qt launcher for the whole sim, to become as accessible as MSFS/X-Plane are.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: ATC for training

Postby tfreriks » Fri Jan 04, 2019 10:46 pm

Hi, again. I've been thinking. Early in the days of MSFS, we recognized that the one thing that was missing was what we labeled "purpose". Pilots just took off with no particular flight plan in mind. Two things developed from that. I developed structured "adventures" that gave a pilot the opportunity to fly from a specific field to a specific field. People liked that a lot and we made and sold a ton of product. However, as flight sims developed, more serious pilots entered the universe. My company developed the facility for a pilot to choose an origination field and a destination field. This made more serious sim pilots happy because it gave them a more realistic experience. It made "real" pilots happy because of the IFR and ATC training environment. It also allowed them to "pre-fly" a trip they were planning. Ultimately, when the program was integrated into ELITE and a few other serious sims, this became a big seller.

I've been thinking through what I could add to your audience of sim enthusiasts. I'd like to send you file. It's a crude attempt at coding that program. It's written using a mish-mash of different languages, and probably frought with errors (sorry, I'm rusty), but it would give you something to look at and determine if your programmer guys can convert this to a successful program for FlightGear.

Could you send me your email so I can attach the file? And give me your thoughts on the above.
tfreriks
 
Posts: 23
Joined: Mon Dec 31, 2018 9:52 pm

Re: ATC for training

Postby Hooray » Sat Jan 05, 2019 1:02 am

Unfortunately, there is no easy answer, let alone a "correct" one.
So, I fully realize that the following is not what you were looking for.

However, it is worth taking into account that your MSFS/payware background may color your expectations.
FlightGear as a community of contributors unfortunately doesn't work this way, it's often been compared to herding cats ;-)

Besides, we probably see dozens of interesting ideas every month, sometimes people even agree that an idea is awesome, sometimes even the key people would like to see those implemented - but that still doesn't mean that ideas get implemented. That may even apply when people throw resources like money at the problem.

Which is to say, even great ideas may have a certain "shelf life" around here. There are some very real bottlenecks involved here. Primarily, spare time and motivation/expertise.

Usually, the most experienced contributors are lacking sufficient spare time, whereas new contributors may have more ideas/spare time but not the expertise/background or dedication/motivation to make up for the lack of that.

Also, keep in mind that with so many new interesting ideas being discussed each month, your ideas are literally competing for the same scarce resources - namely developer manpower.

In a way, this is to say that this project may not work the way you think it works - which is not to say that we like the current "modus operandi", it's just something that's evolved over the years, i.e. it's a "fact" that seems to work for most contributors.

Unfortunately, it's a fact that's hard to bring across to newcomers or people familiar with different work settings/projects.
What I've found to help to illustrate this point is that people should imagine being handed "they keys" for the project, as in access to key infrastructure (forum, devel list, wiki, source code, issue tracker etc) - at that point, they would be considered "FlightGear developers" by most standards - yet, nothing would have changed for them, other than being faced with unrealistic expectations, from people who don't consider themselves to be part of this community "as much".

That is actually one of the reasons why my first response to you here ended up being what it was: long and extensive...

I was trying to make the point that we do have many features related to this already in place, so I shared screen shots, videos and links to the wiki, so that you could look up things to see if/how things relate to your own ideas/vision.

And that's in fact how some of these features originally also came to be.

The thing is, there is no team of developers waiting for great ideas - unfortunately.
You could have the greatest ideas, and you could even have the right background, and maybe sufficient spare time - that still doesn't mean that features get implemented/integrated.

Overall, this has more to do with facing a certain "window of opportunity". Ideas being implemented has much more to do with motivation and perseverance, i.e. showing a willingness to learn how this community works, and how ideas are turned into features.

And more often than not, this has more to do with doing research and networking behind the scenes to see who has done related work, and who might be interested in teaming up with others.

One of the major showstoppers is that people are focused on their own particular ideas, without willing to compromise - which often means someone is looking for skill set X to implement Y, but will spend weeks or even months debating with contributors that their efforts/ideas should take precedence. We've seen this numerous times actually.

People don't seem to realize that this more about a pain/gain thing than anything else.
In other words, people will judge you by your track record usually - this is why some people get to implement/finish ideas, whereas others who may be much more experienced/skilled, may never finish something.

So this literally has to do with "networking", i.e. seeing how to get people to work together effectively, which first of all means bringing them onto the same page, i.e. identifying common, identical or overlapping/shared goals and identifying ways to collaborate.

Usually, the first step is looking up related work/features (and sometimes ideas), and reaching out to the corresponding to see who is currently around - that, too, is another key factor: this project stands largely on the shoulders of people who contribute primarily in their spare time - so that some idea/feature getting implemented or not, may have to do more with who is around (or not!) than anything else.

Obviously, we do have counter-examples, too - i.e. complex features that were single-handled prototyped by a few folks, without much networking (originally). For example, the bombable add-on or the local weather system (Advanced Weather).

But speaking in general, there is no fast-track here - the two examples mentioned above were prototyped/implemented by people with a corresponding professional background (PhDs), so that they didn't need as much networking originally.

Most others will have to spend some time getting to scratch with FlightGear concepts, especially those entirely new coding.

Apart from that, if you have something to share, the forum is usually the right place -alternatively, you can use the wiki.
Still, that may not suffice to receive much valuable feedback, you might still want to reach out to people who have done related work. At which point, my original response should come in handy (hopefully).

Again, sorry, I do realize that this must sound frustrating, and many of us were also once disappointed by the way the project works, but things change massively once you consider yourself part of this community, at which point you are also part of the problem if you are not part of the solution ;-)

I do hope that others will chime in, too - and I even hope to be proven wrong here, by someone volunteering to code this up.

But my experience has been, that it's indeed best to do "research & networking", as in identifying potential contributors, gathering related information (ideas, related features, drafting a concept) and refining/tweaking the whole thing over time.

And in the meantime, you could obviously consider getting involved in other smaller efforts to learn a few new skills, and maybe tinker with FlightGear tutorials, so that you can help others, which sooner or later means, that people may team up with you to implement certain ideas (YMMV).

Like I said in my original posting, a good starting point would be the "tutorial" system (Stuart) and Marius_A'S "missions & adventures" system.

If you are serious about your ideas, it should not be too much to expect you to read up about these two efforts so that you can put these into context, and see if/how they could be used to implement your ideas.

And who knows, given your own background, maybe Stuart and/or Marius_A would be interested in learning more about your concrete ideas, so that their "scripts" could be extended accordingly ?

Again, my original posting contains all the pointers you should need - so, the real question is what your goals/priorities are, and what kind of roadmap/time frame, and degree of engagement/involvement you have in mind, and what you want to throw at the project in terms of resources (skills, expertise, spare time etc)


PS: This is a recurring question, and we once tried to put together an article answering these questions by copying various responses over to the wiki: http://wiki.flightgear.org/How_the_Flig ... ject_works
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: ATC for training

Postby tfreriks » Sat Jan 05, 2019 3:06 pm

My head is literally spinning from all the input. I understand the lack of a clear path to a revenue-generating product. Got it. I understand that getting collaborators would be problematic as well. So, maybe---for fun---I'll try to figure it out a bit myself.

I have a couple of questions: I see XML for a lot of things, but I can't find the database for individual airports and navaids, etc. Does it require a SQL statement? Also, how do I access or generate the things I need, like the current position of the plane and radials from certain lat/longs? I can tell there are calculations and results being generated but have no idea how to find them. Where do I see and call all of the built-in functions?

Secondly, is there a compiler for nasal?

I have two new novels to be completed this year, so I'm not sure how much time I have. However, with answers to the above questions, I can get a good start.

Then I'll be quiet. Thanks.
tfreriks
 
Posts: 23
Joined: Mon Dec 31, 2018 9:52 pm

Re: ATC for training

Postby wkitty42 » Sat Jan 05, 2019 9:49 pm

tfreriks wrote in Sat Jan 05, 2019 3:06 pm:I have a couple of questions: I see XML for a lot of things, but I can't find the database for individual airports and navaids, etc. Does it require a SQL statement?

apt.dat.gz holds the data for the airports... FG imports this into a SQLite (IIRC) database when it is first started. if the files have been updated or some override data is found on the next startup, FG updates the database and then continues on into the sim. the navaids are loaded the same, as well... apt.dat.gz is located in fgdata/Airports along with metar.dat.gz... the navaids are located in fgdata/Navaids in gz files... again, though, this is all available in the cache database...

depending on what you are looking for, the database might be the place to look but this data generally doesn't change. when FG is running, what you seek might be available as a property in the property tree. when you are in the sim, hit the '/' and the property tree dialog will appear... there are thousands of properties available... some are changeable and others not...

tfreriks wrote in Sat Jan 05, 2019 3:06 pm:Also, how do I access or generate the things I need, like the current position of the plane and radials from certain lat/longs?

look in the property tree in the "ai/" branch when you have AI craft enabled or you are connected to the multiplayer network and you are within range (200nm IIRC) of an AI or MP craft...

tfreriks wrote in Sat Jan 05, 2019 3:06 pm:I can tell there are calculations and results being generated but have no idea how to find them. Where do I see and call all of the built-in functions?

the wiki is the holder of all truths (and some outdated ones ;)) for flightgear... if something isn't there, ask in one of the subforums related to nasal or that item property and someone will generally be along to help... soon-ish...
you might start with http://wiki.flightgear.org/Nasal_scripting_language ;)

tfreriks wrote in Sat Jan 05, 2019 3:06 pm:Secondly, is there a compiler for nasal?

no... FG loads it like ecma code and executes it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5027
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: ATC for training

Postby legoboyvdlp » Sat Jan 05, 2019 10:14 pm

tfreriks wrote in Sat Jan 05, 2019 3:06 pm:
I have a couple of questions: I see XML for a lot of things, but I can't find the database for individual airports and navaids, etc. Does it require a SQL statement? Also, how do I access or generate the things I need, like the current position of the plane and radials from certain lat/longs? I can tell there are calculations and results being generated but have no idea how to find them. Where do I see and call all of the built-in functions?




This might help: http://wiki.flightgear.org/Nasal_library

See courseAndDistance() in particular.

Current position is under position/ in the property tree - or possibly under something like instrumentation/gps as well.
User avatar
legoboyvdlp
 
Posts: 6256
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: ATC for training

Postby wkitty42 » Sat Jan 05, 2019 10:36 pm

yes! lego's pointer is to your position as recorded in the property tree whereas mine was for AI or MP craft that are in range... i just thought that slight clarification needed to be made ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5027
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Cross Posting ...

Postby Hooray » Sun Jan 06, 2019 3:52 pm

Hi, just briefly - I did in fact provide the answers to the questions you are now posting in some of my earlier responses.
Which is to say that I am sorry for obviously overwhelming you in terms of feedback, so the following is going to be my first cross-posting, and I would ask moderators not to delete it:

It seems, there are two new users around here who are apparently interested in related features, and wanting to contribute to the project:



Both of you seem to have overlapping interests, and also similar backgrounds - so, may I politely suggest that you try to get in touch and maybe team up in some JV-like effort ? The point being that learning something new can be so much more fun, and you can help each other, because the two of you are obviously interested in learning more about FlightGear internals, and about creating interactive tutorials (scenarios).

The answers you have received in your topics lately contain a ton of pointers already, so it's primarily a matter of structuring things in a sane fashion.

Given your backgrounds, my suggestion would be to start toying with the property browser to learn how XML and properties are related:

http://wiki.flightgear.org/Property_Browser
Image

And once you understand how the property tree works, you can review some of the other property related information (see the wiki).

Personally, I would recommend to ignore Nasal scripting until you really understand the property tree concept and how it relates to XML: http://wiki.flightgear.org/PropertyList_XML_File

http://wiki.flightgear.org/Nasal_Console
Image

The first thing I would suggest playing with when it comes to Nasal scripting is keeping the property browser open and getting/setting variables (properties) to see how they change in the property browser.

The most useful "commands" you will want to learn more about are setprop() and getprop()
And then you could look at timers and listeners: http://wiki.flightgear.org/Nasal_Callbacks_Explained

Once you understand those, you might want to consider learning more about object oriented programming in Nasal and using the object-oriented "props.nas" module to access the property tree.

http://wiki.flightgear.org/Object_orien ... g_in_Nasal
http://wiki.flightgear.org/Object_Orien ... with_Nasal
http://wiki.flightgear.org/Nasal_library/props

The point being, none of this is necessarily difficult or even too material, but it does help to have someone that you can talk to.

In other words, I would definitely suggest that the two of you get in touch via PM (or skype, whatsapp, google hangout whatever) and see kind of learning environment work for you or not.

Which is to say, I think both of you are trying to run before you can walk, i.e. you should proceed more slowly or things may inevitably get frustrating pretty soon.

PS: To learn more about Nasal why it doesn't need a dedicated "compiler", see:
http://wiki.flightgear.org/What_is_Nasal
http://wiki.flightgear.org/Nasal_FAQ
viewtopic.php?f=30&t=34900&p=337609&#p337609

And even if you should end up deciding that "the learning group" thing is not for you, you may still want to consider sharing a common thread - e.g. to identify common goals.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Next

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 1 guest