Board index FlightGear Development New features

Vatsim in FG

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: Vatsim in FG

Postby xxx-246 » Sun Jun 18, 2017 3:31 pm

Hello , all!

I'm really happy to see, there is some software to connect to the VATSIM network :)

I just want to ask if it's possible to see all traffic in flightgear at least as blue yellow ?
I have the problem that I can see approx. 10 % of the traffic on flightgears pilots list (compared to the Squawkbox747 Pilots list). I think I should see all pilots on flightgear, too if they are in a range of 100nm or ?
Is it a bug in my configuration or with the version of flightgear or is it not implemented yet ?

Btw, I have flightgear 2016.4.4 installed with SquawkBox 1.99k and Squawkgear from 14.04.2010.

In general it's not the most critical problem, but in situations like "give way to" calls or "follow the xxx" it would be a problem.
Sadly I can't find anything on the www regarding to this topic (on all sites I can read that the traffic is displayed as 747 or A320..)

Thank you in advance.

Regards
Chris

Edit:
Ok, I figured out that the squawkgear python script mp.py actually skip entries which have no airplane model set.
So I comented out the following line (366):
Code: Select all
if i == '0': return      # don't inject if model not ready

and get all airplanes registered after I click connect. Sadly after 1 second they are being removed :mrgreen:
Now searching for the part which removes planes without a model setuped.
Edit Edit: Ok, seems to be not that simple. I guess flightgear removes planes that are not refreshed frequently and VATSIM might not be updating planes that are not moving that often. I guess that could be the reason why they're removed. Maybe someone who is more familar with the VATSIM protocol data has an idea :?: ?
Last Edit:
Ok, I found something out:
I added a debug output on squak.py on the update line, so it looked like this:
Code: Select all
mp.update(d['tcas'])
print 'Update message:', d['tcas']

Here some output from it:
Code: Select all
Update message: DLH4631 AIRLINE=DLH 0 52.30259 4.76175 0 4 8390244
Update message: N34937 3 ~B737 52.31242 4.80506 -10 0 4269800912
Update message: KLM730X AIRLINE=KLM 0 52.31075 4.43320 4041 227 4257220016
Update message: DAL165 AIRLINE=DAL 0 52.31203 4.76569 22 0 20972928
Update message: KLM641A AIRLINE=KLM 0 52.31510 4.75394 19 21 8391632
Update message: KLM868 AIRLINE=KLM 0 52.21780 4.94115 4832 257 4257221232
Update message: KLM17K AIRLINE=KLM 0 52.33106 4.70913 19 55 32
Update message: PH-SPF 0 ~B737 51.35032 5.66768 9036 201 12584344

As you guess I actually could see only the PH-SPF and N34937. To get around the problem of invisible aircrafts I changed the regualr expression in mp.py (update(t) definition) in the following way:
Code: Select all
m = re.match('(\S+) (\d+) (\S+) ([-.\d]+) ([-.\d]+) ([-.\d]+) ([\d.]+) (\d+)', t[a:])

to
Code: Select all
m = re.match('(\S+) (\S+) (\S+) ([-.\d]+) ([-.\d]+) ([-.\d]+) ([\d.]+) (\d+)', t[a:])

So the AIRLINE=*** wouldn't cause regex to fail processing the rest of the data and I will see everything.
Because of this is a dirty hack, all of this AIRLINE=xxx types will be a 737-Aloah. This should be updated, maybe I will do it later. But I wonder a bit why most entries doesn't have an airplane model set :/

But this is the solution for missing traffic on VATSIM with flightgear at the moment :D
xxx-246
 
Posts: 8
Joined: Mon May 22, 2017 7:20 pm

Re: Vatsim in FG

Postby Johan G » Tue Jun 20, 2017 9:52 pm

Interesting hack.

xxx-246 wrote in Sun Jun 18, 2017 3:31 pm:[...] I wonder a bit why most entries doesn't have an airplane model set :/

Odd cause. It seem like a table with flights vs. aircraft types would be needed.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Vatsim in FG

Postby OE-PH1 » Fri Jun 23, 2017 10:58 am

I am really happy that finally anyone tried to fix this annoying VATSIM problem. Thank you @xxx-246 for your hack.

As I am on a Windows PC I don't have python installed. Do you think you could provide a compiled .exe including your improvement? I don't care about all these 737-Aloahs as long as I can see all the other traffic!
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby Johan G » Sat Jun 24, 2017 10:32 am

OE-PH1 wrote in Fri Jun 23, 2017 10:58 am:As I am on a Windows PC I don't have python installed.

If you have the required privileges on the computer you run FlightGear on and a descent Internet connection installing Python is only about 10-20 minutes away. Just go to python.org and look for a download button. ;)

Note: There is a bit of a difference in the syntax between Python 2 (2.x.x) and Python 3 (3.x.x), but I think you can install them in parallel.

Besides, Python is a rather descent programming language for beginners, ;) and with really good documentation (which probably have no small part in Python's wide adaptation).
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Vatsim in FG

Postby OE-PH1 » Sat Jun 24, 2017 10:47 am

Johan G wrote in Sat Jun 24, 2017 10:32 am:If you have the required privileges on the computer you run FlightGear on and a descent Internet connection installing Python is only about 10-20 minutes away. Just go to python.org and look for a download button. ;)


Haha this is absoultely FG-style... engage others to do it by themseves :D

I will try to get python running on my own PC. I just hoped that some experts could build a .exe (py2exe) easily. I think that many other FG/VATSIM users would appreciate it if there was a squawk.exe availlable for instant use...
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby Johan G » Sat Jun 24, 2017 11:16 am

OE-PH1 wrote in Sat Jun 24, 2017 10:47 am:Haha this is absoultely FG-style... engage others to do it by themseves :D

Yep. :lol: Because we want more chefs in this soup, and one do not foster chefs by serving them fine cuisine on a silver platter.* ;)

Besides, it is really enjoyable to see people engage, learn, acquire new skills and grow. :)

* Though an experienced chef would see what is on that platter and have a good guess on how it is made.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Vatsim in FG

Postby OE-PH1 » Sat Jun 24, 2017 1:36 pm

Johan G wrote in Sat Jun 24, 2017 11:16 am:Yep. :lol: Because we want more chefs in this soup, and one do not foster chefs by serving them fine cuisine on a silver platter.* ;)


Alright, I did my homework and installed python. Now, squawkgear ist running inside python and also the provided hack works fine :)

Still unsolved, why some planes are not on ground level?
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby SVW » Sun Jun 25, 2017 11:27 am

Your hack is highly appreciated, thanks alot!
svw
SVW
 
Posts: 75
Joined: Sat Jun 13, 2015 6:54 pm

Re: Vatsim in FG

Postby OE-PH1 » Tue Jul 11, 2017 6:13 am

2 questions:

1.
At airport, sometimes VATSIM aircrafts are not positioned on ground level, but hover a few meters above ground, sometimes also below ground. The offset is not always the same for all aircrafts.
Does anyone know the reason for this behavior? And: can this be fixed in squawkgear?

2.
Yesterday, at EDDL, various VATSIM aircrafts seemed not to see me, they taxied through me. (or, to be correct: above me - see question 1). I was visible to ATC. Maybe I was invisible, because I was below ground for their point of view?
Any experiences?

thank you!
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby CaptB » Tue Jul 11, 2017 9:57 am

re 1: Most likely the other traffic have their altimeter not set correctly, or they set it correctly but their weather and thus pressure is not the same as yours. A scenery difference with slight deviation in AD elevation might also be a factor.

re 2: Probably model matching problems. Had these issues and other weird issues where i'd see only the aircraft shadow happen to me natively with FSX and vPilot, so it might not be SquawkGear specific.

I am not sure that there is an easy and clean way to solve the levitating aircraft issue, unless you have everyone on that network using the same weather and same scenery. Model matching could be an issue on either side so it's also not that easy.

OE-PH1 wrote in Tue Jul 11, 2017 6:13 am:2 questions:

1.
At airport, sometimes VATSIM aircrafts are not positioned on ground level, but hover a few meters above ground, sometimes also below ground. The offset is not always the same for all aircrafts.
Does anyone know the reason for this behavior? And: can this be fixed in squawkgear?

2.
Yesterday, at EDDL, various VATSIM aircrafts seemed not to see me, they taxied through me. (or, to be correct: above me - see question 1). I was visible to ATC. Maybe I was invisible, because I was below ground for their point of view?
Any experiences?

thank you!
Ongoing projects(3D modelling): A320, MD-11, A350, B767
FG767: https://fg767.wordpress.com/
CaptB
 
Posts: 685
Joined: Thu May 23, 2013 7:36 pm
Callsign: EKCH_AP
IRC name: CaptB
Version: next
OS: Xubuntu

Re: Vatsim in FG

Postby OE-PH1 » Tue Jul 11, 2017 6:42 pm

CaptB wrote in Tue Jul 11, 2017 9:57 am:re 1: Most likely the other traffic have their altimeter not set correctly, or they set it correctly but their weather and thus pressure is not the same as yours. A scenery difference with slight deviation in AD elevation might also be a factor.

re 2: Probably model matching problems. Had these issues and other weird issues where i'd see only the aircraft shadow happen to me natively with FSX and vPilot, so it might not be SquawkGear specific.

I am not sure that there is an easy and clean way to solve the levitating aircraft issue, unless you have everyone on that network using the same weather and same scenery. Model matching could be an issue on either side so it's also not that easy.


okay, I understand this reason. Just thought there could be a method to "force" an object to be displayed on ground level. Maybe there is a property indicating an aircraft is on ground level?
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby CaptB » Tue Jul 11, 2017 8:56 pm

OE-PH1 wrote in Tue Jul 11, 2017 6:42 pm:okay, I understand this reason. Just thought there could be a method to "force" an object to be displayed on ground level. Maybe there is a property indicating an aircraft is on ground level?



I suppose you could force the other trafic to match your ground elevation if some conditions are met, for instance the aircraft is slower than x and y higher than altitude AGL. Since the positions are updated in VATSIM every 3 seconds, the pilot client has to do some interpolation so that the displayed traffic moves smoothly, so it's already done in a way. I suspect that vpilot might be clamping aircraft altitude to AGL(edit: or elevation AMSL?) already since I have rarily experienced the phenomenon since switching from FSinn.
Ongoing projects(3D modelling): A320, MD-11, A350, B767
FG767: https://fg767.wordpress.com/
CaptB
 
Posts: 685
Joined: Thu May 23, 2013 7:36 pm
Callsign: EKCH_AP
IRC name: CaptB
Version: next
OS: Xubuntu

Re: Vatsim in FG

Postby OE-PH1 » Wed Jul 12, 2017 10:05 pm

Flight EDDL -> LOWI
at EDDL the VATSIM aircrafts were too high, at LOWI they were nearly on ground.
strange...
I am a member of the A330 dev team
User avatar
OE-PH1
 
Posts: 153
Joined: Sun Oct 26, 2014 2:14 pm
Location: LOWI
Callsign: OE-PH1
Version: 2016.4
OS: Win10

Re: Vatsim in FG

Postby www2 » Sat Jul 15, 2017 7:15 pm

@OE=PH1 That is normal for flightsim networks with different sim's.
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: Vatsim in FG

Postby Hooray » Sat Jul 15, 2017 7:20 pm

you would need to add/write a piece of middleware/script to "patch" (fix up) elevation data between different simulators - i.e. using stuff that should be constant, to match up other data - for instance, by using different airport locations, runway positions and altitudes to interpolate between them and come up with sane "offsets". It's not exactly accurate to do obviously, but also not exactly rocket science - basically the middleware would look at the corresponding sim specific data and compute appropriate offsets so that terrain/elevation and altitudes seem mostly plausible
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

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 9 guests