FGCom (before 3.0): Difference between revisions
m (→Install on Linux: change link to Tuxlock FGCOM-GUI) |
|||
Line 61: | Line 61: | ||
*'''Installation:''' http://wiki.flightgear.org/index.php/Scripted_Compilation_on_Linux_Debian/Ubuntu | *'''Installation:''' http://wiki.flightgear.org/index.php/Scripted_Compilation_on_Linux_Debian/Ubuntu | ||
<br> | <br> | ||
'''3) Compiling it locally''' | '''3) Compiling it locally: ''' http://code.google.com/p/fgcomgui/wiki/Linux_Installation | ||
*'''Advantage:''' After a successful installation it is integrated into the system like a package from the distributor. | *'''Advantage:''' After a successful installation it is integrated into the system like a package from the distributor. | ||
*'''Disadvantage:''' No automated maintenance available. Also the user should have some basic knowledge of his system and it's devices. | *'''Disadvantage:''' No automated maintenance available. Also the user should have some basic knowledge of his system and it's devices. | ||
*'''Installation:''' | *'''Installation:''' See the Instruction on: http://code.google.com/p/fgcomgui/wiki/Linux_Installation | ||
<br> | <br> | ||
'''Then continue with testing on: ''' http://wiki.flightgear.org/Index.php/FGCOM_Testing | |||
<br> | <br> | ||
Revision as of 10:31, 9 March 2010
FGCom is an addon for FlightGear. With FGCom (and the infrastructure behind it), FlightGear now has a realtime voice communication system which enriches the FlightGear capabilities, especially for Multiplayer events, like:
- flying in groups (see e.g. the Forum Multiplayer Events on http://www.flightgear.org/forums/):
- invite friends to a guided sightseeing tour in your most beloved area or do “Fly In's”
- do military training like “Air-Air-Refuelling”, “Dog fights”, “Escort flights”, etc.
- offering additional services at an airport like ATC, Snowplows, Pushbacks, Racing-Events etc.
- have a real time flighttraing (e.g. pilot in Hongkong, teacher in Sydney) or do Glider-towing or just ask for on-line support during flight or just ask somebody flying a plane of interest about specifics
- or e.g. just sit in a cockpit in Germany while sightseeing San Francisco in a C172, voice-chatting with a Texan in a plane I dreamed of as a boy (Super Constellation), and both getting informations from a New Zealand guy (it shall be a wonderful island – but do real people live there? He said: Yes!!).
- etc.
You can even use it in models without radios - just use the standard FlightGear menu --> Equipment --> Radio Settings.
In the future FGCom surely will extend further and surely will get a “Speech to Text” capability in order to also integrate the Text-based automated ATC-routines inside FlightGear.
The Client installation
Prequisites
Hardware Requirements
If you are satisfied with the operation and responsetimes of your current FGFS installation, then you should see no significant difference after adding the FGCom. If your FGFS installation runs already a little marginal, then you might experience some delays when many new airplane-models etc. must be loaded. This may happen when starting up at a busy airport. You can monitor/verify such a "short-time overload" in the FGFS command-window.
For details see the FGFS common hardware and driver requirements on http://www.flightgear.org/hardwarereq.html
Of course you will also need a connection to the Internet for this real-time, worldwide voice communication.
Software Requirements
FGFS | The basic Flight-Gear-Flight-Simulation installation. This must be installed prior to installing the FGCom (except if installing the Linux "CVS complete" version which can install FGCom and FGFS concurrently). |
Multiplayer | “Multiplayer” is not an installable program but an integrated function of the FGFS. As the name says, it enables communication of several players via a chat-function (until now per keyboard - now also with this vocal interface: FGCom). |
Nice to have
FGrun | This FlightGear Launch Control (also known as FG-Wizard), is a graphical front end to start the FGFS. This makes it very easy to startup the FGFS with all it's possible options. In some newer distributions this is already part of the basic FGFS installation package |
MPMap | MPMap is a pure browser application based on Google Maps, so it does not need any installation, except a Web-Browser. With MPMap you can watch all Multiuser-planes worldwide on a road-map, satellite picture or a composite of both. It includes most of the airports, navigational aids, and current weather informations. So it can be used for preflight planning, without having the FGFS started or even installed. But it needs a constant connection to the INTERNET - on the other hand you can do your preflight planning anywhere where there is a PC, connected to the INTERNET. |
Runwayfinder | This standalone Browser-Application( http://www.runwayfinder.com ) does present a fantastic Fight-Planning tool, showing similar aspects like the "MPMap" but adds an Aeronatical map. It does not link to FGFS or MPMap or Multiplayer -- and covers only the domestic USA. |
Atlas | Atlas displays the current position of your airplane on an landscape type of map together with navigational informations. It derives its data direct out of the installed FGFS databases. So you do not need any connections to the INTERNET. |
Festival | Festival is a TTS (Text To Speech) system that can convert all in the FGFS displayed written text (ATC, Chat, etc.) into speech and put it on your loudspeakers. ref.: http://www.flightgear.org/Docs/getstart/getstartch5.html#x10-790005.6 |
Installing FGCom
Install on Linux
For Linux-Systems there are 3 ways to install:
1) Downloading from the “Distributor” (Debian, Ubuntu, Red Hat, Suse, etc.).
- Advantage: This is the easiest way and ensures that maintenance and services for this package and all concurrencies to it are provided automatically for a reasonable time-frame.
- Disadvantage: The availability of those packages is usually very late and most Distributors do not cover all FGFS-features. To our knowledge none of the Distributors has an FGCom package available as of March 2009.
- Installation: Follow the usual procedures of your distributer on how to install additional packages.
2) Installing a “CVS complete”
- Advantage: It is the very easiest form of installation and installs in one step all prerequisite/companion modules (FGFS, FGrun, FGcom, PLIB, OSG, Simgear, AT). Also it can be added and removed from the system without disturbing the rest of the system (Libraries, Menus, Structures, etc.). It was tested on several Ubuntu and Debian systems.
- Disadvantage: No automated maintenance available. The handling is a little different from the standard Menu-driven practice.
- Installation: http://wiki.flightgear.org/index.php/Scripted_Compilation_on_Linux_Debian/Ubuntu
3) Compiling it locally: http://code.google.com/p/fgcomgui/wiki/Linux_Installation
- Advantage: After a successful installation it is integrated into the system like a package from the distributor.
- Disadvantage: No automated maintenance available. Also the user should have some basic knowledge of his system and it's devices.
- Installation: See the Instruction on: http://code.google.com/p/fgcomgui/wiki/Linux_Installation
Then continue with testing on: http://wiki.flightgear.org/Index.php/FGCOM_Testing
Install on Windows
Please use the Windows-Installation description on http://wiki.flightgear.org/index.php/FGCOM_for_Windows
Install on Mac
You can download the "MAC OSX Binary" from the FGFS download-center ( http://www.flightgear.org/Downloads/binary.shtml#mac ). The current version of the code does contain the FGCOM.
But you do need OS X 10.5 as prerequisite. With lower versions you will end up with a generic "bus error" message!
Testing
During testing
- we will test the basic FGCOM-functions without the FGFS
- after that we test the FGCOM together with the FGFS
- finally we test/adjust the Microphone and Loudspeaker system
For these tests please see the FGCOM_Testing
Functional Test + User Briefing
Experiences pointed out, that the cooperation FGCom/FGFS works more reliable, if the FGFS gets started first. So we will start with setting up a flight-test-environment:
Start the FGFS
We suggest to use the FGrun (FlightGear Launch Control) to define required and/or proposed settings, in order to avoid typo-errors etc. If you keep the “Show command line” active (compare item 3 following), you also get the correct writing for all the command-options (in case you later want to start from a command-line and/or out of a script). In the following we will just point out those commands which are significant for the FGCom-operation:
If you don't have an Icon available to start the FGrun, then
- use a command-window
- change into the directory in which FGFS was installed
- and start the program from there:
for linux CVS e.g.: | cd ~/fgfs sh ./run_fgrun.sh | |
for Std. Linux e.g.: | fgrun | |
for Windows e.g.: | D: cd 'C:\Program Files\Flightgear\win32' fgrun.exe | |
for Mac: |
Wait for the Program-Window to start and then define:
1) Start by choosing an airplane. For this first try we suggest the c172p, so we have a common understanding in the following. Also be aware of some airplane-designers reassigning keyboard-keys (e.g. the “space-bar”), thus you may not have the PTT-key (“Push To Talk”) available. See FGCOM#Tips and Tricks
→ Click “Next”
2) As starting place please define the airport KPAO (Palo Alto) runway 13, so we all see the same messages in the following reports. A second reason for KPAO is of course that KPAO comes already with the basic scenery-package, and thus is available for everybody.
→ Click “Next”
3) Define the Multiplayer options: (ref. wiki Howto: Multiplayer for details)
“AI models” must be activated in order to see all traffic
|
→ Click “Advanced”
4) In the “Advanced Options” check the following sections (click/select them in the left column):
- General: Those settings were defined before. Check “Control”, if needed select your input device (Joystick, Keyboard, or Mouse).
- Features: “AI Traffic” should be activated already
- Initial Position:
You may define here an unique “starting/parking” position outside a runway. Thus you could avoid starting on top of another player, because most of them pile up at the end of a runway. You can look up a position in the MPMap: (see next item)
|
Open http://mpmap01.flightgear.org
|
5) Network:
Those data you have already predefined on the Base-Page. But in case you have network-problems (may be due to many PC's on a home-network with even more LAN-cards) you may specify here your actual IP-Adress.
|
If you need to define the unique IP-Address, open a command-window and type
OS | to type | Cap. | returned values |
for linux: | ifconfig | eth0 |
Link encap:Ethernet HWaddr 00:1d:92:80:a6:ab
|
for Windows: | ipconfig /all | et |
Physikalische Adresse . . . . . . : 00-16-E6-40-AB-BF
|
for Mac: |
The 192.168.178.23 (or 20) is the number you would have to input between the two commas. Be very careful and double-check that you do not mistype “.” and “,”!!
6) Input/Output:
You do need a "generic" line as shown, because this defines the interface between FGFS and FGCom.
|
7) Avionics: let's define:
Nav1: | 114.10 | San Jose VOR | |
Nav2: | 115.80 | SF VOR | |
ADF: | 379 | Brijj, beacon at SF |
and activate: DME to Nav1
There is no field to input COM-radios, but remember them for setting them later manually:
Com1 | 118.60 | Paolo Alto | |
Com2 | 120.50 | San Francisco |
8) Properties:
Here you can define any presetting for any values in the FGFS.
see e.g.: FGFS-menu-bar --> File --> “Browse Internal Properties”
e.g. I personally do not want the plane to start rolling without me telling it to. So I set the parking break as default at startup.
|
Hit “OK” → “Run” and watch the FGFS starting. If screen-place allows you may want to pull the shown "FGFS Report-Window" to the side and watch how busy your PC is while loading the other multi-player models.
Start the FGCom
Open a command-window and change into the directory in which FGCom was installed (probably the same as the FGFS) and start the FGCom. Do not use any other options than the server address “-Sfgcom.flightgear.org.uk”:
for linux CVS e.g.: | cd ~/fgfs sh ./run_fgcom.sh |
for this “CVS complete” you do not need to specify the server address, because it is embedded in the script-file. |
for Std. Linux e.g.: | fgcom -Sfgcom.flightgear.org.uk | "-Sfgcom..." with capital "S" |
for Windows e.g.: | cd 'C:\Program Files\Flightgear\win32' fgcom.exe -Sfgcom.flightgear.org.uk |
"-Sfgcom..." with capital "S" |
for Mac: |
For the following test position this command-window somewhere, where you can monitor it throughout the test.
The first response should be:
/fgcom - a communication radio based on VoIP with IAX/Asterisk (c)2007 by H. Wirtz <wirtz@dfn.de> Version 1.2.2 build 206M Using iaxclient library Version SVN 206M Successfully parsed command-line options. Reading list of airports...done. Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org.uk
If your printout up to that line is different go back to chapter Test the basic function
1) If, due to a prior flight, COM1 was set to anything else but 118.600 (e.g. to 119.650) you will see the following 2 lines added to the initialization of the FGCom-window: | |
Selected frequency: 119.650 Call rejected by remote |
Instead of “119.650” there will be shown the last used frequency. In this case the source of the nearest ATC-Freq. 119.650 is more than 50km away from your actual position of the airplane, so FGCom rejects a connection to it. If the last frequency used would have been within 50 km you get an indication very similar to the next item. |
2) Switch COM1 to 118.60 (needed at Palo Alto): | |
Selected frequency: 118.600 Hanging up call 0 Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.6 km) Call 0 accepted Call 0 answered Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.6 km) |
This last line will be repeated according the to time span you defined in the “Input/Output” command “--generic=socket,in,10,,5500,tcp”, you may change that value later according to your preferences. |
3) Press your PTT (PushToTalk on space-bar and joystick, as available): | |
[SPEAK] unmute mic, mute speaker [LISTEN] mute mic, unmute speaker [SPEAK] unmute mic, mute speaker [LISTEN] mute mic, unmute speaker |
Only in between “SPEAK” and “LISTEN” you are able to talk to others. |
Now lets set/verify the other Radios:
4) Pressing Upper+Space will switch to the next radio: NAV1 | |
Radio-Select: NAV1 Selected frequency: 114.100 Hanging up call 0 Call rejected by remote [LISTEN] mute mic, unmute speaker |
Compare this to the NAV2 indication 2 steps later: something is wrong – and it wasn't your fault: Although this NAV is valid (see ...FGFS/data/Airports/apt.dat.gz), it is missing in the FGCom listing .../FGCom/positions.txt. I encountered this problem several times, as well for Airports as also for VOR's. If this happens with your most beloved airport you can add those missing data with a text-editor. But before changing be sure to save the original data somewhere - just in case! |
5) Pressing Upper+Space once more switches to COM2 | |
Radio-Select: COM2 Selected frequency: 120.500 Airport San Francisco Intl (KSFO TWR at 120.500 MHz) is in range (29.1 km) [LISTEN] mute mic, unmute speaker Call 0 accepted Call 0 answered |
That looks OK: San Francisco is about 29 km away watch the “km” instead of miles! 10 km = 6.2137 mi |
6) Pressing Upper+Space once more switches to NAV2 | |
Radio-Select: NAV2 Selected frequency: 115.800 Hanging up call 0 Airport SAN FRANCISCO VOR-DME (SFO VOR at 115.800 MHz) is in range (28.5 km) Call 0 accepted Call 0 answered [LISTEN] mute mic, unmute speaker |
And Yes: The SF VOR is just a little closer than the airport(center) |
7) Pressing Upper+Space once more brings back COM1: | |
Radio-Select: COM1 Selected frequency: 118.600 Hanging up call 0 Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.6 km) Call 0 accepted Call 0 answered [LISTEN] mute mic, unmute speaker | |
8) Lets us start and continue flying in the direction about 130°: | |
Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.4 km) Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.2 km) Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 0.7 km) Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 1.3 km) Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 1.9 km) Airport Palo Alto (KPAO Tower at 118.600 MHz) is in range ( 2.4 km) |
notice that you first come closer (to the center of the airport) and after that getting away |
9) Let's switch to COM2 (San Francisco) and watch: | |
Radio-Select: COM2 Selected frequency: 120.500 Airport San Francisco Intl (KSFO TWR at 120.500 MHz) is in range (37.8 km) Call 0 accepted Call 0 answered [LISTEN] mute mic, unmute speaker Airport San Francisco Intl (KSFO TWR at 120.500 MHz) is in range (38.6 km) Airport San Francisco Intl (KSFO TWR at 120.500 MHz) is in range (39.5 km) .. Airport San Francisco Intl (KSFO TWR at 120.500 MHz) is in range (49.7 km) Hanging up call 0 Radio-Select: NAV2 Selected frequency: 115.800 Call rejected by remote [LISTEN] mute mic, unmute speaker |
That means: at about 50KM we are getting out of range and thus the on COM2 active SF getts terminated. Notice that also the inactive NAV2 gets terminated, because it exceeded the allowable range at about the same time! |
10) You could turn now and watch the opposite: At about the same distance those two will become active again (automatically, if you did not change the settings).
If you got here without any (technical) problems your FGCom is fully functional. Have fun when using it.
Using FGCom
There are basically 3 types of FGCOM-usage: (ref. the introduction to this wiki-page]]):
- Normal usage at airports: i.e. You set your radio to the airport as usual. Thus you are set up for the usual ATC-(keyboard)-procedures (either through the "'" (UpperCase#) and/or the Chat-Menus). In addition you then can talk to anybody in a radius of about 50 km (about 30 miles) around the airport, may that be friends, a maintained FGCOM-ATC/Twr-Operator, airport utilities, etc.. Be aware that as of April 2009 only very few planes are using the FGCOM for ATC-purposes - thus you should always use the ATC-Chat "keyboard"-procedures to announce arrivals/departures/taxiing etc. in addition. (We hope that may change in some future!)
- The AirToAir frequencies (122.75 and 123.45) are ideal for all Multiplayer events. They are without any range-limitations - and not yet "overcrowded!). Also when traveling you might want to listen on the 122.75 for others who want to contact you (or reverse). When there is much "talk" on the 122.75 you might just arrange with your partner to switch to 123.45 - and return to 122.75 afterward. As of April 2009 the 122.75 is already operational for this application, the 123.45 will follow soon. You may try from time to time if this limitations still exist.
- Finally you can manipulate the frequency-tables (positions.txt in your FGFS/FGCOM local directory) and define an own frequency for special events. e.g. a Flight-School at one airport with maybe multiple student-groups. Of course those are local manipulations on your own PC, which you have to agree on with your (planned to be) partners in advance.
Supplemantery Informations
Tips and Tricks
- For windows you can use "WordPad"
- For Linux the "gedit" works fine
- goto this page: ( http://wiki.flightgear.org/index.php/FGCOM )
- to copy:
- select in the Browser-Menu: "File" --> "Save Page as.. "
- to print:
- select the last entry in the sidebar on the left: "Printable version"
- Then I suggest: Menu --> File --> "Page Setup": Set to "Landscape" --> "Apply"
- before printing I recommend: Menu --> File --> "Print Preview" and you see those many many pages!
- If you really want to wast that paper: Menu --> "File" --> "Print" and it will print on your favorite printer
- for standard deviations:http://www.timeanddate.com/worldclock/custom.html?sort=1
- for direct conversions: http://www.timezoneconverter.com/cgi-bin/tzc.tzc
- March, 2009:
- 18 November, 2008:
- 31 October, 2008:
- 19 June, 2008: Currently the server is down due to hardware problems. It is unknown when the service comes back because he currently has no time to fix the problems.
- 22 November 2007: Due to heavy development at this time there may be some differences between the information on the web pages and the installation. Please follow the discussions on the FlightGear development list!
Airport missing in FGCom:
In case your favorite airport does not show up in the FGCOM (command-window), although you can tune your COMM to it, you can add it to your data-file “positions.txt” in your fgcom directory. See e.g. the line
KSFO,120.500,37.616630,-122.385478,TWR,San Francisco Intl
You can add extra lines for any locations you want. e.g.: (watch the separation comas)
apt-code = DUMY (a "dummy" or your favorite, but missing, airport code) KHz = take it out of your “FGFS-home/data/Airports/apt.dat.gz” or just take one of which you are sure that you do not need it in the FGFS-reality (notice that several Airports (far apart) use same frequencies! long/lat = take out of the Mpmap (or Google Map) type = whatever name = whatever
(of course those definition are only known to your own PC and last only until the next data update!)
Editing FGCOM-Data-Files
If you edit Textfiles (e.g. Radio-listings) or xml-files you might not see line-endings when using your standard editor.
Copying-Printing this WIKI-Page
If you absolutely want to have a local copy of this on your PC or need a hard-copy, then:
Joystick compatibility between Operating Systems:
ref also: Joystick
You may use the same joystick-definitions across all Operating-Systems: But you may need to change the assigned numbers - your joystick-vendor might have done that for you already. Check e.g. (Unix, Mac, Win having assigned different "numbers"):
<axis> (instead of the usual <axis n=”3”> ) <desc>Mixture</desc> <number> <unix>3</unix> <mac>5</mac> <windows>5</windows> </number> <binding> <command>nasal</command> <script>controls.mixtureAxis()</script> </binding> </axis>
assign PTT to Joystick and PTT
If you want to assign the PushToTalk function to your joystick, add the following (for n you have to find your own number!)
<button n="x"> <desc>PTT - Push To Talk</desc> <binding> <command>nasal</command> <script>controls.ptt(1)</script> </binding> <mod-up> <binding> <command>nasal</command> <script>controls.ptt(0)</script> </binding> </mod-up> </button>
Helpfull INTERNET Adresses
World-Time:
Especially for multiplayer events you should define all times in the internationally used GMT (Greenwich Meantime). Just pick up your deviation from GMT and memorize it. If everybody does it, we could avoid a lot of misunderstandings.
Decimal to Degree http://www.hbnweb.de/mathematik/grad-dezimal.html
Some programs need Decimal Lon/Lat values, others the Degrees/Minutes/Sec. Just convert it.
Miles, km, feet, etc. etc. ...: http://www.convertunits.com/
If like to avoid troubles (like e.g. NASA lost a satellite because of it) just look it up.
Ports needed
In case of problems over the INTERNET you might check that the the following ports are allowed:
1314 TCP if the Festival-Server is used for Text/Sound 2005 UDP Vcp-Stream 4569 UDP FGCom VoIP, (Inter-Asterisk eXchange) 5000 UDP in/out Multiplayer (VPN Sftw.) 5001 UDP Enable HTTP-server 5002 UDP Enable property server 5003 UDP Enable Screen-Shot services 5004 UDP (may be used as a spare) 5505 UDP Terra Sync 16661 UDP FGCom listening to FGFS, usually “local host” only
Also consider that some modern modems do already provide a firewall. If in addition to that you use a local firewall in your PC, than you might expect an unhealthy competition between those two concurrent firewalls. In case of problems you should deactivate one of those (usually the one inside the PC, especially if several PCs are connected via that modem).
Commandline Parameters
fgcom --help
returns the following useful info
fgcom - a communication radio based on VoIP with IAX/Asterisk (c)2007 by H. Wirtz <wirtz@dfn.de> Version 1.2.2 build 163M Using iaxclient library Version SVN 163M OPTION DESCRIPTION -d, -debug, --debug= show debugging information -S, -voipserver, --voipserver= voip server to connect to (default: 'fgcom1.parasitstudio.de') -s, -fgserver, --fgserver= network device to connect to (default: 'localhost') -p, -port, --port= where we should listen to FG (default: '16661') -a, -airport, --airport= airport-id (ICAO) for ATC-mode -f, -frequency, --frequency= frequency for ATC-mode -U, -user, --user= username for VoIP account (default: 'guest') -P, -password, --password= password for VoIP account (default: 'guest') -i, -mic, --mic= mic input level (0.0 - 1.0) -o, -speaker, --speaker= speaker output level (0.0 - 1.0) -b, -mic-boost, --mic-boost= enable mic boost -l, -list-audio, --list-audio= list audio devices -r, -set-audio-in, --set-audio-in= use <devicename> as audio input -k, -set-audio-out, --set-audio-out= use <devicename> as audio output -c, -codec, --codec= use codec <codec> as transfer codec (default: 'u') Available codecs: u - ulaw (default and best codec because the mixing is based onto ulaw) a - alaw g - gsm s - speex 7 - G.723 Mode 1: client for COM1 of flightgear: $ fgcom - connects fgcom to fgfs at localhost:16661 $ fgcom -sother.host.tld -p23456 - connects fgcom to fgfs at other.host.tld:23456 Mode 2: client for an ATC at <airport> on <frequency>: $ fgcom -aKSFO -f120.500 - sets up fgcom for an ATC radio at KSFO 120.500 MHz Note that /home/hcs/src/fgcom/trunk/src/fgcom starts with a guest account unless you use -U and -P!
Also note that the current server (fgcom.flightgear.co.uk) works with guest account, so do not use -U or -P
Server installation
For running a FGCOM server you need Asterisk and depending on the amount of users much bandwith and CPU power. Because of putting pilots and ATCs in a VoIP conference the server-admin has to assure that there is enough network and cpu power to avoid drop-outs of the voice stream.
Prerequirements
Install Asterisk on top of your favorite distribution. Please refer to installation manuals (e.g. [[1]]) you can find on the net. You do not need H.323 or SIP because the fgcom client uses IAX2 as VoIP signaling protocol. Only if you think about connecting external VoIP applications to FGCOM you should consider to activate H.323 or SIP (but this is not the scope of this small howto).
Notice: You need to install the zaptel driver modules - even if you won't use any hardware for telecom interfacing. You need the ztdummy kernel module for the asterisk conference application MeetMe() because it simulates a hardware clock needed by this application. Further development of FGCOM might use app_conference which don't needs any timing device.
For now we want to use /etc/asterisk as the base configuration directory.
Setting up the radio frequencies
The radio frequencies are "simple" Conferences and realized due to the Asterisk application MeetMe().
Part 1: General configuration
First you have to set up the general configuration of the system. Put the following at the top of your "extensions.conf" file:
[general] static=yes writeprotect=yes ; [globals] ; [macro-com] exten => s,1,Answer() exten => s,n,MeetMe(${MACRO_EXTEN},qd) exten => s,n,Hangup() ; [macro-echo] exten => s,1,Answer() exten => s,n,Echo() exten => s,n,Hangup() ; [guest] ; ATC-Help exten => 01-ZZZZ-911.000,1,Macro(com) exten => 012525252591100,1,Dial(Local/01-ZZZZ-911.000) exten => 01-ZZZZ-910.000,1,Macro(echo) exten => 012525252591000,1,Dial(Local/01-ZZZZ-910.000) ; [default] include => guest ; ; Code: ; 01 - FlightGear ; 02 - Microsoft Flight-Simulator ; 03 - ... ; ; Air2Air exten => 01-ZZZZ-123.450,1,Macro(com) exten => 012525252512345,1,Dial(Local/01-ZZZZ-123.450) exten => 01-ZZZZ-122.750,1,Macro(com) exten => 012525252512275,1,Dial(Local/01-ZZZZ-122.750)
Part 2: Adding your favorite (all?) frequencies
For this you have simply to create an extension for every touple of airport/frequency in extensions.conf. The following is an example for Berlin-Tempelhof (EDDI). The information comes from the file "apt.dat.gz" of your FlightGear installation.
; EDDI ATIS 126.020 - Berlin Tempelhof exten => 01-EDDI-126.020,1,Macro(com) exten => 010403030812602,1,Dial(Local/01-EDDI-126.020) ; ; EDDI BERLIN DEP 120.620 - Berlin Tempelhof exten => 01-EDDI-120.620,1,Macro(com) exten => 010403030812062,1,Dial(Local/01-EDDI-120.620) ; ; EDDI BERLIN DIRECTOR 121.120 - Berlin Tempelhof exten => 01-EDDI-121.120,1,Macro(com) exten => 010403030812112,1,Dial(Local/01-EDDI-121.120) ; ; EDDI BERLIN ARR 126.420 - Berlin Tempelhof exten => 01-EDDI-126.420,1,Macro(com) exten => 010403030812642,1,Dial(Local/01-EDDI-126.420) ; ; EDDI GND 121.950 - Berlin Tempelhof exten => 01-EDDI-121.950,1,Macro(com) exten => 010403030812195,1,Dial(Local/01-EDDI-121.950) ; ; EDDI TWR 119.570 - Berlin Tempelhof exten => 01-EDDI-119.570,1,Macro(com) exten => 010403030811957,1,Dial(Local/01-EDDI-119.570) ; ; EDDI BERLIN DIRECTOR 136.100 - Berlin Tempelhof exten => 01-EDDI-136.100,1,Macro(com) exten => 010403030813610,1,Dial(Local/01-EDDI-136.100) ; ; EDDI TWR 118.100 - Berlin Tempelhof exten => 01-EDDI-118.100,1,Macro(com) exten => 010403030811810,1,Dial(Local/01-EDDI-118.100) ; ; EDDI BERLIN DEP 119.500 - Berlin Tempelhof exten => 01-EDDI-119.500,1,Macro(com) exten => 010403030811950,1,Dial(Local/01-EDDI-119.500) ; ; EDDI BERLIN ARR 119.620 - Berlin Tempelhof exten => 01-EDDI-119.620,1,Macro(com) exten => 010403030811962,1,Dial(Local/01-EDDI-119.620)
What does the above mean? There are two lines (three with the comment) for each frequency: The first one sets up an extension named "01-EDDI-119.500". Yes, for VoIP you can use textual extensions but be careful if you want to setup your Asterisk-Server with POTS (=Plain old telephone service). Therefor you need the second line which is the same as above but without dashes and the letters in the decimal representation of the ASCII Code. The second line does only a "rewrite" of the numerical representation to the textual one.
For setting up all airports you can write your own simple script. But this maybe also not needed in further versions of FGCOM.
After editing the extensions.conf file you have to reload the extensions file (e.g. "asterisk -rx extensions reload").
You can add further nice goodies to your extensions.conf: MorseCode() for morsing the code of the VOR (MorseCode() will only work in Asterisk >= 1.4), Recording of metar data and playing this recording back when using the frequency of the metar information, ...
Setting up user accounts
The user accounts are located in the file iax.conf (and perhaps also in sip.conf, but this is not necessary). The top of the file should look like this:
[general] bandwith=low disallow=lpc10 jitterbuffer=yes forcejitterbuffer=no tos=lowdelay autokill=yes disallow=all allow=alaw allow=gsm allow=ilbc allow=g726 allow=ulaw language=en maxauthreq=10 context=guest ; [guest] type=user username=guest context=guest qualify=yes callerid=Guest IAX User host=dynamic ;
You may want to disallow more codecs or want to allow additional codecs (such as speex). But have in mind that the internal mixing of the conferences are done in "ulaw". But "ulaw" needs about 80 kBit/s because it does no compression. So you have to think about what's better for you: less bandwidth (per user) and more CPU usage or more bandwidth (per user) and less CPU usage... you should also consider the "sound" of some codecs may not have the 'real radio sound'.
For each user you have to add a bunch of lines to your iax.conf file:
[<USERNAME>] type=user username=<USERNAME> secret=<PASSWORD> context=default host=dynamic nat=yes notransfer=yes
You just have to fill in the <USERNAME> and <PASSWORD>. After each change you have to reload the configuration (e.g. "asterisk -rx reload chan_iax2.so"). Perhaps you want to write scripts for automatic configuration and so on. But be warned: Further versions of fgcom may use the multiplayer servers for getting usernames and position data and you have to change your scripts.
Problems?
If you have problems you can contact me via email at "dcoredump AT gmail.com".
External links
Development
TODO
Status
Adding User-Informations for installing, using, maintaining FGCOM on different platforms.
Latest SVN (rev 163) has the compile problems fixed. Also we have a new server: fgcom.flightgear.org.uk. User accounts not required (ie. do not use -U or -P)
The latest SVN release at this time is the r149 which does not compile due to a constant that is not defined (STL_STRING). Such constant appears at line 57 in the file src/fgcom_init.cpp which is: #include STL_STRING
I guess that such constant must point to the STL library include file but I am not sure. I revert to the r148 SVN version which successfully compiles.
Command to get such version is: svn co -r148 svn://svn.dfn.de:/fgcom/trunk fgcom-r148