Muhammad Ahmad wrote in Mon Nov 12, 2018 6:31 am:Thanks for your support, you are right I am a beginner I am a graduated engineer recently involved in a research work related to collision avoidance of an aircraft.
In that case, you probably need to "add" multiple aircraft to the scene, correct ?
If so, you should know that it is not easily possible for non-coders to instantiate multiple FDM-driven aircraft short of using multiple separate fgfs/fdm (yasim/jsbsim) instances via the multiplayer protocol.
If you don't need FDM driven traffic, you can simply refer to the previous responses I have posted, as they contain all that you need to know, you will specifically want to look for anything mentioning "tanker.nas", which is also a standard component of FlightGear, i.e. you can simply open the fgdata directory and look at the file. You will probably still want to look up the postings I mentioned to make heads and tails of it, otherwise it will look like pure gibberish to you without any fgfs/coding background.
However, it's a fairly straightforward mechanism, used in a handful of places already.
http://wiki.flightgear.org/Scripted_AI_ObjectsIn my work, I have implemented the algorithm in MATLAB but that was very basic and a lot of things were simply Assumed.
That's actually another viable option: create all your traffic in MATLAB and then hook up your traffic generator to fgfs, e.g. also via the multiplayer protocol - that way, the only thing you need is some kind of middleware/protocol to interface between fgfs and MATLAB.
If you are familiar with C/C++, it would be relatively straightforward to modify/patch the fgms sources accordingly, which we have done previously as part of the fgais project (see the wiki for details):
http://wiki.flightgear.org/FGAISI simply need to do write a nasal script through which I may be able to fly an aircraft from a starting point to destination point without any input via keyboard, mouse etc
Like I said, please refer to tanker.nas and the comments you can find here.
That being said, AI traffic subject to a number of limitations, among others it cannot easily make use of 1) FDMs, 2) autopilots 3) route managers - these are all hard-coded components which are not made available to scripting space.
Again, you almost certainly want to use either MATLAB directly (if you know how patch/rebuild C/C++ code, aka fgms) or the tanker.nas Nasal script, in conjunction with the pointers you can find on the forum.