Board index FlightGear Development AI Traffic

Ask help for TCAS demonstration

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

Ask help for TCAS demonstration

Postby hxk123 » Mon Jul 28, 2014 9:02 am

I want to use the flightgear software to demonstrate the working function of TCAS (Traffice Collision and Advisory System). I'm new to flightgear and I want to know how to automaticly fly with the given information of the trajectory and speed data. I have learned to play flightgear with the keyboard control method but have no idea to play it with a script or commands. I want to demonstate the two planes flying with given data. Could anyone help me? Thank you!
hxk123
 
Posts: 2
Joined: Mon Jul 28, 2014 8:53 am

Re: Ask help for TCAS demonstration

Postby daveculp » Mon Jul 28, 2014 6:05 pm

I would have the "user aircraft" start in-air on a particular heading, then start the "target aircraft" as an AI aircraft on a collision course. It's been a while since I used the in-air spawning capability, so I'd be interested in knowing if it works OK.
User avatar
daveculp
 
Posts: 505
Joined: Sun Feb 24, 2013 2:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Ask help for TCAS demonstration

Postby deena102 » Tue Jul 29, 2014 4:10 am

Hi, I have the same need. I need to demonstrate TCAS.

Following are the requirements
1) Create a "Controllable Traffic"(target aircrafts) around the "user aircraft"
2) Enable TCAS in a given plane, example 787-8
3) Demonstrate different types of TA/RA Annunciations.

Kindly help.
deena102
 
Posts: 6
Joined: Fri Jul 18, 2014 12:50 pm

Re: Ask help for TCAS demonstration

Postby Hooray » Tue Jul 29, 2014 7:35 am

Hi & welcome,

yes, this can all be done by using the AI system and creating scripted traffic via Nasal: http://wiki.flightgear.org/Status_of_AI_in_FlightGear

Here are a few more pointers discussing the whole approach and its limitations/requirements:

You can even create Canvas-based PFD/ND instruments for AI traffic fairly easily using the MapStructure/ND frameworks, including TCAS TA/RA support:
How to display Airport Chart?
Image

As you can see, these are all independent ND instances, driven by AI traffic - all purely implemented in scripting space. We already do have a very basic TCAS/TRAFFIC ("TFC") layer for the ND: http://wiki.flightgear.org/Canvas_MapStructure_Layers

Creating conflict scenarios should be fairly easy using the tanker.nas demo code, and some creative use of the APIs provided in geo.nas

Overall, this should only take 2-3 weekends - i.e. coming up with a working prototype.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Ask help for TCAS demonstration

Postby hxk123 » Fri Aug 01, 2014 11:16 am

Hi, Thank you very much for your kindly reply. I am new to flightgear and find a bit difficult to understand the material suggested by you. I want to animinate the flight with a scheduled flightplan like the AI aircraft. How could I achieve it? I tried to use command --flight-plan=flightplan.xml but could not start the software with the command. I simply want to a to control the trajectory and speed of the flight automatically. And I have learned AI and want to know whether I could see the cockpit of the AI aircrafts or not.
Could you provide a detailed procedure to build the display the flight trajectory and flight data?
Thank you!
hxk123
 
Posts: 2
Joined: Mon Jul 28, 2014 8:53 am

Re: Ask help for TCAS demonstration

Postby Hooray » Fri Aug 01, 2014 11:36 am

Like I said previously: What you describe would be possible using scripted AI (i.e. Nasal/AI traffic) - in fact, it would even be possible to either render a complete cockpit (animated via AI properties) or simply use a GUI dialog that renders a Canvas PFD/ND for each "flight". That is why I provided those pointers. I am not sufficiently familiar with AI scenarios and/or AI flight plans, so I cannot answer reliably, if you can create such TCAS scenarios using those tools - which is why I suggested the scripted method, which is also the one uses by the bombable addon - which demonstrates that you'll have a ton of flexibility.

Could you provide a detailed procedure to build the display the flight trajectory and flight data?

I probably could, but it would take me ~30 minutes to write it all down, and it will inevitably involve coding - and a ton of programming pointers. Which kinda means that you'll either have the patience to read up all the pointers I have provided thus far, or that you'll have to use some other approach, or maybe even a completely different project. I am sorry, but my response is as detailed and exact as it can get basically - especially in a non-commercial project, you'll find very few open source projects providing this degree of support, and this number of pointers. What I am saying: from here on, it's up to you to spend some time and familiarize yourself with your options, in this case this mostly means reading up on Nasal, the property tree and AI scripting - and looking at a few examples, like those I suggested - e.g. tanker.nas, fox2.nas or the bombable add-on.

Otherwise, there's very little that I, or others, can now do to help you - short of writing actual code for you, I mean :D
Personally, I am more inclined to provide additional help once I can see that the person asking has done some "homework" and actually looked up things - while I don't mind seeing additional questions, I do expect them to be more informed, and more specific - i.e. of a less basic nature.

However, once you've shared your exact requirements - you'll probably find that there are various different ways to accomplish those goals. The route I suggested isn't necessarily the only one, I just suggested this particular approach because it works around limitations in the C++ code, and because of requirements that you posted - but if you find it too complicated, you may want to consider some other method, or maybe even consider your requirements.

Thus, I am afraid, that - what I have posted is pretty much what I would post again given your most recent response.

Could you provide a detailed procedure to build the display the flight trajectory and flight data?

The display doesn't need to be "built": the difficult work has already been done, e.g. by people like Gijs - as part of his PFD/ND projects.
Which is why I suggested this particular approach: it would allow you to reuse such work, without having to re-create any avionics from scratch - those would just be existing avionics using different properties for "animation".
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 2 guests