Ignore:
Timestamp:
07/21/12 12:43:34 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Documented the non-GUI modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/const.py

    r274 r298  
    1 # Various constants used in the logger
    2 
    3 #-------------------------------------------------------------------------------
    4 
    5 # The version of the program
     1
     2import sys
     3
     4#-------------------------------------------------------------------------------
     5
     6## @package mlx.const
     7#
     8# The constants used by the program.
     9
     10#-------------------------------------------------------------------------------
     11
     12## The version of the program
    613VERSION="0.6"
    714
    815#-------------------------------------------------------------------------------
    916
    10 # The ratio between lbs and kg
     17## The ratio between lbs and kg
    1118LBSTOKG=0.4536
    1219
    13 # The ratio between kgs and lbs
     20## The ratio between kgs and lbs
    1421KGSTOLB=1/LBSTOKG
    1522
    16 # The ratio between feet and metre
     23## The ratio between feet and metre
    1724FEETTOMETRES=0.3048
    1825
    1926#-------------------------------------------------------------------------------
    2027
    21 # The ratio between knots and km/h
     28## The ratio between knots and km/h
    2229KNOTSTOKMPH=1.852
    2330
    24 # The ratio between km/h and knots
     31## The ratio between km/h and knots
    2532KMPHTOKNOTS=1/1.852
    2633
    2734#-------------------------------------------------------------------------------
    2835
    29 # Flight simulator type: MS Flight Simulator 2004
     36## Flight simulator type: MS Flight Simulator 2004
    3037SIM_MSFS9 = 1
    3138
    32 # Flight simulator type: MS Flight Simulator X
     39## Flight simulator type: MS Flight Simulator X
    3340SIM_MSFSX = 2
    3441
    35 # Flight simulator type: X-Plane 9
     42## Flight simulator type: X-Plane 9
    3643SIM_XPLANE9 = 3
    3744
    38 # Flight simulator type: X-Plane 10
     45## Flight simulator type: X-Plane 10
    3946SIM_XPLANE10 = 4
    4047
    4148#-------------------------------------------------------------------------------
    4249
    43 # Aircraft type: Boeing 737-600
     50## Aircraft type: Boeing 737-600
    4451AIRCRAFT_B736 = 1
    4552
    46 # Aircraft type: Boeing 737-700
     53## Aircraft type: Boeing 737-700
    4754AIRCRAFT_B737 = 2
    4855
    49 # Aircraft type: Boeing 737-800
     56## Aircraft type: Boeing 737-800
    5057AIRCRAFT_B738 = 3
    5158
    52 # Aircraft type: Boeing 737-800 (charter configuration)
     59## Aircraft type: Boeing 737-800 (charter configuration)
    5360AIRCRAFT_B738C = 16
    5461
    55 # Aircraft type: Boeing 737-300
     62## Aircraft type: Boeing 737-300
    5663AIRCRAFT_B733 = 4
    5764
    58 # Aircraft type: Boeing 737-400
     65## Aircraft type: Boeing 737-400
    5966AIRCRAFT_B734 = 5
    6067
    61 # Aircraft type: Boeing 737-500
     68## Aircraft type: Boeing 737-500
    6269AIRCRAFT_B735 = 6
    6370
    64 # Aircraft type: Dash-8 Q400
     71## Aircraft type: Dash-8 Q400
    6572AIRCRAFT_DH8D = 7
    6673
    67 # Aircraft type: Boeing 767-200
     74## Aircraft type: Boeing 767-200
    6875AIRCRAFT_B762 = 8
    6976
    70 # Aircraft type: Boeing 767-300
     77## Aircraft type: Boeing 767-300
    7178AIRCRAFT_B763 = 9
    7279
    73 # Aircraft type: Canadair CRJ-200
     80## Aircraft type: Canadair CRJ-200
    7481AIRCRAFT_CRJ2 = 10
    7582
    76 # Aircraft type: Fokker F-70
     83## Aircraft type: Fokker F-70
    7784AIRCRAFT_F70 = 11
    7885
    79 # Aircraft type: Lisunov Li-2
     86## Aircraft type: Lisunov Li-2
    8087AIRCRAFT_DC3 = 12
    8188
    82 # Aircraft type: Tupolev Tu-134
     89## Aircraft type: Tupolev Tu-134
    8390AIRCRAFT_T134 = 13
    8491
    85 # Aircraft type: Tupolev Tu-154
     92## Aircraft type: Tupolev Tu-154
    8693AIRCRAFT_T154 = 14
    8794
    88 # Aircraft type: Yakovlev Yak-40
     95## Aircraft type: Yakovlev Yak-40
    8996AIRCRAFT_YK40 = 15
    9097
    9198#-------------------------------------------------------------------------------
    9299
    93 # The list of aircraft types that we know of
     100## The list of aircraft types that we know of
    94101# The order is mostly from most recent to oldest considering
    95102# Malev's history
     
    105112#-------------------------------------------------------------------------------
    106113
    107 # A mapping of aircraft types to their 'internal' ICAO codes (which are
     114## A mapping of aircraft types to their 'internal' ICAO codes (which are
    108115# the same as the real ICAO codes, except in a few cases)
    109116icaoCodes = { AIRCRAFT_B736  : "B736",
     
    126133#-------------------------------------------------------------------------------
    127134
    128 # Flight stage: boarding
     135## Flight stage: boarding
    129136STAGE_BOARDING = 1
    130137
    131 # Flight stage: pushback, startup and taxi
     138## Flight stage: pushback, startup and taxi
    132139STAGE_PUSHANDTAXI = 2
    133140
    134 # Flight stage: takeoff
     141## Flight stage: takeoff
    135142STAGE_TAKEOFF = 3
    136143
    137 # Flight stage: RTO
     144## Flight stage: RTO
    138145STAGE_RTO = 4
    139146
    140 # Flight stage: climb
     147## Flight stage: climb
    141148STAGE_CLIMB = 5
    142149
    143 # Flight stage: cruise
     150## Flight stage: cruise
    144151STAGE_CRUISE = 6
    145152
    146 # Flight stage: descent
     153## Flight stage: descent
    147154STAGE_DESCENT = 7
    148155
    149 # Flight stage: landing
     156## Flight stage: landing
    150157STAGE_LANDING = 8
    151158
    152 # Flight stage: taxi after landing
     159## Flight stage: taxi after landing
    153160STAGE_TAXIAFTERLAND = 9
    154161
    155 # Flight stage: parking
     162## Flight stage: parking
    156163STAGE_PARKING = 10
    157164
    158 # Flight stage: go-around
     165## Flight stage: go-around
    159166STAGE_GOAROUND = 11
    160167
    161 # Flight stage: end
     168## Flight stage: end
    162169STAGE_END = 12
    163170
     
    183190#-------------------------------------------------------------------------------
    184191
    185 # Plane status: unknown
     192## Plane status: unknown
    186193PLANE_UNKNOWN = 0
    187194
    188 # Plane status: at home, i.e. LHBP
     195## Plane status: at home, i.e. LHBP
    189196PLANE_HOME = 1
    190197
    191 # Plane status: away
     198## Plane status: away
    192199PLANE_AWAY = 2
    193200
    194 # Plane status: parking
     201## Plane status: parking
    195202PLANE_PARKING = 3
    196203
    197204#-------------------------------------------------------------------------------
    198205
    199 # Flight type: scheduled
     206## Flight type: scheduled
    200207FLIGHTTYPE_SCHEDULED = 0
    201208
    202 # Flight type: old-timer
     209## Flight type: old-timer
    203210FLIGHTTYPE_OLDTIMER = 1
    204211
    205 # Flight type: VIP
     212## Flight type: VIP
    206213FLIGHTTYPE_VIP = 2
    207214
    208 # Flight type: charter
     215## Flight type: charter
    209216FLIGHTTYPE_CHARTER = 3
    210217
     
    230237#-------------------------------------------------------------------------------
    231238
    232 # Delay code: loading problems
     239## Delay code: loading problems
    233240DELAYCODE_LOADING = 0
    234241
    235 # Delay code: VATSIM problem
     242## Delay code: VATSIM problem
    236243DELAYCODE_VATSIM = 1
    237244
    238 # Delay code: network problems
     245## Delay code: network problems
    239246DELAYCODE_NETWORK = 2
    240247
    241 # Delay code: controller's fault
     248## Delay code: controller's fault
    242249DELAYCODE_CONTROLLER = 3
    243250
    244 # Delay code: system crash or freeze
     251## Delay code: system crash or freeze
    245252DELAYCODE_SYSTEM = 4
    246253
    247 # Delay code: navigation problem
     254## Delay code: navigation problem
    248255DELAYCODE_NAVIGATION = 5
    249256
    250 # Delay code: traffic problems
     257## Delay code: traffic problems
    251258DELAYCODE_TRAFFIC = 6
    252259
    253 # Delay code: apron navigation
     260## Delay code: apron navigation
    254261DELAYCODE_APRON = 7
    255262
    256 # Delay code: weather problems
     263## Delay code: weather problems
    257264DELAYCODE_WEATHER = 8
    258265
    259 # Delay code: personal reasons
     266## Delay code: personal reasons
    260267DELAYCODE_PERSONAL = 9
    261268
    262269#-------------------------------------------------------------------------------
    263270
    264 # Message type: logger error
     271## Message type: logger error
    265272# FIXME: cannot set the hotkey
    266273MESSAGETYPE_LOGGER_ERROR = 1
    267274
    268 # Message type: information
     275## Message type: information
    269276MESSAGETYPE_INFORMATION = 2
    270277
    271 # Message type: fault messages
     278## Message type: fault messages
    272279MESSAGETYPE_FAULT = 3
    273280
    274 # Message type: NO-GO fault messages
     281## Message type: NO-GO fault messages
    275282MESSAGETYPE_NOGO = 4
    276283
    277 # Message type: gate system messages
     284## Message type: gate system messages
    278285MESSAGETYPE_GATE_SYSTEM = 5
    279286
    280 # Message type: environment messages
     287## Message type: environment messages
    281288# FIXME: flight plan closed (5 sec)
    282289MESSAGETYPE_ENVIRONMENT = 6
    283290
    284 # Message type: help messages
     291## Message type: help messages
    285292MESSAGETYPE_HELP = 7
    286293
    287 # Message type: visibility messages
     294## Message type: visibility messages
    288295MESSAGETYPE_VISIBILITY = 8
    289296
     
    317324#-------------------------------------------------------------------------------
    318325
    319 # Message display level: none
     326## Message display level: none
    320327MESSAGELEVEL_NONE = 0
    321328
    322 # Message display level: only message in the simulator
     329## Message display level: only message in the simulator
    323330MESSAGELEVEL_FS = 1
    324331
    325 # Message display level: only sound
     332## Message display level: only sound
    326333MESSAGELEVEL_SOUND = 2
    327334
    328 # Message display level: both
     335## Message display level: both
    329336MESSAGELEVEL_BOTH = 3
    330337
     
    357364#-------------------------------------------------------------------------------
    358365
    359 # Sound: ding
     366## Sound: ding
    360367SOUND_DING = "ding.wav"
    361368
    362 # Sound: notify
     369## Sound: notify
    363370SOUND_NOTIFY = "notify.wav"
    364371
    365 # Sound: NOTAM
     372## Sound: NOTAM
    366373SOUND_NOTAM = "notam.mp3"
    367374
    368 # Sound: scream
     375## Sound: scream
    369376SOUND_SCREAM = "sikoly.mp3"
    370377
    371 # Sound: boarding
     378## Sound: boarding
    372379SOUND_BOARDING = "board.mp3"
    373380
    374 # Sound: Malev theme
     381## Sound: Malev theme
    375382SOUND_MALEV = "malev.mp3"
    376383
    377 # Sound: taxi: Boeing 737 NG
     384## Sound: taxi: Boeing 737 NG
    378385SOUND_TAXI_BOEING737NG = "737taxi.mp3"
    379386
    380 # Sound: taxi: Boeing 767
     387## Sound: taxi: Boeing 767
    381388SOUND_TAXI_BOEING767 = "767taxi.mp3"
    382389
    383 # Sound: taxi: Fokker F70
     390## Sound: taxi: Fokker F70
    384391SOUND_TAXI_F70 = "F70taxi.mp3"
    385392
    386 # Sound: takeoff preparation request from the captain
     393## Sound: takeoff preparation request from the captain
    387394SOUND_CAPTAIN_TAKEOFF = "cpt_takeoff.mp3"
    388395
    389 # Sound: cruise
     396## Sound: cruise
    390397SOUND_CRUISE = "TOC.mp3"
    391398
    392 # Sound: descent
     399## Sound: descent
    393400SOUND_DESCENT = "TOD.mp3"
    394401
    395 # Sound: applause
     402## Sound: applause
    396403SOUND_APPLAUSE = "taps.mp3"
    397404
    398 # Sound: speedbrake
     405## Sound: speedbrake
    399406SOUND_SPEEDBRAKE = "speed.mp3"
    400407
    401 # Sound: taxi after landing
     408## Sound: taxi after landing
    402409SOUND_TAXIAFTERLAND = "TaxiAfterLand.mp3"
    403410
     
    405412#-------------------------------------------------------------------------------
    406413
    407 # Fuel tank: centre
     414## Fuel tank: centre
    408415FUELTANK_CENTRE = 1
    409416
    410 # Fuel tank: left
     417## Fuel tank: left
    411418FUELTANK_LEFT = 2
    412419
    413 # Fuel tank: right
     420## Fuel tank: right
    414421FUELTANK_RIGHT = 3
    415422
    416 # Fuel tank: left aux
     423## Fuel tank: left aux
    417424FUELTANK_LEFT_AUX = 4
    418425
    419 # Fuel tank: right aux
     426## Fuel tank: right aux
    420427FUELTANK_RIGHT_AUX = 5
    421428
    422 # Fuel tank: left tip
     429## Fuel tank: left tip
    423430FUELTANK_LEFT_TIP = 6
    424431
    425 # Fuel tank: right tip
     432## Fuel tank: right tip
    426433FUELTANK_RIGHT_TIP = 7
    427434
    428 # Fuel tank: external 1
     435## Fuel tank: external 1
    429436FUELTANK_EXTERNAL1 = 8
    430437
    431 # Fuel tank: external 2
     438## Fuel tank: external 2
    432439FUELTANK_EXTERNAL2 = 9
    433440
    434 # Fuel tank: centre2
     441## Fuel tank: centre2
    435442FUELTANK_CENTRE2 = 10
    436443
     
    486493#-------------------------------------------------------------------------------
    487494
    488 # The available gates at LHBP
     495## The available gates at LHBP
    489496lhbpGateNumbers = []
    490497
Note: See TracChangeset for help on using the changeset viewer.