Mercurial > atc
changeset 22:a6f6d5d822be
Created config file
Added config option to display different plane info label styles
committer: Jeff <jeffpc@batlh.(none)> 1121704859 -0400
author | Jeff <jeffpc@batlh.(none)> |
---|---|
date | Mon, 18 Jul 2005 16:40:59 -0400 |
parents | 4c026c5634f9 |
children | b2ed1770081f |
files | atc.py atc_config.py atc_plane.py |
diffstat | 3 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/atc.py Thu Jul 14 02:56:14 2005 -0400 +++ b/atc.py Mon Jul 18 16:40:59 2005 -0400 @@ -29,6 +29,8 @@ import threading import pygame + import atc_config + import atc_colors import atc_utils import atc_plane
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/atc_config.py Mon Jul 18 16:40:59 2005 -0400 @@ -0,0 +1,7 @@ +# type of labels used to display plane info +# +# values: +# 1 (default) = realistic +# 2 = very detailed + +plane_label = 1 \ No newline at end of file
--- a/atc_plane.py Thu Jul 14 02:56:14 2005 -0400 +++ b/atc_plane.py Mon Jul 18 16:40:59 2005 -0400 @@ -26,6 +26,8 @@ import pygame from math import * +import atc_config + import atc_colors import atc_utils from atc_plane_specs import * @@ -242,17 +244,18 @@ x = int(1024/2+m2pix(self.pos["X"])) + 10 y = int(768/2-m2pix(self.pos["Y"])) - 5 - # FIXME: display geographic coordinates with NSWE appended/prepended - #strings = ( self.flightno, - # self.callsign + " " + str(self.status), - # "Alt: " + str(int(self.pos["Z"])), - # "Lat: " + self.calc_geo(self.pos["Y"],"NS"), - # "Long: " + self.calc_geo(self.pos["X"],"EW"), - # "Head: " + str(int(self.vel["heading"])), - # "AS: " + str(int(self.vel["speed"]*3.6))) - strings = ( self.flightno, - "%03d %03d" % (int(round(self.vel["heading"])), int(round(self.vel["speed"]*3.6))), - self.specs["name"]) + if (atc_config.plane_label == 2): + strings = ( self.flightno, + self.callsign + " " + str(self.status), + "Alt: " + str(int(self.pos["Z"])), + "Lat: " + self.calc_geo(self.pos["Y"],"NS"), + "Long: " + self.calc_geo(self.pos["X"],"EW"), + "Head: " + str(int(self.vel["heading"])), + "AS: " + str(int(self.vel["speed"]*3.6))) + else: + strings = ( self.flightno, + "%03d %03d" % (int(round(self.vel["heading"])), int(round(self.vel["speed"]*3.6))), + self.specs["name"]) for stri in strings: alt = font.render(stri, 1, color)