Board index FlightGear Support Tools FGCom

FGCOM server discriminates the low countries ;)  Topic is solved

FGCom is a realtime voice communication system specially designed for FlightGear.

FGCOM server discriminates the low countries ;)

Postby PH-JAKE » Tue Apr 08, 2014 7:57 am

:wink:
FGCOM server, or actually the phonebook generation, cannot handle airports below sea level.
When looking at phonebook.txt I found nothing (or incorrect manualy added entries) for EHAM. Studying gen_phonebook.pl showed me why. When outputing records in phonebook.txt it needs the ICAO name of the airport. This is taken from apt.dat records tagged '1'. For Amsterdam Airport this is:
Code: Select all
1      -11 1 0 EHAM Schiphol

Notice the elevation -11 (yes it is below sea level, imagine that :shock:).
The Perl code to parse (get your regexp cheatsheets out) the airport is this (where $z contains the line):
Code: Select all
elsif($z=~/^1\s+\d+\s+[01]\s+[01]\s+([A-Z0-9]+)\s+(.+)$/)

This does not match for airports below sea level, hence an airport code is never fetched, hence no comm stations are written to phonebook.txt.
To solve this ammend the regexp like this:
Code: Select all
elsif($z=~/^1\s+-?\d+\s+[01]\s+[01]\s+([A-Z0-9]+)\s+(.+)$/)

With the addition of the '-?' before the elevation it doesn't matter anymore if it's above or below sea level.

So, If anyone can pick this up or point me in the right direction where to have this fixed, much obliged.
PH-JAKE
 
Posts: 108
Joined: Tue Mar 11, 2014 11:53 pm
Callsign: PH-JAKE
Version: 2016.2.1
OS: Debian jessie

Re: FGCOM server discriminates the low countries ;)  

Postby F-JJTH » Tue Apr 08, 2014 10:37 am

Hi,
This has been fixed 5 months ago: https://gitorious.org/fg/flightgear/com ... 641874e80a
Also this has been discussed here: viewtopic.php?f=32&t=21309&p=193961#p193961

If you still have this bug I guess it's because you are still using the old FGCom coming from the old and no longer maintained repo https://gitorious.org/fg/fgcom (well we should remove it in order to avoid this confusion)
You should definitely switch to the new, updated and maintained FGCom delivered with FlightGear 3.0 or http://fgcom.flightgear.org/download/

A documentation is also available: http://wiki.flightgear.org/FGCom_3.0

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

Re: FGCOM server discriminates the low countries ;)

Postby PH-JAKE » Tue Apr 08, 2014 2:05 pm

F-JJTH wrote in Tue Apr 08, 2014 10:37 am:Hi,
This has been fixed 5 months ago: https://gitorious.org/fg/flightgear/com ... 641874e80a
Also this has been discussed here: viewtopic.php?f=32&t=21309&p=193961#p193961

If you still have this bug I guess it's because you are still using the old FGCom coming from the old and no longer maintained repo https://gitorious.org/fg/fgcom (well we should remove it in order to avoid this confusion)
You should definitely switch to the new, updated and maintained FGCom delivered with FlightGear 3.0 or http://fgcom.flightgear.org/download/

A documentation is also available: http://wiki.flightgear.org/FGCom_3.0

Regards,
Clément


Ok, that was unexpected. Indeed it looks as though gitorious/fg/fgcom is the current repo, with somewhat recent activity. The fact that fgcom (also the server part?) has become an integral part of FG, found in fg/flightgear/utils isn't inherently clear.
Anyways, good to see that it's already addressed. I noticed that the script itself was expanded to handle (yet to be defined) heliports and seaports as well. These still suffer from the same problem (although seaports with a negative elevation would be interesting :shock:) and should have their regexp fixed also.

What is/was the use of phonebook.txt anyway, since currently phonebook.txt generation has been disabled?
PH-JAKE
 
Posts: 108
Joined: Tue Mar 11, 2014 11:53 pm
Callsign: PH-JAKE
Version: 2016.2.1
OS: Debian jessie

Re: FGCOM server discriminates the low countries ;)

Postby F-JJTH » Tue Apr 08, 2014 5:30 pm

PH-JAKE wrote in Tue Apr 08, 2014 2:05 pm:What is/was the use of phonebook.txt anyway, since currently phonebook.txt generation has been disabled?

Technically: nothing. The only use that I found was to have a human-readable file of frequencies/icao.

I've updated the description of the old FGCom repository, hoping it's more clear now.

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

Re: FGCOM server discriminates the low countries ;)

Postby PH-JAKE » Tue Apr 08, 2014 6:23 pm

Perfect, thanks for the update.
PH-JAKE
 
Posts: 108
Joined: Tue Mar 11, 2014 11:53 pm
Callsign: PH-JAKE
Version: 2016.2.1
OS: Debian jessie


Return to FGCom

Who is online

Users browsing this forum: No registered users and 2 guests