ATC-pie: Difference between revisions

3,895 bytes added ,  16 August 2015
New release: r6
(r5b update, and new custom text alias behaviour)
(New release: r6)
Line 8: Line 8:
| developedby            = Michael Filhol
| developedby            = Michael Filhol
| initialrelease        = February 1, 2015
| initialrelease        = February 1, 2015
| latestrelease          = July 30, 2015 (r5b)
| latestrelease          = August 16, 2015 (r6)
| writtenin              = Python3
| writtenin              = Python3
| os                    = Any
| os                    = Any
Line 20: Line 20:
'''ATC-pie''' is an [[air traffic control]] simulation program featuring solo training and a multi-player game mode to connect to [[FlightGear]] networks. It is essentially designed for realism, and simulates many features of real-life ATC tasks such as transponder identification, strip rack and sequence management, handovers to/from neighbouring controllers, ATIS recording, flight plan editing, routing and conflict solving.
'''ATC-pie''' is an [[air traffic control]] simulation program featuring solo training and a multi-player game mode to connect to [[FlightGear]] networks. It is essentially designed for realism, and simulates many features of real-life ATC tasks such as transponder identification, strip rack and sequence management, handovers to/from neighbouring controllers, ATIS recording, flight plan editing, routing and conflict solving.


ATC-pie is free and open source, programmed in Python3 for Qt5 hence system-independant, only both must be installed as well as the python3-qt5 bindings. That done, it is meant to work straight away, with no other resource to install or make/compile command to run. No need to install or update FlightGear, download scenery or fetch any external resource before it can run.
ATC-pie is free and open source, programmed in Python3 for Qt5 hence system-independant, only Python3 and its Qt5 bindings must be installed. That done, it is meant to work straight away, with no make/compile command to run or external resource to install (except for local tower viewing, which requires FlightGear and the appropriate scenery).


== Program features ==
== Program features ==
Line 39: Line 39:
* In-app session announcement facility to post on Lenny64's popular [http://flightgear-atc.alwaysdata.net ATC event page]
* In-app session announcement facility to post on Lenny64's popular [http://flightgear-atc.alwaysdata.net ATC event page]
* Ignore contacts
* Ignore contacts
<!--* Tower viewing (requires ''fgfs'')-->


Solo game mode:
Solo game mode:
Line 52: Line 51:
* Floatable, dockable and closable GUI panes: strips, radios, text chat, etc. (window layout saved)
* Floatable, dockable and closable GUI panes: strips, radios, text chat, etc. (window layout saved)
* Notification system combining selectable sounds, status bar messages and a time-tagged history
* Notification system combining selectable sounds, status bar messages and a time-tagged history
* General and airport-specific settings saved on close and restored on restart
* General and airport-specific settings and notepads saved on close and restored on restart
* Customisable colours
* Customisable colours
* Personal notepads saved across sessions


=== Radar and contact ===
=== Radar and visual contacts ===
Transponder contact:
Transponders:
* Mode-dependant behaviour (off, A, C, S) and choice of simulated mode for non-equipped aircraft models
* Full support and mode-dependant behaviour (off, A, C, S)
* Choice of simulated mode for non-equipped aircraft models
* Radar identification assistant (unique squawk link between radar pick-up and strip assignment detection)
* Radar identification assistant (unique squawk link between radar pick-up and strip assignment detection)
* Individual and general cheat modes to override XPDR settings or reveal those turned off
* Individual and general cheat modes to override XPDR settings or reveal those turned off


Radar scope:
Radar scope:
<!--* Multiple radar scopes-->
* Open multiple radar screens
* Custom radar background drawing and image display (e.g. to display real procedure charts)
* Custom radar background drawing and image display (e.g. to display real procedure charts)
* Variety of show/hide options for navigation points, vectors and route assignments, etc.
* Variety of show/hide options for navigation points, vectors and route assignments, etc.
* Point-to-point heading & distance quick measuring tool
* Quick point-to-point heading & distance measuring tool
* Custom text labels to annotate radar background
* Custom text labels to annotate radar background
Tower viewing:
* Real-time rendering of the airport scene from tower viewpoint, available in all game modes
* Internally started (requires ''FlightGear'' installed) or through connection to an external instance
* View controller pane and direct free look/zoom from the view
* Easy use of custom scenery and aircraft model addition/substitution


=== ATC management ===
=== ATC management ===
Line 101: Line 106:
{{Gallery
{{Gallery
|ATC-pie-screenshot-soloMode.png|Playing solo mode with three coloured racks
|ATC-pie-screenshot-soloMode.png|Playing solo mode with three coloured racks
|ATC-pie-screenshot-towerViewing.png|Tower viewing, following a departing aircraft
|ATC-pie-screenshot-radarIdentification.png|Radar identification marked in blue
|ATC-pie-screenshot-radarIdentification.png|Radar identification marked in blue
|ATC-pie-screenshot-LFPGcloseUp.png|Depiction of airport tarmac and objects
|ATC-pie-screenshot-LFPGcloseUp.png|Depiction of airport tarmac and objects
Line 162: Line 168:


==== Starting the program ====
==== Starting the program ====
Depending on your system and preference, you might be double-clicking, typing stuff or pulling your hair out. In any case what you need to start the program is to run a Python3 interpreter on the <code>ATC-pie.py</code> file in the top-level directory. To start at a chosen airport location, say with code ICAO, add a system command-line argument, which may look as simple as:
Depending on your system and preference, you might be double-clicking, typing stuff or pulling your hair out. In any case what you need to start the program is to run a Python3 interpreter on the <code>ATC-pie.py</code> file in the top-level directory. To start at a chosen airport location, say with code ICAO, add a system command line argument, which may look as simple as:
: <code>./ATC-pie.py ICAO</code>
: <code>./ATC-pie.py ICAO</code>


If no ICAO code is given, good old KSFO will be chosen as default. After a few seconds, you should see the main window appear with a radar scope and a depiction of your airport in the centre.
If no ICAO code is given, good old KSFO will be chosen as default. After a few seconds, you should see the main window appear with a radar scope and a depiction of your airport in the centre.


Additional command-line options are available:
Additional command line options are available:
* --'''mp-callsign'''=''callsign'' to set a network callsign directly, modifiable on MP connect (default: ICAOobs)
{| class="wikitable"
: FGMS callsigns for ATCs typically start with the ICAO code of the controlled airport or sector, and end with a hint on the provided service: twr, gnd... When choosing your callsign on MP connect, make sure it is unique, and note that FGMS restricts callsign length to 7 characters. :-(
! Option || Effect and argument specification || Default
* --'''fgcom-server'''=''server-address'' to change the server used by internal FGCom radio boxes (default: fgcom.flightgear.org)
|-
* --'''fgcom-ports'''=''port-spec'' to specify the local ports FGCom should use for internal FGCom radio boxes
| --tower-view-external=''host'' || Avoid running an internal FlightGear process for tower viewing, and specify a host on which a viewer is running. This may still be "localhost". || (none, start internal process)
: Specify a comma-separated port number list. The first one becomes reserved for echo test and ATIS recording while every other port will allow for an additional radio box in the game. Alternatively, enter a string of the form ''reserved''+''nboxes'' as a shortcut for a contiguous range of ports (default: 16665+4, i.e. 16665 for the reserved port, plus 16666 through 16669 for up to 4 radio boxes).
|-
| --tower-view-ports=''udp'',''telnet'' || Specify the tower view ports to send/connect to. These can be the same (UDP+TCP on same port), and are used whether the view is an child (internal), local or remote process. || 5010,5010
|-
| --add-view=''host'':''port'' || Register an additional FlightGear instance to forward MP/solo game packets to. This option can be repeated. || (none)
|-
| --views-send-from=''port'' || Specify the local UDP port number to bind for sending FGMS packets to views. This includes all views, whether tower or additional views, but not the multi-player connection || 5009
|-
| --fgcom-server=''address'' || Change the server used by internal FGCom radio boxes. || fgcom.flightgear.org
|-
| --fgcom-ports=''list-spec'' || Specify a comma-separated list of port numbers for internally started radio boxes. The first one becomes reserved for echo test and ATIS recording while every other port will allow for an additional radio box in the game. Alternatively, enter a string of the form ''reserved''+''nboxes'' as a shortcut for a contiguous range of ''nboxes''+1 ports. || 16665+4 (port 16665 reserved, plus 16666 through 16669 for up to 4 radio boxes)
|}


If running ATC-pie for the first time and intending to use the radio, check the FGCom version setting (''System'' menu). Try an echo test and read the <code>resources/fgcom/Notice</code> file.
==== Running for the first time ====
A few things you can do when running ATC-pie for the first time:
* If you intend to use the radio like you should in multi-player games, check the FGCom version setting in the ''System'' menu, and try an echo test. Read the <code>resources/fgcom/Notice</code> file if you have problems hearing yourself, and check the FAQ section in this article.
* If you want to use the tower viewing system and not bother making it external (see feature note below), make sure you have the right command set for your FlightGear installation, as well as the scenery directory if you have one to enter.


=== Feature notes ===
=== Feature notes ===
This section describes a few major features. See more exhaustive list at the top of this article.
This section describes a few major features. See more exhaustive list at the top of this article.
==== Background drawings ====
Background drawings allow to decorate radar scopes with all sorts of maps and useful information about the airspace, terrain or procedures.
There are two ways of drawing in the radar background. One is to import image files with transparency, the other is to write a text drawing specification file to draw coloured lines and label points. This allows to import anything from the most complex coloured height map to the the most schematic airspace outline. All images are positioned and drawings points specified using lat/lon coordinates or navpoints in radar range. The <code>resources/bgdrawings/Notice</code> file explains how to import and create background drawings.
For example, you can map out SID/STAR routes with one image per published chart, named by procedure and associated runways to make in-game selection easy. If you want more than schematic line plots of the procedures, the best way is certainly to draw the images yourself with good enough resolution, e.g. with Gimp. Superimpose a drawing layer on top of a real map canvas, or over a screenshot of your ATC-pie radar with pinned navaids as landmarks. If you have proper to-scale documentation, it is worth trying the command below (requires ''ImageMagick'') to turn the white background of a ready published chart into transparency, and checking if the rendered images are acceptable and zoom-resistant enough.
:<code>convert -transparent white input-file.png output-file.png</code>
Use the image positioning helper tool in the ''System'' menu if you want to adjust image corners visually rather than programmatically. All visible pixmap drawings will be moved simultaneously, so you can work with several at a time if you need to. On dialog box close, a file is generated in the <code>output</code> folder for you to open and copy/edit, or use as a direct substitution.
==== Multi-player strip exchange (handovers) and OpenRadar interoperability ====
The handover feature in ATC-pie is based on OpenRadar's exchange server to enable ATC coordination between users of both software programs. However, it is to note that their philosophies differ in several ways:
* OpenRadar's basic processing unit is the FGMS callsign, whereas ATC-pie's is the strip;
* OpenRadar's concept of handover is based on a shared notion of aircraft ownership, whereas ATC-pie allows any controller to pull out a strip, write any callsign and link it to a radar contact;
* in the OpenRadar philosophy, a handover must be acknowledged by the receiver for the sender to lose ownership and for all neighbouring OpenRadar users to see the handover complete, whereas ATC-pie considers that a strip sent through the hand-over pipe is gone and should land directly on a receiver's rack at the other end, without anybody else necessarily to know.
For most interactions to work while still respecting both philosophies as much as possible, the following principles were chosen:
* ATC-pie users can only hand over strips that are linked to a radar contact (no lone strip can be sent);
* aircraft under ATC-pie control are not shown as "owned" to OpenRadar users;
* handovers from ATC-pie will fail if an OpenRadar user in range is claiming ownership;
* when sending to ATC-pie controllers, OpenRadar users will see their transfers acknowledged straight away, unconditionally.
Callsign exchange policy:
* O-R to ATC-pie: FGMS callsign will appear on the strip, as if the sender had filled the detail properly;
* ATC-pie to O-R: callsign resolved for the receiver, sender's entry will reappear next time ATC-pie handles the strip;
* pie-to-pie handovers: strip detail preserved, whether present or absent.
In practice, in ATC-pie, a strip can be handed over by dropping it on the chosen ATC in the list of connected controllers in range. Received strips appear unlinked on the reserved rack, with an identification of the sender which disappears as soon as the strip is clicked on.


==== Routing and conflict warnings ====
==== Routing and conflict warnings ====
Line 289: Line 279:
* change of runways (e.g. irl after wind direction change): start with APP+TWR and select a runway for arrivals at least, play for a while and go back to the dialog to change for the opposite runway;
* change of runways (e.g. irl after wind direction change): start with APP+TWR and select a runway for arrivals at least, play for a while and go back to the dialog to change for the opposite runway;
* etc.
* etc.
==== Tower viewing ====
This feature allows you to overlook your airport and the connected (MP) or simulated (solo) traffic, like a controller from a tower viewpoint. It uses the tower position specified in the source data if any, otherwise defaults to somewhere over the airport to allow towering all available airports.
There are two ways of activating a tower view. You may let ATC-pie start its own suitably configured FlightGear process, or have it connect to an external viewer, manually set up and accepting connections. The latter way takes a little more effort but allows to run FlightGear on a different machine and thereby relieve your session from the CPU load a local instance induces. If you are going for that, start ATC-pie with <code>--tower-view-external</code> and check the port-related command line options in the table above to set it up correctly.
Running internally only requires FlightGear installed on your computer. A basic installation is enough, but:
* not all aircraft will be drawn properly if you do not have the corresponding [[Aircraft|models]] installed—it is up to you to add models or create substitution links (in your FlightGear tree structure or according to the <code>resources/fg-aircraft/Notice</code> file), or be happy with the default blue and yellow glider that will stand for any missing model;
* more importantly, you will need the [[scenery]] for your airport if you want anything exciting to see (and not sea!)—go to [http://www.flightgear.org/download/scenery/ this page] or use [[TerraSync]] to download it to your computer, and add it to your FlightGear setup or set the right scenery directory in the ''System'' menu (ATC-pie will pass it on to FlightGear and save your setting).
In either case, once activated from the ''View'' menu, the tower view controller pane is enabled and you can turn to runway points, follow selected aircraft, etc. Additionally, use right click and drag directly on the view to look around, and you may use the <code>x</code>/<code>X</code> keys to change the zoom level from the view window.
==== Multi-player strip exchange (handovers) and OpenRadar interoperability ====
The handover feature in ATC-pie is based on OpenRadar's exchange server to enable ATC coordination between users of both software programs. However, it is to note that their philosophies differ in several ways:
* OpenRadar's basic processing unit is the FGMS callsign, whereas ATC-pie's is the strip;
* OpenRadar's concept of handover is based on a shared notion of aircraft ownership, whereas ATC-pie allows any controller to pull out a strip, write any callsign and link it to a radar contact;
* in the OpenRadar philosophy, a handover must be acknowledged by the receiver for the sender to lose ownership and for all neighbouring OpenRadar users to see the handover complete, whereas ATC-pie considers that a strip sent through the hand-over pipe is gone and should land directly on a receiver's rack at the other end, without anybody else necessarily to know.
For most interactions to work while still respecting both philosophies as much as possible, the following principles were chosen:
* ATC-pie users can only hand over strips that are linked to a radar contact (no lone strip can be sent);
* aircraft under ATC-pie control are not shown as "owned" to OpenRadar users;
* handovers from ATC-pie will fail if an OpenRadar user in range is claiming ownership;
* when sending to ATC-pie controllers, OpenRadar users will see their transfers acknowledged straight away, unconditionally.
Callsign exchange policy:
* O-R to ATC-pie: FGMS callsign will appear on the strip, as if the sender had filled the detail properly;
* ATC-pie to O-R: callsign resolved for the receiver, sender's entry will reappear next time ATC-pie handles the strip;
* pie-to-pie handovers: strip detail preserved, whether present or absent.
In practice, in ATC-pie, a strip can be handed over by dropping it on the chosen ATC in the list of connected controllers in range. Received strips appear unlinked on the reserved rack, with an identification of the sender which disappears as soon as the strip is clicked on.
==== Background drawings ====
Background drawings allow to decorate radar scopes with all sorts of maps and useful information about the airspace, terrain or procedures.
There are two ways of drawing in the radar background. One is to import '''image files with transparency''', the other is to write a '''text drawing specification''' file to draw coloured lines and label points. This allows to import anything from the most complex coloured height map to the the most schematic airspace outline. All images are positioned and drawing points specified using lat/lon coordinates or navpoints in radar range. The <code>resources/bgdrawings/Notice</code> file explains how to import and create background drawings.
For example, you can map out SID/STAR routes with one image per published chart, named by procedure and associated runways to make in-game selection easy. If you want more than schematic line plots of the procedures, the best way is certainly to draw the images yourself with good enough resolution, e.g. with Gimp. Superimpose a drawing layer on top of a real map canvas, or over a screenshot of your ATC-pie radar with pinned navaids as landmarks. If you have proper to-scale documentation, it is worth trying the command below (requires ''ImageMagick'') to turn the white background of a ready published chart into transparency, and checking if the rendered images are acceptable and zoom-resistant enough.
:<code>convert -transparent white input-file.png output-file.png</code>
Use the image positioning helper tool in the ''System'' menu if you want to adjust image corners visually rather than programmatically. All visible pixmap drawings will be moved simultaneously, so you can work with several at a time if you need to. On dialog box close, a file is generated in the <code>output</code> folder for you to open and copy/edit, or use as a direct substitution.


=== Tips ===
=== Tips ===
Line 341: Line 371:
'''Q: How do I start anywhere else than bl*ody KSFO?'''
'''Q: How do I start anywhere else than bl*ody KSFO?'''


A: Use a command-line argument: <code>./ATC-pie.py ICAO</code>
A: Use a command line argument: <code>./ATC-pie.py ICAO</code>


'''Q: Why am I not seeing this aircraft on my radar? I know it is there: the pilot is sending chat messages and/or it is visible on the live tracker map...'''
'''Q: Why am I not seeing this aircraft on my radar? I know it is there: the pilot is sending chat messages and/or it is visible on the online live map...'''


A: You only see an aircraft if its transponder is turned on, i.e. responding to your radar ping. You should tell the pilot to turn his transponder on. If the transponder feature is not supported by the aircraft model, it will be simulated by ATC-pie according to the fallback mode you have selected in the settings dialog, hence will be visible for any non-zero (0=off) selection. The other radical way to go is to cheat to see him, with menu options "reveal OFF/STBY" or "radar cheat mode". See the [https://www.youtube.com/watch?v=kpPzRiwzx9Q&list=PL1EQKKHhDVJvvWpcX_BqeOIsmeW2A_8Yb&index=1 ATC-pie video tutorial 1].
A: You only see an aircraft on your screen if your radar picks up a transponder signal from it. The two following cases will therefore prevent you from seeing a connected aircraft:
# Its onboard transponder is turned off, i.e. not responding to your radar ping, and you should tell the pilot to switch it on. See the [https://www.youtube.com/watch?v=kpPzRiwzx9Q&list=PL1EQKKHhDVJvvWpcX_BqeOIsmeW2A_8Yb&index=1 ATC-pie video tutorial 1]. If the aircraft model does not support the transponder feature, it will be simulated by ATC-pie according to the fallback mode you have selected in the settings dialog; any non-zero mode will do. Another, more radical way is to cheat with menu options "reveal OFF/STBY" or "radar cheat mode" ([https://www.youtube.com/watch?v=lSyH88HR-4w&index=3&list=PL1EQKKHhDVJvvWpcX_BqeOIsmeW2A_8Yb tutorial 3]).
# The aircraft is under the radar floor setting. Check in the ''General settings'' dialog; set it to "SFC" to pick up all signals.


'''Q: What is the strip exchange server? Which one to use?'''
'''Q: What is the strip exchange server? Which one to use?'''
Line 363: Line 395:
A: There can be a variety of reasons, all of them to rule out before reporting a bug in the program. Start a single ATC-pie instance and try the echo test (''System'' menu). If it works, you may skip directly to item 3 below.
A: There can be a variety of reasons, all of them to rule out before reporting a bug in the program. Start a single ATC-pie instance and try the echo test (''System'' menu). If it works, you may skip directly to item 3 below.
# Bad FGCom version setting
# Bad FGCom version setting
#: Verify the "FGCom version" set in the ''System'' menu, which should name a subdirectory in <code>resources/fgcom</code> and suit your operating system (see <code>Notice</code> file). Four versions are initially packaged with ATC-pie: Linux64, Linux32, Mac, Win32. FGCom version should be 3.4 (January 2015).
#: Verify the "FGCom version" set in the ''System'' menu, which should point to the right executable file under <code>resources/fgcom</code> and suit your operating system (see <code>Notice</code> file). Four versions are initially packaged with ATC-pie: Linux64, Linux32, Mac, Win32.
# FGCom server down
# FGCom server down
#: This can happen, unfortunately even for up to a few days. Check for responses from the server, e.g. with <code>ping fgcom.flightgear.org</code>.
#: This can happen, unfortunately even for up to a few days. Check for responses from the server, e.g. with <code>ping fgcom.flightgear.org</code>.
Line 369: Line 401:
#: If the server is up (responding to ping), check for errors in the logged FGCom output files in the <code>output</code> directory.
#: If the server is up (responding to ping), check for errors in the logged FGCom output files in the <code>output</code> directory.
# Port mess-up on your side
# Port mess-up on your side
#: If you are running multiple instances of ATC-pie, make sure you have no more than one radio box on every port. In any case, verify you only choose available ports that are not already in use by your operating system for example. Typically, default ports (from 16661 counting up) work fine, but you will have to change them for parallel instances, using the --fgcom-ports= command-line option (see section: ''starting the program''). To check what port a radio box is using, see its "on/off" button tooltip.
#: If you are running multiple instances of ATC-pie, make sure you have no more than one radio box on every port. In any case, verify you only choose available ports that are not already in use by your operating system for example. Typically, default ports (from 16661 counting up) work fine, but you will have to change them for parallel instances, using the <code>--fgcom-ports</code> command line option (see section: ''starting the program''). To check what port a radio box is using, see its "on/off" button tooltip.
 
'''Q: Why is my tower in the middle of the sea, and aircraft water landing/floating?'''
 
A: You are missing the FlightGear scenery data for your location, or ATC-pie does not know where it is. Check out the ''Tower viewing'' feature note in this article.


[[Category:ATC clients]]
[[Category:ATC clients]]
265

edits