Board index FlightGear Development AI Traffic

Obtaining a list of current aircraft traffic

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

Obtaining a list of current aircraft traffic

Postby Swiber » Tue Nov 08, 2016 1:07 am

Hello,

How can I obtain a list of the aircraft traffic in FlightGear?

Thanks!
Swiber
 
Posts: 8
Joined: Tue Nov 08, 2016 12:50 am

Re: Obtaining a list of current aircraft traffic

Postby yanes » Tue Nov 08, 2016 1:28 am

How ?
in simulation , In nasal ,or over network ?
the AI traffic , MP or all ?
you need to be more precise buddy .
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Obtaining a list of current aircraft traffic

Postby Hooray » Tue Nov 08, 2016 8:36 am

Use the property browser to navigate to /ai (2nd entry from the top in the screenshot below): http://wiki.flightgear.org/Property_browser

Image

This will tell you the location/name and type of each entry.

Next, you can use arbitrary I/O means to access those properties and send them to another process - e.g. via the mongoose/httpd bindings (web sockets), the generic protocol, telnet/props etc.

http://wiki.flightgear.org/Telnet_usage

You can also use Nasal scripting (built-in Flightgear scripting language) to do all of this easily:

http://wiki.flightgear.org/Howto:Workin ... properties


(It's really just 5 lines of code to do this)

Background info at: http://wiki.flightgear.org/Howto:Work_w ... y_Tree_API
http://wiki.flightgear.org/Nasal_scripting_language
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: Obtaining a list of current aircraft traffic

Postby Swiber » Sun Nov 13, 2016 10:12 pm

I will try that thank you!
Swiber
 
Posts: 8
Joined: Tue Nov 08, 2016 12:50 am

Re: Obtaining a list of current aircraft traffic

Postby Hooray » Sun Nov 13, 2016 10:24 pm

Note that the questions posed in the first response are still perfectly valid - i.e. you can get much better answers by providing a little surrounding context.
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