Board index FlightGear Support Interfacing

Real life traffic in FlightGear

Connecting two computers, using generic protocol, connecting with Matlab?

Real life traffic in FlightGear

Postby jalocha » Fri Mar 23, 2012 7:46 pm

Did anybody think about feeding real-life and real-time traffic into FlightGear ?

Pawel.
jalocha
 
Posts: 4
Joined: Fri Mar 23, 2012 7:41 pm

Re: Real life traffic in FlightGear

Postby F-JJTH » Fri Mar 23, 2012 8:24 pm

Hi jalocha,

It's a very good idea ! If we can have this feature it will be a great improvment for FlightGear.
A lot of website are available for display real life&time traffic as :
http://planefinder.net/
http://radarvirtuel.com/
http://flightradar24.com/

All these websites use ADS-B receiver, only aircraft equiped by transponder Mode-S/ADS-B are visible (30% for USA and 70% for Europe)
My question is : it will be possible to take contact with these websites and ask if they are ready to share these data under GPL.

Cheers,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: Real life traffic in FlightGear

Postby Hooray » Fri Mar 23, 2012 8:33 pm

jalocha wrote in Fri Mar 23, 2012 7:46 pm:Did anybody think about feeding real-life and real-time traffic into FlightGear ?


Yes, just do a forum/mailing list search, and you should find plenty discussions. I think the wiki also contains some more pointers. We have a dedicated AI sub forum, too.

search.php?st=0&sk=t&sd=d&sr=posts&keywords=traffic+feeding
search.php?st=0&sk=t&sd=d&sr=posts&keywords=traffic+feed
search.php?st=0&sk=t&sd=d&sr=posts&keywords=fgms+feed
search.php?st=0&sk=t&sd=d&sr=posts&keywords=multiplayer+feed
http://www.mail-archive.com/search?q=fe ... eforge.net
http://www.mail-archive.com/search?l=fl ... feeding+ai
http://www.mail-archive.com/search?l=fl ... ng+traffic
http://www.mail-archive.com/search?l=fl ... S++traffic
http://www.mail-archive.com/search?l=fl ... =ADS++feed

A bunch of related pointers can also be found on the (otherwise outdated) DIS wiki page: http://wiki.flightgear.org/Distributed_ ... h_Priority

Keep in mind though, that there's some work going on to move the AI traffic system out of the main loop into a separate process to ensure better multiplayer-consistency and frame rate/performance:

Subject: GA and commercial AI Traffic
durk wrote:Subject: GA and commercial AI Traffic
MD-Terp wrote:If I recall correctly from browsing the developers' mailing list, there is sort of a "holistic approach" being considered and possibly even developed, and I believe it involves coordinating all types of AI traffic across the multiplayer network (or perhaps a parallel to it), but that's probably a 3.0 feature.

That's more or less correct. I'm currently (spare-time-depending) working on integrating the two systems. I'm beginning to realize that, in order to make the commercial traffic interact with ATC, I have to remove the old "local traffic" AI and ATC modules altogether and re-implement these within a single framework.



Subject: Heads up: AI/ATC interactions (04/2011)
durk wrote:
Is it possible to design/redesign the AI stuff so that it propogates
across multiple computers or cores via some IPC process -- most likely
sockets.

As far as I can tell, the infrastructure is almost in place to do so.
Considering that the multiplayer system is based on the AIModels system, it
should be possible (with a few code modifications).

So, the way you could set this up would be to run a multiplayer server locally,
and configure all your FlightGear computers with multiplayer enabled and the
traffic manager disabled. Make sure that all these machines are setup to
communicate with the local multiplayer server.

Next (and this step still requires a code modification of the AIModels C++
code), enable AIModels and the traffic manager to run on one master machine
(most likely the same computer that also runs the FDM, and handles user input.

The only thing that not in place yet is that the regular AIAircraft are exposed
to the multiplayer system. I haven't gotten around to do this yet, but my guess
is that this should be fairly easy to achieve, since (as mentioned above) both
the Multiplayer system is based on the AIModels infrastructure.

I would be very happy to dive into this at a later stage (after getting the
basics for the AI/ATC system going). If you would like to play with this, I'd
be happy to assist though.

Cheers,
Durk



Subject: Heads up: AI/ATC interactions
Previously Durk mentioned in a post (18 months ago maybe) his thoughts of
running the AI as a separate process, from this I had a tinker with the
multiplayer code. In my case the master machine does not generate the window
views. I found by adding a routine to echo the data received from the MP
server to the slaves, It worked fine, one data stream to the MP server, only
one instance on the MP server from me, and MP aircraft all appeared on the
slaves.
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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Real life traffic in FlightGear

Postby jalocha » Fri Mar 23, 2012 8:40 pm

OK, I can say, what I could from my part. I am playing with receiving FLARM that is mostly used by gliders, and as well by some helicopters and small aircrafts in Switzerland. I receive this data locally at my place and I could feed them into whatever server if only someone tells me what protocol to use. Next, I could go to my gliding club, with lots of activity every day and place a receiver there. Then traffic from around 10 km would be visible. So far I feed the traffic I receive into APRS so you can see it on http://aprs.fi - search for place "Birrfeld, CH".

Pawel.
jalocha
 
Posts: 4
Joined: Fri Mar 23, 2012 7:41 pm

Re: Real life traffic in FlightGear

Postby Hooray » Fri Mar 23, 2012 8:51 pm

jalocha wrote in Fri Mar 23, 2012 8:40 pm: I receive this data locally at my place and I could feed them into whatever server if only someone tells me what protocol to use.


The FlightGear multiplayer server is called "fgms": http://wiki.flightgear.org/Fgms
Its protocol is documented here: http://wiki.flightgear.org/Multiplayer_protocol
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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Real life traffic in FlightGear

Postby jalocha » Fri Mar 23, 2012 9:03 pm

Just the right information :-)
Last thing: what is the easiest way to visualize data I send there ?
I will be sending first some play-back data and of course want to see if it gets there as I intend ?

Pawel.
jalocha
 
Posts: 4
Joined: Fri Mar 23, 2012 7:41 pm

Re: Real life traffic in FlightGear

Postby jalocha » Sat Mar 24, 2012 10:50 am

I still need some more information... can somebody answer or give pointers ?
For the multiplayer Protocol: http://wiki.flightgear.org/Multiplayer_protocol :
- what are the units for position, velocity and acceleration in particular for angular quantities ?
- what is the 8-byte time format ?
- what is the orientation vector ?
- the linear acceleration includes the normal Earth gravity ?

Pawel.
jalocha
 
Posts: 4
Joined: Fri Mar 23, 2012 7:41 pm

Re: Real life traffic in FlightGear

Postby Hooray » Sat Mar 24, 2012 2:39 pm

You can find the answers to all your questions just by looking at the source code in either fgms or fgfs (the MP component).
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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Real life traffic in FlightGear

Postby Azendale » Sun Feb 08, 2015 9:52 pm

I'm not completly clear on what all this code can & can't do, but see

https://github.com/bistromath/gr-air-modes

Additionally, the Software Defined Radios that can pick up this signal are not that expensive (but finding 1090mhz antennas for this in the US might be another story). I orginally started reading about this on http://www.flightradar24.com/dvbt-stick, where it is talking about the hardware you need to send them data.

See
http://www.amazon.com/NooElec-Previousl ... B009U7WZCA
http://shop.jetvision.de/epages/6480790 ... ts%2F67105

as examples of hardware they use.
Azendale
 
Posts: 2
Joined: Sun Feb 08, 2015 9:37 pm

Re: Real life traffic in FlightGear

Postby Hooray » Tue Feb 10, 2015 12:38 pm

You should be all set, see:

https://github.com/bistromath/gr-air-mo ... -air-modes
Multiple output formats are supported:

* Raw (or minimally processed) output of packet data
* Parsed text
* SQLite database
* KML for use with Google Earth
* SBS-1-compatible output for use with e.g. PlanePlotter or Virtual
Radar Server
* FlightGear multiplayer interface for real-time display of traffic
within the simulator


All you need is a supported hardware device and things should just work - you could even host your own fgms server that people could connect to in order to see the injected traffic (analogous to fgais): https://github.com/bistromath/gr-air-mo ... ghtgear.py
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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Real life traffic in FlightGear

Postby Johan G » Thu Feb 12, 2015 3:35 pm

Azendale wrote in Sun Feb 08, 2015 9:52 pm:...the Software Defined Radios that can pick up this signal are not that expensive (but finding 1090mhz antennas for this in the US might be another story).

If you can handle a soldering iron, making an antenna (or several different variants) can be a fun project. For some ideas look at https://www.google.se/search?q=build+1090+mhz+antenna. :wink:

Edit: The simplest one I could find would not even require soldering, but I am quite sure one could expect it to perform accordingly. :wink:
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5448
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Real life traffic in FlightGear

Postby Hooray » Thu Feb 12, 2015 6:10 pm

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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Re: Real life traffic in FlightGear

Postby Azendale » Fri Feb 13, 2015 5:28 am

Hooray wrote in Tue Feb 10, 2015 12:38 pm:You should be all set, see:

https://github.com/bistromath/gr-air-mo ... -air-modes
Multiple output formats are supported:

* Raw (or minimally processed) output of packet data
* Parsed text
* SQLite database
* KML for use with Google Earth
* SBS-1-compatible output for use with e.g. PlanePlotter or Virtual
Radar Server
* FlightGear multiplayer interface for real-time display of traffic
within the simulator


All you need is a supported hardware device and things should just work - you could even host your own fgms server that people could connect to in order to see the injected traffic (analogous to fgais): https://github.com/bistromath/gr-air-mo ... ghtgear.py


The reason I brought up the software was the line you bolded. The reason I wasn't sure if it had everything you would need was because of concerns about what hardware it does or does not support. It was written for the Ettus Research SDRs, which are ~$600 and up. I did not know if it would work the the ~25 SDRs. As far as a suitable antenna, you can buy them, it's just that it looks like it would have to be shipped into the US.

They say:

The receiver modes_rx is written for use with Ettus Research USRP
devices, although the "RTLSDR" receivers are also supported via the
Osmocom driver. In theory, any receiver which outputs complex samples at
at least 2Msps should work via the file input or UDP input options, or
by means of a Gnuradio interface.

http://sdr.osmocom.org/trac/wiki/rtl-sdr lists RTL2832U chipset based SDRs as compatible. So it does sound the like the ~$25 SDR fromNooElec would work.
Azendale
 
Posts: 2
Joined: Sun Feb 08, 2015 9:37 pm

Re: Real life traffic in FlightGear

Postby alex1 » Fri Dec 30, 2016 1:55 pm

I have a working version of this using flightradar24 with a perl interface using named pipes.
alex1
 
Posts: 10
Joined: Thu Nov 24, 2016 9:35 am
Callsign: alex1
Version: 2018.3.2
OS: linux

Re: Real life traffic in FlightGear

Postby Hooray » Fri Dec 30, 2016 1:56 pm

Sounds great, please do feel invited to share your work with us using either the forum and/or the wiki (screenshtos, newsletter) - so that others interested in this can more easily reuse your approach
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: 11317
Joined: Tue Mar 25, 2008 8:40 am

Next

Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests