Ignore:
Files:
2 added
19 edited

Legend:

Unmodified
Added
Removed
  • .hgignore

    r276 r442  
    66mlx-common.nsh
    77locale/.+/LC_MESSAGES
     8locale/.+/mlx_delay.po
     9src/mlx/gui/dcdata.py
     10xplra.py
  • .hgtags

    r411 r458  
    7713937d44e004a8751426c14f6173ff3240822f62 version_0.13
    88cc775599652d39ab574dac90fe8730ef52842744 version_0.14
     9e11be493e87d09619387e352c389208cca54097d version_0.15
     1089c9d5d516eb0da04f2cd10db58332f054249bb1 version_0.16
     11998ecee73a374558f87b42cd851d76b375870185 version_0.17
  • MLXMANIFEST

    r418 r457  
    77library/fnmatch.pyc     3414    4d50000f78e903598af06ef1c5cfb3ef
    88library/libexpat-1.dll  143096  701659d3689bf4a8265b669b7d774255
    9 library/gtk/_gtk.pyc    549     6233f4030116a4767b50edc0fdb67866
     9library/gtk/_gtk.pyc    549     47d70d42eae21e74c6032ae84cb15340
    1010library/encodings/cp858.pyc     7591    02054a0b8e91b9758826eb70cddf096f
    11 library/mlx/pirep.pyc   5235    fc4a7861ab475fe7e629ada4f84de089
     11library/mlx/pirep.pyc   4623    68189237ada6e14afd692f29194675a9
    1212library/encodings/cp1254.pyc    2678    17ff2ac86f90886d5c73ed789f0499f3
    1313library/encodings/unicode_internal.pyc  2022    1e902113491e0c334b44deb0c8940e01
    1414library/libpango-1.0-0.dll      333729  5a14efd93ee27cfe960220fe4a904911
    15 library/mlx/gui/gui.pyc 48512   c75d1f34de964078769de9b4ee5a0c3e
     15library/mlx/gui/gui.pyc 48520   2819da9092529a1f823300394d3f0b7c
    1616library/encodings/cp737.pyc     8102    40e61988748e4ca1742a2bad43949f4e
    1717library/stat.pyc        2503    d3b6dc7a54e705219f04d0be75a212de
     
    2222library/encodings/cp932.pyc     1638    e060301989634a7fb30ded375011cb09
    2323library/share/locale/hu/LC_MESSAGES/gtk20.mo    58794   6ee4491ae7bc9d3dfb778578eb29a0b3
    24 library/gobject/_gobject.pyc    573     17a945fa9ae6b80db017ec58ebf10947
     24library/gobject/_gobject.pyc    573     13c47e2c9b1ff22c82fa1138f94bb578
    2525library/encodings/utf_7.pyc     1747    2beeb059236527197d6c640396476ce8
    2626doc/manual/hu/pirepViewer.png   25089   47fd4cbd140cedcd5f972b16ef484ba0
     
    4040library/pangocairo.pyd  17920   5fc69a7d29a6d3127710c64de440daa4
    4141doc/manual/en/fuel.png  23882   896aa65c7a8d4fcd7710b386b96bb97c
    42 library/mlx/gui/info.pyc        6082    fa61b9e5bd1dec5998a46ce9a07076e6
     42library/mlx/gui/info.pyc        4951    cdb36f50aa93e2c35884a07b4d8b0ab7
    4343library/xml/sax/xmlreader.pyc   17862   0362ded7016d21cdd85aea1170ebdda1
    4444doc/manual/hu/fuel.png  27014   6a7764815c991f99961b39080bf9af03
     
    6060library/encodings/utf_8.pyc     1806    4b8dee0284ea2f55c4142fcde7463524
    6161library/unicodedata.pyd 688128  c856c31a03dc892e4f2aee93d0bfee44
    62 locale/hu/LC_MESSAGES/mlx.mo    44774   b7f65dc824054b25c08aa100b02d599c
     62locale/hu/LC_MESSAGES/mlx.mo    64529   cc181a87f3328bf8a736ef008a341972
    6363library/encodings/mac_roman.pyc 2716    4b4745eccfcb77860b70b374ac07fbcc
    6464library/copy_reg.pyc    4893    7a58bc441232056d1c123cd3375b3774
     
    7373library/_hashlib.pyd    287232  a1a18de0644f481749fcbcf26005eeaf
    7474doc/manual/en/monitorWindow.png 16582   e07cbd4f5b360e1e8e80bc8409ad242b
    75 library/_hashlib.pyc    549     ed1f009b3ccd9a93d8fa4258f9373796
     75library/_hashlib.pyc    549     85f44addf6e86ff56c1043c21217c41d
    7676library/libpng14-14.dll 230529  f3a15497e25baaa721f96638d7a4d2f8
    7777library/copy.pyc        11674   30d1745c5e38ab170f8a0486fbebf305
    7878library/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo       21895   a932ead453f04de30e348c1689a4d896
    79 library/unittest/result.pyc     7444    aefbb3cc79c0ff17787ce84faed7f5e8
     79library/mlx/gui/dcdata.pyc      16051   4892c87e6998bb6151739e7994ebe5bf
    8080library/mlx/gui/__init__.pyc    107     3494fc6a671a7b8a9dc72ea93948ae52
    8181library/encodings/iso8859_5.pyc 2679    58a290e94b0266ef8ff4ee52da00e257
     
    8484library/select.pyd      11776   d90bf525f9f6c9c3aa6532fa6e569b4f
    8585library/base64.pyc      10528   39abec9c60dc011d3c763f443f9b1a11
    86 locale/en/LC_MESSAGES/mlx.mo    41375   3145880f78f59668a68f46eee10b6bc1
     86locale/en/LC_MESSAGES/mlx.mo    60039   ba50bf8059d1a393961d122430b40e76
    8787library/traceback.pyc   11223   50ace5c2c6c040a923082442da94cd78
    8888library/_weakrefset.pyc 9290    a56e87c491c0511cd329a3c8c4cd9563
    89 library/mlx/flight.pyc  17303   30d491cdcb9acb318d4c952ca777808a
     89library/mlx/flight.pyc  17303   b9942b2863ce54ed3704e9883bf54541
    9090library/urllib2.pyc     43566   7eb57ea0dcd1086d1d9073a5cefb0903
    9191doc/manual/en/flightSelection.png       25456   84e5574bc58ff156da71470550d540d8
     
    114114library/encodings/mac_latin2.pyc        4717    564dbaf5c296a147203eb821dc2466ba
    115115library/encodings/utf_16_be.pyc 1854    84a1d1465453727af051eaeeb853782f
    116 library/mlx/fsuipc.pyc  70737   8d01b21710cf9438bbb0b20839dfc945
     116library/mlx/fsuipc.pyc  72133   bb9dc9c43ea8ebf511f4069062577720
    117117library/xml/sax/__init__.pyc    3579    c78222ad1fd4f3dbdea06666fe74e84e
    118118doc/manual/en/connect.png       24272   01e31d899c4ede823423f705c6886f30
     
    126126library/libgdk-win32-2.0-0.dll  931390  a2b46daac3d4140efdf86429f7aea476
    127127library/win32file.pyd   111616  25ecaa0a381c6fd9ba4080bea63b952e
    128 library/mlx/gui/common.pyc      9996    53858ed2537f28fd26c1d95fa3ada991
     128library/mlx/gui/common.pyc      10275   4466f2d9547b91107ea7de9b69bcc71e
    129129library/dummy_threading.pyc     1265    5ab5c897721aeb346b5bccb84066c5bd
    130130doc/manual/hu/index.html        47588   fd83bee17f50bf3fd488d86f65563f7d
     
    132132sounds/767taxi.mp3      160496  4cb43cda6e1214fbe15328a716827345
    133133doc/manual/en/prefsAdvanced.png 13720   d43a6df9991d331ce8fdc9fedae514c3
    134 library/cairo/_cairo.pyc        561     2d69c9c670ed352716d4fb97180ab533
    135 library/win32file.pyc   552     02091144183ac705afe0a744872dcf7c
     134library/cairo/_cairo.pyc        561     cc9cb8a4064a24cef04a8a129edc4004
     135library/win32file.pyc   552     e2a792eee61fb72563f73da86c462435
    136136library/encodings/cp865.pyc     7868    7d40a7ba053ac23339218be8799e5397
    137137library/lib/gtk-2.0/2.10.0/engines/libwimp.dll  97984   a5bbbe46e1363aba9020a76f2d58e9d6
     
    142142library/share/locale/hu/LC_MESSAGES/gtk20-properties.mo 167125  cd1b1b3693c1e3c74bfcea20be640cc6
    143143conn_red.png    914     860388cb7c3b26b2f348fdbee40780ce
    144 library/bz2.pyc 534     6fc99d980120fd663ffb0818a34828b1
     144library/bz2.pyc 534     e59fe6bdb36241510519275012597648
    145145library/xml/sax/expatreader.pyc 13563   4f64c0efb2f1f8dbba84cdb5c6036f2d
    146146library/email/utils.pyc 8840    a7be428df6fddee6121cfce55382d1f8
     
    158158library/mlx/gui/statusbar.pyc   4812    49946660d92b7b634740537450b63723
    159159library/warnings.pyc    12666   9788b5f45765e8204e04c820f2711094
    160 mlxupdate.exe   19456   c887d69e3c2741503e23e244f0a689c4
    161 library/mlx/const.pyc   6956    f4684465c27724b62f5a67c14fec672f
     160mlxupdate.exe   19456   31467783c1b3ebe2b17a07b760f5ac6a
     161library/mlx/const.pyc   6707    e11d9ff3e6aa26a56f1828be2f19fc3d
    162162library/email/errors.pyc        3229    cdb78ab237e195ad69f059128bc03b1d
    163163library/linecache.pyc   3091    666e6f81b0ea9a7637f8068493f738d5
     
    172172library/shlex.pyc       7282    cbe1a4823894c97c87d01f9d9faf5b8f
    173173library/cairo/__init__.pyc      142     010dd7cc8485565d5782d60e92e4ba34
    174 library/_ssl.pyc        537     e26888c5773f237986294f0be8c60a62
     174library/_ssl.pyc        537     1cb0db32b06e3ca9372bd132e4c241a5
    175175library/encodings/iso8859_8.pyc 2717    f3ad6ce58cfac9e3ca86cf5c2fef092b
    176176library/encodings/iso2022_jp_1.pyc      1699    faed9d5747e982cec9fa8b3ad8e1de26
     
    192192library/encodings/cp1252.pyc    2676    b4c43cc72650c911cf3654dbaf565df9
    193193library/share/locale/hu/LC_MESSAGES/atk10.mo    8465    e3f3466da367215aad971d7b0394229d
    194 library/unicodedata.pyc 558     6297d24ae9647ab3fcdf09ca61b75c3c
     194library/unicodedata.pyc 558     6fcecb75e0a3d45438f3c8b43b235948
    195195library/encodings/uu_codec.pyc  4646    5282a5fcb676851224d2924aa3e48a9e
    196196library/ConfigParser.pyc        23857   1d17020dd0000ce0f73de812effa152f
     
    223223doc/manual/hu/flightInfoTab.png 22378   5f3e77393d8693fec723590daeedb50a
    224224library/encodings/utf_8_sig.pyc 4625    1b1405db186e5819fa271ff96c1ca2c5
    225 library/pangocairo.pyc  555     3b0030fc6f2497e51ca60c00750d8684
     225library/pangocairo.pyc  555     3286993c7cd527b1e0d5df1c72e64969
    226226library/encodings/cp1255.pyc    2697    b265913c887f2e1c8736632b652c0093
    227227library/encodings/zlib_codec.pyc        4308    319c9073aff840436a03cc1fa0b08fb5
     
    230230doc/manual/hu/connect.png       27238   50477d157c924984c224806455e8f87d
    231231library/encodings/palmos.pyc    2876    9284ad53dcfd82dfae0a79923b1cf91d
    232 library/mlx/web.pyc     28982   9db31983a125d6fbb9cccd699f450889
     232library/mlx/web.pyc     29032   6dd23f897276b82ef46a40398e45ca96
    233233library/mlx/gui/gates.pyc       5384    e85898dc153d9e624ff663afc0575e7d
    234234library/email/feedparser.pyc    10682   4de6a63da8dc270c9881edb9c2f28508
     
    236236library/intl.dll        152489  eb2d4c4d4a527bc88a69a16cc99afcf5
    237237library/encodings/mbcs.pyc      1883    2213911a7dd0deada6799b63e18b695b
    238 library/pyuipc.pyc      543     17740e034cdc12d87175e6f44f8d8c0c
     238library/pyuipc.pyc      543     36d2d5c3740dfe8e21fc3caa60d638af
    239239sounds/TOC.mp3  273032  fae1be2ad25c8b54806bd1d759919705
    240240library/encodings/iso8859_4.pyc 2678    16f2fe7994051752360c533c052b892b
     
    260260doc/manual/hu/flightSelection.png       27734   560275c030f373691ca59e99c4ba686e
    261261library/win32pipe.pyd   24064   de374eded459293b2a7eb8ed8fb38eaa
    262 library/win32pipe.pyc   552     eb124a4ee4010ec897a5d2ea2e19072d
     262library/win32pipe.pyc   552     a0d6186cd638718fb49119799e6e9de9
    263263doc/manual/hu/logTab.png        29189   d3cbae223d547919d9954fc535856298
    264264library/encodings/iso2022_jp_2004.pyc   1723    66376e788f3819e781897268c1100986
    265 library/win32event.pyc  555     d8c0a9982b63b46d494318127fb020dd
     265library/win32event.pyc  555     85b44a4f42738a522ff0097d47e4e90e
    266266library/encodings/cp866.pyc     8103    f36418dcf93b17b3ced63bd544f44159
    267 library/gio/_gio.pyc    549     9e7f2b095af02def0c64e781aac9ebc6
     267library/gio/_gio.pyc    549     4e648e0b01c80d857604e50e631c74b3
    268268library/encodings/cp437.pyc     7874    63f1278c0a66129c6fb4f504d6b61b66
    269269doc/manual/hu/helpTab.png       25326   f83cf32e49d6de786df20885232aa1ee
     
    285285library/email/message.pyc       27764   493826f529d17f5a21080a4c98b49369
    286286library/encodings/mac_romanian.pyc      2756    a3b2a0892236bc80c8efe8940e33339e
    287 library/mlx/gui/pirep.pyc       16780   06c8ceef8809771f5b870ca161d2a0e1
     287library/mlx/gui/pirep.pyc       16749   328578f8f3b6ecdb5a4fc66a69654b43
    288288library/mimetypes.pyc   17806   927ce6a7079707aaee925e855ed23454
    289 library/_ctypes.pyc     546     3537b8548171d9214a47aae373358d13
     289library/_ctypes.pyc     546     b4e549553cf3be3d4f7b48f2340c8729
    290290sounds/F70taxi.mp3      154854  51332dc691d3519355f61ed06c959d8d
    291291library/encodings/cp857.pyc     7611    1b46c8959ac097b73e1c680d464cdc32
     
    305305library/repr.pyc        5045    82f0d89c685c3dacd941e01e4b2f31ef
    306306library/quopri.pyc      6352    87c42d94f753dd4c8a761cfa79453bb8
    307 library/mlx/gui/monitor.pyc     12015   d770e12a62ca8d880144b8b45c3a2576
     307library/mlx/gui/monitor.pyc     12015   6d558b1484c61348b34e48a353c8fc09
    308308library/encodings/latin_1.pyc   2111    52427573ccbfd06220b67d5a9dd1376e
    309309library/mlx/update.pyc  16952   8fa20ca0ddd4ce5f06f70fba9bea6e83
     
    314314doc/manual/en/gatesTab.png      25611   6de724fef235fcdb11a5c960f9f40502
    315315library/bdb.pyc 17708   9a8fdcaa65f595c842689247847879d9
    316 library/mlx/gui/flight.pyc      111758  d700fbd8afa04e59546d7e9cd374b10e
     316library/mlx/gui/flight.pyc      111770  3632efc6ec9e67adebd76460bb18f556
    317317library/unittest/case.pyc       37758   1d2235e74c246b562c5c00ddf73c621a
    318318library/subprocess.pyc  38648   c9f749db06dfc9fb32079de51d6efd01
    319 library/mlx/acft.pyc    36286   14bca971b2e3aba95a2dcfca1e8317f7
     319library/mlx/acft.pyc    37473   3e6648f88ebabd4e2b695d2e49f4e79d
    320320library/gobject._gobject.pyd    113152  3d05dd191361f83aa247b62c700fa04e
    321321doc/manual/hu/checklistEditor.png       27863   8c750892a52dc10ca654a9d0b2765358
     
    330330library/encodings/cp863.pyc     7868    fc7ff06dab536b93c68fcb8e7bac713f
    331331library/xml/parsers/__init__.pyc        294     83f6a77ed8cd962b3c75c4779dc557ac
    332 library/pyexpat.pyc     546     ccf3d0df566cb35274165187cc26b2fe
     332library/pyexpat.pyc     546     0f30688f8dac3814a6eac9ca7910e527
    333333doc/manual/hu/gateSelection.png 26472   aa5a7d5602ec8544d1aed25b731a2460
    334334logo.png        69816   4a7517b22cfd75cc9c15e3fc1b7ebeec
     
    355355library/_socket.pyd     38400   5d273be76603399e88cf57f2605004bf
    356356sounds/ding.wav 80856   18e639792d3767436ac6955eb60e4f54
    357 library/_socket.pyc     546     0f631e04e95639805597d54f1753d7e0
     357library/_socket.pyc     546     835167109a0196c168b7dd10e7562ab2
    358358library/encodings/hex_codec.pyc 3520    a8b8d5b7c8810379c7007bcbc253951c
    359 library/mlx/checks.pyc  58147   34a5bf3f11b975072500165bb3599f8f
     359library/mlx/checks.pyc  58257   dbf35ff3f3e94e5479c32f39d8a919f0
    360360doc/manual/en/statusIcon2.png   5875    71fc121823dee0a4c00715fac1b5665c
    361 library/mlx/sound.pyc   6326    be3f6aa26c6b3fa2e358ad6882010a4d
     361library/mlx/sound.pyc   6326    33443e15039f5714339f41b355d0e30f
    362362doc/manual/en/pirepViewer.png   22216   326127e30fa405919b337cc9920698ed
    363363library/encodings/aliases.pyc   8750    75c22196420d0157fec085d285947a71
    364 library/glib/_glib.pyc  555     50a45dfb7fc78fead808072687ba11d5
     364library/glib/_glib.pyc  555     f86757facd85e32db6a4e3bb463f8019
    365365library/libpangowin32-1.0-0.dll 108945  d07f128828225b7cc38e9e590eb3ba8a
    366366library/encodings/iso8859_10.pyc        2693    5e6cc8f721486ddbc1c99da285e13191
    367 library/win32api.pyc    549     77d91a1efed3113697ab9b3dc3e12bea
     367library/win32api.pyc    549     eb908638a60b5da82c9212c47b0f7781
    368368library/gobject/constants.pyc   1957    2e9cdc605e7c449ef4fc23f56128acec
    369369library/libgtk-win32-2.0-0.dll  4938115 cc6dca192aca6f91bd96a5b5f86e036d
     
    394394library/webbrowser.pyc  18138   c85009edebad6d278fe786fec10ebbbe
    395395library/sre_compile.pyc 10792   c58f94fbee661f3bb0c59ecc13c0416e
    396 library/mlx/pyuipc_sim.pyc      56186   bd00d6dfd1771a62579c8fb84bf5dcf0
     396library/mlx/pyuipc_sim.pyc      56894   38f9c05d6ef797a6d345174b9d6b9ead
    397397library/encodings/iso8859_9.pyc 2678    88880e046738ebd2012c8034416a9adf
    398398library/encodings/cp875.pyc     2636    c72faa5d1cb6105ae81c971448fea479
     
    407407library/email/iterators.pyc     2266    b8a0df35815bc00be1ed8ece42aac537
    408408library/encodings/hz.pyc        1614    876bb7c36683358c3e95005619b10541
    409 library/select.pyc      543     4cc793adb82a4e1505ad2ee3f43b02ec
     409library/select.pyc      543     ff1dfee167d49aabeafa74ee4659ceb8
    410410library/encodings/iso2022_jp.pyc        1683    40c2b92127f99452f84b250c2b4b2cda
    411411library/libgthread-2.0-0.dll    44287   7ad6f303082b382bff7bafbab246c61f
    412412library/glib._glib.pyd  58368   0de636503e43c4eb00e80927bc9bda97
    413413library/mlx/config.pyc  29918   3b72b0439191e799656171cc7dd7c019
    414 library/atk.pyc 534     b03849f4a1eac3e542e97a385e0d1657
     414library/atk.pyc 534     4796262a8b1b52345a59ba0faa53e5cc
    415415library/gio._gio.pyd    263168  acb8c95fdc391079bebdf7d8685b0dbc
    416416library/encodings/cp861.pyc     7868    c97a8970ce4d9f40cbafbea6576fbdca
     
    422422library/__future__.pyc  4177    43d264d951ac2085334c7b9dd4558595
    423423library/logging/__init__.pyc    54813   7bcdf2e8da474f5e94d8e499f6fc3ed4
    424 runmlx.exe      64000   4ad32cb1aec39a193569f600adb7d977
     424runmlx.exe      64000   10345b15a699aae07c3c15c2cdbe6bed
    425425library/optparse.pyc    51253   39594a40bc1222173d57b7d5740e3d92
    426 library/mlx/fs.pyc      11756   c8b8a4a1d355432ff2aaa9ac8cd445d7
     426library/mlx/fs.pyc      11756   e00d02c76fac4a787e7a5702441ea864
     427library/unittest/result.pyc     7444    aefbb3cc79c0ff17787ce84faed7f5e8
    427428library/inspect.pyc     38547   836f659fad54f5ee7e8f9d565003aacd
    428429library/pickle.pyc      36348   2b55640f6f4e2fd70d95482fd16bfb73
     
    433434library/glib/option.pyc 11891   bd90183c75d8f473ecf653e3d63a27f9
    434435library/StringIO.pyc    11100   f4eb4a2bb3d6fb0af925681c5375c673
    435 library/pango.pyc       540     a9ea88a574b996c739cce07e2b315b3e
     436library/pango.pyc       540     bc12badc36d786fa32f867aaf7fc8036
    436437Microsoft.VC90.CRT/msvcp90.dll  568832  6de5c66e434a9c1729575763d891c6c2
    437438library/sre_parse.pyc   18380   fe2376a101668be1124f9ee316662bab
     439library/mlx/gui/delaycodes.pyc  12327   1ef0c40dfd726f737eafc266975298a8
    438440library/encodings/raw_unicode_escape.pyc        2048    8138045029da04bf45204ab756d1bcd4
    439441sounds/TOD.mp3  174707  92176d53d948fbfebd08c011b063179a
  • Makefile

    r276 r439  
    33all: $(foreach lang,$(LANGUAGES),locale/$(lang)/LC_MESSAGES/mlx.mo)
    44
    5 locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po
     5locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po locale/%/mlx_delay.po
    66        mkdir -p `dirname $@`
    7         msgfmt -o $@ $^
     7        msgcat $^ | msgfmt -o $@ -
     8
     9locale/hu/mlx_delay.po locale/en/mlx_delay.po: dcdatagen.py
     10        ./dcdatagen.py
  • doc/overview.dox

    r302 r444  
    1111 * Note, that to be able to understand the code most effectively, it
    1212 * is important to either use the application actively, or to read its
    13  * user documentation carefully. 
     13 * user documentation carefully.
    1414 *
    1515 * \section overview Overview
    1616 *
    17  * The application was written in 
     17 * The application was written in
    1818 * <a href="http://python.org">Python 2</a>. The Python wrapper
    1919 * <a href="http://gtk.org">Gtk+</a> toolkit was used for the graphical
     
    2323 * as the primary toolkit, while it has no reliable port for Windows
    2424 * yet. Therefore it was decided to support both Gtk+ 2 and 3
    25  * depending on the platform. For Gtk+ 2 the 
     25 * depending on the platform. For Gtk+ 2 the
    2626 * <a href="http://pygtk.org">PyGTK</a> wrapper is used, while for Gtk+
    2727 * 3 the <a href="https://live.gnome.org/PyGObject">PyGObject</a>
     
    3333 * <a href="http://www.schiratti.com/dowson.html">FSUIPC</a>
    3434 * interface. The author has created a Python mapping for it, which
    35  * has been submitted for inclusion into the SDK, so it will hopefully 
     35 * has been submitted for inclusion into the SDK, so it will hopefully
    3636 * appear in its next version. It is planned to support X-Plane in the
    3737 * near future (hopefully by the end of 2012) on both Linux and
     
    4545 * Gtk+ and Gtk+ itself. Since Python is an interpreted language,
    4646 * there is no need for any special build system.
    47  * 
     47 *
    4848 * Python and Gtk+ are readily available on most Linux distributions,
    4949 * but some links are probably useful for Windows users:
     
    5454 * \li To create install packages, you also need py2exe: <a href="http://www.py2exe.org/">http://www.py2exe.org</a>,
    5555 * \li as well as the Nullsoft Install System: http://nsis.sourceforge.net/Main_Page
    56  * 
     56 *
    5757 * The install package can be created by running the \c makeinst.bat
    5858 * file. It contains some absolute paths, so check those befure
     
    8181 *    thread. Instead, use \c gobject.idle_add to "inject" the
    8282 *    operation into the main thread.
    83  * -# To ensure the responsiveness of the GUI, only operations 
     83 * -# To ensure the responsiveness of the GUI, only operations
    8484 *    that take a short time should be executed in the GUI thread.
    8585 *
     
    9898 * simulator is to be supported, a class with the same (or at least
    9999 * sufficiently similar) public interface should be implemented.
    100  *             
     100 *
    101101 * The most important function of the program is the
    102102 * continuous monitoring of the aircraft's parameters and some other
    103103 * data. The monitoring is started using the \ref
    104104 * mlx.fsuipc.Simulator.startMonitoring "startMonitoring" function of
    105  * the simulator object. If started, it calls the \ref 
     105 * the simulator object. If started, it calls the \ref
    106106 * mlx.acft.Aircraft.handleState "handleState" function of the
    107107 * mlx.acft.Aircraft instance used. The mlx.acft module contains one
     
    114114 * smoothed values of IAS and VS, and then calls each "checker". A
    115115 * checker is an instance of a subclass of mlx.checks.StateChecker,
    116  * which checks a one or a few parameters that are important from some 
     116 * which checks a one or a few parameters that are important from some
    117117 * aspect of the correct execution of a flight. For example, a checker
    118  * may check if the \ref mlx.checks.StrobeLightsChecker 
     118 * may check if the \ref mlx.checks.StrobeLightsChecker
    119119 * "strobe lights" are switched on and off at the right stages of the
    120120 * flight. But some checkers simply log some \ref
    121121 * mlx.checks.AltimeterLogger "value" whenever it changes
    122122 * in an "interesting" way, or \ref mlx.checks.ACARSSender "send the
    123  * ACARS" periodically. 
     123 * ACARS" periodically.
    124124 *
    125125 * There is also a \ref mlx.checks.StageCheker "checker" which
    126126 * detects the changes in the stage of the flight, and calls the
    127127 * \ref mlx.acft.Aircraft.setStage "setStage" function of the
    128  * aircraft, if there is a change. It first calls the 
     128 * aircraft, if there is a change. It first calls the
    129129 * \ref mlx.flight.Flight "flight"'s \ref mlx.flight.Flight.setStage
    130130 * "setStage" function, which notifies the GUI and the \ref
     
    139139 * mlx.soundsched.SoundScheduler "sound scheduler" to check if some
    140140 * backround sound should be played. If the check list hotkey is
    141  * pressed, the \ref mlx.soundsched.ChecklistScheduler 
     141 * pressed, the \ref mlx.soundsched.ChecklistScheduler
    142142 * "checklist scheduler" is notified too.
    143143 *
    144144 * As mentioned, there is a \ref mlx.logger.Logger "logger" in the
    145145 * application, which contains the textual log lines as well as the
    146  * faults and their scores. 
     146 * faults and their scores.
    147147 *
    148148 * The business logic part contains many other components, but they
     
    151151 * modules for more information.
    152152 *
    153  * \subsection arch_gui GUI     
     153 * \subsection arch_gui GUI
    154154 *
    155155 * As mentioned, the GUI is implemented using Gtk+. This toolkit
     
    158158 * experience with Glade in an earlier project, it was decided to not
    159159 * use it. Instead, the GUI elements are created and handled by
    160  * hand-written code. 
     160 * hand-written code.
    161161 *
    162162 * The central class of the graphical user interface is
     
    165165 * connection to the simulator and creates the \ref mlx.flight.Flight
    166166 * "flight" and \ref mlx.flight.Aircraft "aircraft" objects as
    167  * needed. 
     167 * needed.
    168168 *
    169169 * To understand the operation of the GUI, one should be familiar with
    170170 * Gtk+, but otherwise it is pretty straighforward. See the
    171  * documentation of the relevant modules for more information.
     171 * documentation of the relevant modules for more information.
     172 *
     173 * \section newtype Adding a new aircraft type
     174 *
     175 * While new aircraft types will probably not be added too often, here
     176 * is a checklist about what should be modified when such a
     177 * requirement arises.
     178 *
     179 * First, it is worth to know what data you need to add the new type:
     180 *
     181 * \li the aircraft's type name and its ICAO code
     182 * \li the following weights: DOW, MZFW, MTOW, MLW
     183 * \li the flap settings and their speed limits
     184 * \li the speed limit for extending/retracting the gear (VLE)
     185 * \li the number and types of the fuel tanks
     186 * \li the type code the MAVA website uses to identify the type
     187 * \li if the plane has reversers, what is the operating limit speed,
     188 *     if any
     189 * \li does the plane support the notion of a takeoff derate, and if
     190 *     so, what data should be given
     191 * \li what lights does the plane have
     192 *
     193 * If you have the data, you can add the type by modifying the source
     194 * files as per the checklist below:
     195 *
     196 * -# \c src/mlx/const.py: look for the constants named AIRCRAFT_xxx.
     197 *    Add the new type at the end of the list of those constants, with
     198 *    a number 1 greater than the number of the last existing
     199 *    type. The part of the constant's name after the underscore (xxx
     200 *    above) should be the ICAO code of the aircraft type.
     201 * -# \c src/mlx/const.py: below this list of constants, you can find
     202 *    an array named \c aircraftTypes. Add the type constant to it.
     203 * -# \c src/mlx/const.py: further below you can find a dictionary
     204 *    mapping te aircraft type to the corresponding ICAO codes. Add
     205 *    the new type to it.
     206 * -# \c src/mlx/acft.py: add a new subclass of \ref
     207 *    mlx.acft.Aircraft. Its name should be the ICAO code. Check an
     208 *    existing aircraft and add the same variables containing the
     209 *    weights, the flap speed limits and the gear speed limit. There
     210 *    may be some other member variables or functions that should be
     211 * -# \c src/mlx/acft.py: there is a dictionary named \c _classes
     212 *    towards the end of the file. Add the type to it.
     213 * -# \c src/mlx/web.py: the \ref mlx.web.BookedFlight class contains
     214 *    two dictionaries, the mapping between the types and the values the MAVA
     215 *    website uses to identify the type. Add the appropriate values
     216 *    here.
     217 * -# \c src/mlx/fsuipc.py: add a subclass of \ref
     218 *    mlx.fsuipc.GenericAircraftModel for the new type named the ICAO
     219 *    code of the type followed by the word \c Model. Implement its
     220 *    constructor to supply the base class with the flaps notches
     221 *    (starting with 0), the array of constants describing the fuel
     222 *    tanks the model has, and the number of engines. Also implement
     223 *    the name of the model, which should be something like
     224 *    "FSUIPC/Generic ...". If necessary implement other functions or
     225 *    set other members.
     226 * -# \c src/mlx/fsuipc.py: add the new type and model class to the
     227 *    dictionary named \c _genericModels towards the end of the file.
     228 * -# \c src/mlx/fsuipc.py: if you have a model that has some
     229 *    non-generic characteristics, create a specific class for
     230 *    it. This class should be a subclass of the generic class
     231 *    created, and it should be registered at the bottom of the file,
     232 *    as the other models are.
     233 * -# \c src/mlx/gui/common.py: this file contains a dictionary called
     234 *    \c mlx.gui.common.aircraftNames. Add the new type it it. It
     235 *    contains the mapping from the type constants to their
     236 *    language-specific names. The string ID is "aircraft_" followed by
     237 *    the lower-cased ICAO code.
     238 * -# \c locale/hu/mlx.po, locale/en/mlx.po: the beginning of this
     239 *    file contains mapping from the string ID previously used to the
     240 *    actual name of the aircraft. Add the new type as appropriate.
     241 * -# \c dcdatagen.py: this program generates some source and message
     242 *    files related to the delay codes. Currently there are two
     243 *    tables, one for old-timer types and the other for the "modern" types.
     244 *    The file contains a list of lists called \c typeGroups. Add the
     245 *    type's ICAO code the appropriate list.
     246 *
     247 * When all the changes have been made, run \c make in the root
     248 * directory to update some source files.
    172249 */
    173  
  • locale/en/mlx.po

    r393 r445  
    6363msgid "aircraft_yk40"
    6464msgstr "Yakovlev Yak-40"
     65
     66msgid "aircraft_b462"
     67msgstr "British Aerospace 146-200"
    6568
    6669msgid "file_filter_all"
     
    777780msgstr "N_ominal/takeoff:"
    778781
     782msgid "takeoff_derate_b462"
     783msgstr "Der_ate (yes/no):"
     784
    779785msgid "takeoff_derate_tooltip"
    780786msgstr "Enter the takeoff derate parameter."
     
    971977msgid "info_delay"
    972978msgstr "Delay codes"
    973 
    974 msgid "info_delay_loading"
    975 msgstr "L_oading problems"
    976 
    977 msgid "info_delay_vatsim"
    978 msgstr "_VATSIM problem"
    979 
    980 msgid "info_delay_net"
    981 msgstr "_Net problems"
    982 
    983 msgid "info_delay_atc"
    984 msgstr "Controll_er's fault"
    985 
    986 msgid "info_delay_system"
    987 msgstr "S_ystem crash/freeze"
    988 
    989 msgid "info_delay_nav"
    990 msgstr "Naviga_tion problem"
    991 
    992 msgid "info_delay_traffic"
    993 msgstr "T_raffic problems"
    994 
    995 msgid "info_delay_apron"
    996 msgstr "_Apron navigation problem"
    997 
    998 msgid "info_delay_weather"
    999 msgstr "_Weather problems"
    1000 
    1001 msgid "info_delay_personal"
    1002 msgstr "_Personal reasons"
    1003979
    1004980msgid "statusbar_conn_tooltip"
  • locale/hu/mlx.po

    r393 r445  
    6464msgstr "Jakovlev Jak-40"
    6565
     66msgid "aircraft_b462"
     67msgstr "British Aerospace 146-200"
     68
    6669msgid "file_filter_all"
    6770msgstr "Összes fájl"
     
    778781msgstr "Névleges/felszállási:"
    779782
     783msgid "takeoff_derate_b462"
     784msgstr "Teljesítménycsökkentés (yes/no):"
     785
    780786msgid "takeoff_derate_tooltip"
    781787msgstr "Írd be a felszállási teljesítménycsökkentés értékét."
     
    974980msgid "info_delay"
    975981msgstr "Késés kódok"
    976 
    977 msgid "info_delay_loading"
    978 msgstr "_Betöltési problémák"
    979 
    980 msgid "info_delay_vatsim"
    981 msgstr "_VATSIM probléma"
    982 
    983 msgid "info_delay_net"
    984 msgstr "_Hálózati problémák"
    985 
    986 msgid "info_delay_atc"
    987 msgstr "Irán_yító hibája"
    988 
    989 msgid "info_delay_system"
    990 msgstr "_Rendszer elszállás/fagyás"
    991 
    992 msgid "info_delay_nav"
    993 msgstr "Navi_gációs probléma"
    994 
    995 msgid "info_delay_traffic"
    996 msgstr "_Forgalmi problémák"
    997 
    998 msgid "info_delay_apron"
    999 msgstr "_Előtér navigációs probléma"
    1000 
    1001 msgid "info_delay_weather"
    1002 msgstr "Időjárási _problémák"
    1003 
    1004 msgid "info_delay_personal"
    1005 msgstr "S_zemélyes okok"
    1006982
    1007983msgid "statusbar_conn_tooltip"
  • src/mlx/acft.py

    r409 r447  
    152152        self._checkers.append(checks.VSChecker())
    153153
    154         timeout = 5.0 + config.realIASSmoothingLength - 1
     154        timeout = 30.0 + config.realIASSmoothingLength - 1
    155155        self._checkers.append(checks.OverspeedChecker(timeout = timeout))
    156156
     
    10171017#---------------------------------------------------------------------------------------
    10181018
     1019class B462(Aircraft):
     1020    """British Aerospace BAe-146 aircraft.
     1021
     1022    The aircraft type-specific values in the aircraft state have the following
     1023    structure:
     1024    - fuel: left, centre, right
     1025    - n1: left outer, left inner, right inner, right outer
     1026    - reverser: empty (the plane has no reversers)"""
     1027    def __init__(self, flight):
     1028        super(B462, self).__init__(flight)
     1029        self.dow = 25706
     1030        self.mtow = 43998
     1031        self.mlw = 38599
     1032        self.mzfw = 33792
     1033        self.gearSpeedLimit = 210
     1034        self.flapSpeedLimits = { 18 : 217,
     1035                                 24 : 180,
     1036                                 30 : 170,
     1037                                 33 : 150 }
     1038
     1039    @property
     1040    def derateLabels(self):
     1041        """Get the derate strings for this type."""
     1042        return (xstr("takeoff_derate_b462"), None)
     1043
     1044    @property
     1045    def derateTemplate(self):
     1046        """Get the derate template for this aicraft type."""
     1047        return "Derate enabled: %s"
     1048
     1049#---------------------------------------------------------------------------------------
     1050
    10191051mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
    10201052                 const.FUELTANK_LEFT_AUX,
     
    10401072             const.AIRCRAFT_T134  : T134,
    10411073             const.AIRCRAFT_T154  : T154,
    1042              const.AIRCRAFT_YK40  : YK40 }
     1074             const.AIRCRAFT_YK40  : YK40,
     1075             const.AIRCRAFT_B462  : B462 }
    10431076
    10441077#---------------------------------------------------------------------------------------
  • src/mlx/checks.py

    r416 r453  
    940940            if n1>5: numEnginesRunning += 1
    941941
    942         if flight.stage==const.STAGE_PARKING:
     942        if flight.stage==const.STAGE_PARKING or \
     943           (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking):
    943944            return numEnginesRunning<len(state.n1) \
    944945                   and state.antiCollisionLightsOn
     
    10501051    def isCondition(self, flight, aircraft, oldState, state):
    10511052        """Check if the fault condition holds."""
    1052         return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or \
    1053                                     state.radioAltitude>=50)
     1053        return state.gLoad>2.0 and not state.onTheGround and \
     1054          (flight.stage!=const.STAGE_LANDING or state.radioAltitude>=50)
    10541055
    10551056    def logFault(self, flight, aircraft, logger, oldState, state):
     
    11181119                 (flight.stage in
    11191120                  [const.STAGE_CRUISE, const.STAGE_DESCENT,
    1120                    const.STAGE_LANDING, const.STAGE_GOAROUND] or \
     1121                   const.STAGE_GOAROUND] or \
     1122                  (flight.stage==const.STAGE_LANDING  and
     1123                   state.groundSpeed>50.0) or \
    11211124                  ((not state.autoXPDR or \
    11221125                    (self._liftOffTime is not None and
     
    12351238class OverspeedChecker(PatientFaultChecker):
    12361239    """Check if Vne has been exceeded."""
    1237     def __init__(self, timeout = 5.0):
     1240    def __init__(self, timeout = 30.0):
    12381241        """Construct the checker."""
    12391242        super(OverspeedChecker, self).__init__(timeout = timeout)
     
    13041307        return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING,
    13051308                                const.STAGE_TAXIAFTERLAND] and \
     1309            state.reverser and \
    13061310            state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser)
    13071311
     
    13501354    If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as
    13511355    saved as a provisional takeoff state. If the speed then decreases below 50
    1352     knots, or the plane remains on the ground for more than 20 seconds, a taxi
     1356    knots, or the plane remains on the ground for more than 40 seconds, a taxi
    13531357    speed error is logged with the highest ground speed detected. This state is
    13541358    also stored in the flight object as a possible
    13551359
    1356     If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,
     1360    If the plane becomes airborne within 40 seconds, the stage becomes TAKEOFF,
    13571361    and the previously saved takeoff state is logged.
    13581362
     
    13861390                    aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF)
    13871391                    self._takeoffState = None
    1388                 elif state.timestamp > (self._takeoffState.timestamp + 30):
     1392                elif state.timestamp > (self._takeoffState.timestamp + 40):
    13891393                    flight.setRTOState(self._highestSpeedState)
    13901394        elif self._takeoffState is not None:
  • src/mlx/const.py

    r459 r466  
    1111
    1212## The version of the program
    13 VERSION="0.15.1"
     13VERSION="0.17.1"
    1414
    1515#-------------------------------------------------------------------------------
     
    9595## Aircraft type: Yakovlev Yak-40
    9696AIRCRAFT_YK40 = 15
     97
     98## Aircraft type: British Aerospace BAe-146
     99AIRCRAFT_B462 = 17
    97100
    98101#-------------------------------------------------------------------------------
     
    108111                 AIRCRAFT_B733, AIRCRAFT_B734, AIRCRAFT_B735,
    109112                 AIRCRAFT_T154, AIRCRAFT_T134,
    110                  AIRCRAFT_YK40, AIRCRAFT_DC3]
     113                 AIRCRAFT_YK40, AIRCRAFT_DC3,
     114                 AIRCRAFT_B462]
    111115
    112116#-------------------------------------------------------------------------------
     
    129133              AIRCRAFT_T134  : "T134",
    130134              AIRCRAFT_T154  : "T154",
    131               AIRCRAFT_YK40  : "YK40" }
     135              AIRCRAFT_YK40  : "YK40",
     136              AIRCRAFT_B462  : "B462" }
    132137
    133138#-------------------------------------------------------------------------------
     
    237242#-------------------------------------------------------------------------------
    238243
    239 ## Delay code: loading problems
    240 DELAYCODE_LOADING = 0
    241 
    242 ## Delay code: VATSIM problem
    243 DELAYCODE_VATSIM = 1
    244 
    245 ## Delay code: network problems
    246 DELAYCODE_NETWORK = 2
    247 
    248 ## Delay code: controller's fault
    249 DELAYCODE_CONTROLLER = 3
    250 
    251 ## Delay code: system crash or freeze
    252 DELAYCODE_SYSTEM = 4
    253 
    254 ## Delay code: navigation problem
    255 DELAYCODE_NAVIGATION = 5
    256 
    257 ## Delay code: traffic problems
    258 DELAYCODE_TRAFFIC = 6
    259 
    260 ## Delay code: apron navigation
    261 DELAYCODE_APRON = 7
    262 
    263 ## Delay code: weather problems
    264 DELAYCODE_WEATHER = 8
    265 
    266 ## Delay code: personal reasons
    267 DELAYCODE_PERSONAL = 9
    268 
    269 #-------------------------------------------------------------------------------
    270 
    271244## Message type: logger error
    272245# FIXME: cannot set the hotkey
  • src/mlx/fsuipc.py

    r412 r456  
    17401740        return "FSUIPC/Dreamwings Bombardier Dash 8-Q400"
    17411741
     1742    def addMonitoringData(self, data, fsType):
     1743        """Add the model-specific monitoring data to the given array."""
     1744        super(DreamwingsDH8DModel, self).addMonitoringData(data, fsType)
     1745
     1746        self._addOffsetWithIndexMember(data, 0x132c, "d", "_dwdh8d_navgps")
     1747
    17421748    def getAircraftState(self, aircraft, timestamp, data):
    17431749        """Get the aircraft state.
     
    17471753                                                                  timestamp,
    17481754                                                                  data)
    1749         state.pitotHeatOn = not state.pitotHeatOn
     1755        if data[self._dwdh8d_navgps]==1:
     1756            state.apHeading = None
    17501757
    17511758        return state
     
    20432050#------------------------------------------------------------------------------
    20442051
     2052class B462Model(GenericAircraftModel):
     2053    """Generic model for the British Aerospace BAe 146-200 aircraft."""
     2054    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE,
     2055                 const.FUELTANK_RIGHT]
     2056
     2057    def __init__(self):
     2058        """Construct the model."""
     2059        super(B462Model, self). \
     2060            __init__(flapsNotches = [0, 18, 24, 30, 33],
     2061                     fuelTanks = B462Model.fuelTanks,
     2062                     numEngines = 4)
     2063
     2064    @property
     2065    def name(self):
     2066        """Get the name for this aircraft model."""
     2067        return "FSUIPC/Generic British Aerospace 146"
     2068
     2069    def getAircraftState(self, aircraft, timestamp, data):
     2070        """Get an aircraft state object for the given monitoring data.
     2071
     2072        This removes the reverser value for the middle engine."""
     2073        state = super(B462Model, self).getAircraftState(aircraft, timestamp, data)
     2074        state.reverser = []
     2075        return state
     2076
     2077#------------------------------------------------------------------------------
     2078
    20452079_genericModels = { const.AIRCRAFT_B736  : B737Model,
    20462080                   const.AIRCRAFT_B737  : B737Model,
     
    20582092                   const.AIRCRAFT_T134  : T134Model,
    20592093                   const.AIRCRAFT_T154  : T154Model,
    2060                    const.AIRCRAFT_YK40  : YK40Model }
     2094                   const.AIRCRAFT_YK40  : YK40Model,
     2095                   const.AIRCRAFT_B462  : B462Model }
    20612096
    20622097#------------------------------------------------------------------------------
  • src/mlx/gui/common.py

    r401 r443  
    7373
    7474    SHADOW_IN = gtk.SHADOW_IN
     75    SHADOW_NONE = gtk.SHADOW_NONE
    7576
    7677    POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC
     
    8687
    8788    EVENT_BUTTON_PRESS = gdk.BUTTON_PRESS
     89
     90    TREE_VIEW_COLUMN_FIXED = gtk.TREE_VIEW_COLUMN_FIXED
     91
     92    FILL = gtk.FILL
     93    EXPAND = gtk.EXPAND
    8894
    8995    pixbuf_new_from_file = gdk.pixbuf_new_from_file
     
    139145
    140146    SHADOW_IN = gtk.ShadowType.IN
     147    SHADOW_NONE = gtk.ShadowType.NONE
    141148
    142149    POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC
     
    152159
    153160    EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS
     161
     162    TREE_VIEW_COLUMN_FIXED = gtk.TreeViewColumnSizing.FIXED
     163
     164    FILL = gtk.AttachOptions.FILL
     165    EXPAND = gtk.AttachOptions.EXPAND
    154166
    155167    pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
     
    286298                  _const.AIRCRAFT_T134  : xstr("aircraft_t134"),
    287299                  _const.AIRCRAFT_T154  : xstr("aircraft_t154"),
    288                   _const.AIRCRAFT_YK40  : xstr("aircraft_yk40") }
     300                  _const.AIRCRAFT_YK40  : xstr("aircraft_yk40"),
     301                  _const.AIRCRAFT_B462  : xstr("aircraft_b462") }
    289302
    290303#------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r413 r436  
    368368    def _loginClicked(self, button):
    369369        """Called when the login button was clicked."""
    370         print "mlx.flight.LoginPage: logged in"
     370        print "mlx.flight.LoginPage: logging in"
    371371        self._wizard.login(self._handleLoginResult,
    372372                           self._pilotID.get_text(),
     
    591591        flight = self._getSelectedFlight()
    592592        self._wizard._bookedFlight = flight
    593         self._wizard.gui.enableFlightInfo()
     593        self._wizard.gui.enableFlightInfo(flight.aircraftType)
    594594
    595595        self._updateDepartureGate()
  • src/mlx/gui/gui.py

    r393 r436  
    486486            self.reset()
    487487
    488     def enableFlightInfo(self):
     488    def enableFlightInfo(self, aircraftType):
    489489        """Enable the flight info tab."""
    490         self._flightInfo.enable()
     490        self._flightInfo.enable(aircraftType)
    491491
    492492    def cancelFlight(self):
  • src/mlx/gui/info.py

    r349 r441  
    11
    22from common import *
     3
     4from mlx.gui.delaycodes import DelayCodeTable
    35
    46from mlx.i18n import xstr
     
    2123    """The flight info tab."""
    2224    @staticmethod
    23     def _delayCodes():
    24         """Get an array of delay codes."""
    25         return [ (const.DELAYCODE_LOADING, xstr("info_delay_loading")),
    26                  (const.DELAYCODE_VATSIM, xstr("info_delay_vatsim")),
    27                  (const.DELAYCODE_NETWORK, xstr("info_delay_net")),
    28                  (const.DELAYCODE_CONTROLLER, xstr("info_delay_atc")),
    29                  (const.DELAYCODE_SYSTEM, xstr("info_delay_system")),
    30                  (const.DELAYCODE_NAVIGATION, xstr("info_delay_nav")),
    31                  (const.DELAYCODE_TRAFFIC, xstr("info_delay_traffic")),
    32                  (const.DELAYCODE_APRON, xstr("info_delay_apron")),
    33                  (const.DELAYCODE_WEATHER, xstr("info_delay_weather")),
    34                  (const.DELAYCODE_PERSONAL, xstr("info_delay_personal")) ]
    35 
    36     @staticmethod
    3725    def _createCommentArea(label):
    3826        """Create a comment area.
     
    5240
    5341        scroller = gtk.ScrolledWindow()
    54         # FIXME: these should be constants
    55         scroller.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
    56                             else gtk.POLICY_AUTOMATIC,
    57                             gtk.PolicyType.AUTOMATIC if pygobject
    58                             else gtk.POLICY_AUTOMATIC)
    59         scroller.set_shadow_type(gtk.ShadowType.IN if pygobject
    60                                  else gtk.SHADOW_IN)
     42        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
     43        scroller.set_shadow_type(SHADOW_IN)
     44
    6145        comments = gtk.TextView()
    6246        comments.set_wrap_mode(WRAP_WORD)
     
    9478
    9579        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
    96                                   xscale = 0.0, yscale = 0.0)
     80                                  xscale = 1.0, yscale = 1.0)
    9781        alignment.set_padding(padding_top = 4, padding_bottom = 4,
    9882                              padding_left = 8, padding_right = 8)
    9983
    100         self._delayTable = table = gtk.Table(5, 2)
    101         table.set_col_spacings(16)
     84        self._delayCodeTable = table = DelayCodeTable()
     85        self._delayWindow = scrolledWindow = gtk.ScrolledWindow()
     86        scrolledWindow.add(table)
     87        scrolledWindow.set_size_request(-1, 185)
     88        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
     89        scrolledWindow.set_shadow_type(SHADOW_IN)
    10290
    103         row = 0
    104         column = 0
    105 
    106         self._delayCodeWidgets = []
    107         for (_code, label) in FlightInfo._delayCodes():
    108             button = gtk.CheckButton(label)
    109             button.set_use_underline(True)
    110             table.attach(button, column, column + 1, row, row + 1)
    111             self._delayCodeWidgets.append(button)
    112             if column==0:
    113                 column += 1
    114             else:
    115                 row += 1
    116                 column = 0
    117 
    118         alignment.add(table)
     91        alignment.add(scrolledWindow)
    11992        frame.add(alignment)
    12093
    12194        self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
    122                                              xscale = 0.0, yscale = 0.0)
     95                                             xscale = 1.0, yscale = 1.0)
    12396        self._delayAlignment.add(frame)
     97        self._delayAlignment.set_padding(padding_top = 0, padding_bottom = 0,
     98                                         padding_left = 8, padding_right = 8)
    12499
    125100        self.pack_start(self._delayAlignment, False, False, 8)
     
    147122    def delayCodes(self):
    148123        """Get the list of delay codes checked by the user."""
    149         codes =  []
    150         delayCodes = FlightInfo._delayCodes()
    151         for index in range(0, len(delayCodes)):
    152             if self._delayCodeWidgets[index].get_active():
    153                 codes.append(delayCodes[index][0])
    154         return codes
     124        return self._delayCodeTable.delayCodes
    155125
    156     def enable(self):
     126    def enable(self, aircraftType):
    157127        """Enable the flight info tab."""
    158128        self._comments.set_sensitive(True)
    159129        self._flightDefects.set_sensitive(True)
    160         self._delayTable.set_sensitive(True)
     130        self._delayCodeTable.setType(aircraftType)
     131        self._delayWindow.set_sensitive(True)
     132        self._delayCodeTable.setStyle()
    161133
    162134    def disable(self):
     
    164136        self._comments.set_sensitive(False)
    165137        self._flightDefects.set_sensitive(False)
    166         self._delayTable.set_sensitive(False)
     138        self._delayWindow.set_sensitive(False)
     139        self._delayCodeTable.setStyle()
    167140
    168141    def reset(self):
     
    170143        self._comments.get_buffer().set_text("")
    171144        self._flightDefects.get_buffer().set_text("")
    172 
    173         for widget in self._delayCodeWidgets:
    174             widget.set_active(False)
     145        self._delayCodeTable.reset()
    175146
    176147    def _commentsChanged(self, textbuffer):
  • src/mlx/gui/pirep.py

    r303 r437  
    241241        for code in pirep.delayCodes:
    242242            if delayCodes: delayCodes += ", "
    243             delayCodes += PIREP.delayCodeNames[code]
     243            delayCodes += code
    244244       
    245245        self._delayCodes.get_buffer().set_text(delayCodes)       
  • src/mlx/pirep.py

    r401 r437  
    1919class PIREP(object):
    2020    """A pilot's report of a flight."""
    21     delayCodeNames = { const.DELAYCODE_LOADING : "Loading Problems",
    22                        const.DELAYCODE_NETWORK : "Net Problems",
    23                        const.DELAYCODE_SYSTEM : "System Crash/Freezing",
    24                        const.DELAYCODE_TRAFFIC : "Traffic Problems",
    25                        const.DELAYCODE_WEATHER : "Weather Problems",
    26                        const.DELAYCODE_VATSIM : "VATSIM Problem",
    27                        const.DELAYCODE_CONTROLLER : "Controller's Fault",
    28                        const.DELAYCODE_NAVIGATION : "Navigation Problem",
    29                        const.DELAYCODE_APRON : "Apron Navigation Problems",
    30                        const.DELAYCODE_PERSONAL : "Personal Reasons" }
    31 
    3221    @staticmethod
    3322    def _formatLine(timeStr, line):
     
    140129            for code in self.delayCodes:
    141130                if s: s += ", "
    142                 s += PIREP.delayCodeNames[code]
     131                s += code
    143132            return s
    144133
  • src/mlx/pyuipc_sim.py

    r408 r443  
    158158    ENGINE_3 = 2
    159159
     160    ## Engine index: engine #4
     161    ENGINE_4 = 3
     162
    160163    ## The number of hotkey entries
    161164    HOTKEY_SIZE = 56
     
    295298        self.visibility = 10000
    296299
    297         self.n1 = [0.0, 0.0, 0.0]
    298         self.throttles = [0.0, 0.0, 0.0]
     300        self.n1 = [0.0, 0.0, 0.0, 0.0]
     301        self.throttles = [0.0, 0.0, 0.0, 0.0]
    299302
    300303        self.payloadCount = 1
     
    328331        self.eng2DeIce = False
    329332        self.eng3DeIce = False
     333        self.eng4DeIce = False
    330334        self.propDeIce = False
    331335        self.structDeIce = False
     
    427431        elif offset==0x09e2:       # Engine #3 de-ice
    428432            return 1 if self.eng3DeIce else 0
     433        elif offset==0x0a54:       # Engine #4 throttle
     434            return self._getThrottle(self.ENGINE_4)
     435        elif offset==0x0a7a:       # Engine #4 de-ice
     436            return 1 if self.eng4DeIce else 0
    429437        elif offset==0x0af4:       # Fuel weight
    430438            return int(self.fuelWeight * 256.0)
     
    533541            return self.n1[self.ENGINE_2]
    534542        elif offset==0x2200:       # Engine #3 N1
     543            return self.n1[self.ENGINE_3]
     544        elif offset==0x2300:       # Engine #4 N1
    535545            return self.n1[self.ENGINE_3]
    536546        elif offset==0x2ea0:       # Elevator trim
     
    695705        elif offset==0x09e2:       # Engine #3 de-ice
    696706            self.eng3DeIce = value!=0
     707        elif offset==0x0a54:       # Engine #4 throttle
     708            self._setThrottle(self.ENGINE_4, value)
     709        elif offset==0x0a7a:       # Engine #4 de-ice
     710            self.eng4DeIce = value!=0
    697711        elif offset==0x0af4:       # Fuel weight
    698712            self.fuelWeight = value / 256.0
     
    796810        elif offset==0x2200:       # Engine #3 N1
    797811            self.n1[self.ENGINE_3] = value
     812        elif offset==0x2300:       # Engine #4 N1
     813            self.n1[self.ENGINE_4] = value
    798814        elif offset==0x2ea0:       # Elevator trim
    799815            self.elevatorTrim = value * 180.0 / math.pi
     
    14131429        self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value,
    14141430                                       lambda word: float(word))
     1431        self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value,
     1432                                       lambda word: float(word))
    14151433
    14161434        self._valueHandlers["throttle_1"] = ([(0x088c, "H")],
     
    14211439                                             CLI.throttle2pyuipc)
    14221440        self._valueHandlers["throttle_3"] = ([(0x09bc, "H")],
     1441                                             CLI.pyuipc2throttle,
     1442                                             CLI.throttle2pyuipc)
     1443        self._valueHandlers["throttle_4"] = ([(0x0a54, "H")],
    14231444                                             CLI.pyuipc2throttle,
    14241445                                             CLI.throttle2pyuipc)
     
    14901511                                            CLI.bool2str, CLI.str2bool)
    14911512        self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")],
     1513                                            CLI.bool2str, CLI.str2bool)
     1514        self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")],
    14921515                                            CLI.bool2str, CLI.str2bool)
    14931516        self._valueHandlers["propDeice"] = ([(0x337c, "b")],
  • src/mlx/web.py

    r401 r443  
    6363                      "TU3"  : const.AIRCRAFT_T134,
    6464                      "TU5"  : const.AIRCRAFT_T154,
    65                       "YK4"  : const.AIRCRAFT_YK40 }
     65                      "YK4"  : const.AIRCRAFT_YK40,
     66                      "146"  : const.AIRCRAFT_B462 }
    6667
    6768    TYPE2TYPECODE = { const.AIRCRAFT_B736  : "736",
     
    8081                      const.AIRCRAFT_T134  : "TU3",
    8182                      const.AIRCRAFT_T154  : "TU5",
    82                       const.AIRCRAFT_YK40  : "YK4" }
     83                      const.AIRCRAFT_YK40  : "YK4",
     84                      const.AIRCRAFT_B462  : "146" }
    8385
    8486    @staticmethod
     
    115117        departureTime = readline(f)
    116118        self.departureTime = BookedFlight.getDateTime(date, departureTime)
    117                                                
     119
    118120        arrivalTime = readline(f)
    119121        self.arrivalTime = BookedFlight.getDateTime(date, arrivalTime)
     
    130132        departureTime = None
    131133        arrivalTime = None
    132        
     134
    133135        line = f.readline()
    134         lineNumber = 0   
     136        lineNumber = 0
    135137        while line:
    136138            lineNumber += 1
    137139            line = line.strip()
    138            
     140
    139141            hashIndex = line.find("#")
    140142            if hashIndex>=0: line = line[:hashIndex]
     
    142144                equalIndex = line.find("=")
    143145                lineOK = equalIndex>0
    144                
     146
    145147                if lineOK:
    146                     key = line[:equalIndex].strip()                   
     148                    key = line[:equalIndex].strip()
    147149                    value = line[equalIndex+1:].strip().replace("\:", ":")
    148                    
     150
    149151                    lineOK = key and value
    150152
     
    196198            self.aircraftTypeName = \
    197199                BookedFlight.TYPE2TYPECODE[self.aircraftType]
    198            
     200
    199201    def writeIntoFile(self, f):
    200202        """Write the flight into a file."""
     
    235237        else:
    236238            raise Exception("Invalid aircraft type code: '" + typeCode + "'")
    237        
     239
    238240    def __repr__(self):
    239241        """Get a representation of the flight."""
     
    248250        s += ">"
    249251        return s
    250        
     252
    251253#------------------------------------------------------------------------------
    252254
     
    279281    def __repr__(self):
    280282        """Get the representation of the plane object."""
    281         s = "<Plane: %s %s" % (self.tailNumber, 
     283        s = "<Plane: %s %s" % (self.tailNumber,
    282284                               "home" if self.status==const.PLANE_HOME else \
    283285                               "away" if self.status==const.PLANE_AWAY else \
     
    288290        s += ">"
    289291        return s
    290        
     292
    291293
    292294#------------------------------------------------------------------------------
     
    323325                gateNumbers.add(p.gateNumber)
    324326        return gateNumbers
    325    
     327
    326328    def updatePlane(self, tailNumber, status, gateNumber = None):
    327329        """Update the status of the given plane."""
     
    330332            plane.status = status
    331333            plane.gateNumber = gateNumber
    332    
     334
    333335    def __iter__(self):
    334336        """Get an iterator over the planes."""
    335337        for plane in self._planes.itervalues():
    336338            yield plane
    337        
     339
    338340    def __getitem__(self, tailNumber):
    339341        """Get the plane with the given tail number.
     
    345347        """Get the representation of the fleet object."""
    346348        return self._planes.__repr__()
    347        
     349
    348350#------------------------------------------------------------------------------
    349351
     
    371373        s += ">"
    372374        return s
    373    
     375
    374376#------------------------------------------------------------------------------
    375377
     
    389391           "E" not in attrs or not attrs["E"]:
    390392            return
    391        
     393
    392394        icao = attrs["A"]
    393395        if icao not in self._notams:
    394396            return
    395        
     397
    396398        begin = datetime.datetime.strptime(attrs["B"], "%Y-%m-%d %H:%M:%S")
    397399
    398400        c = attrs["C"] if "C" in attrs else None
    399401        end = datetime.datetime.strptime(c, "%Y-%m-%d %H:%M:%S") if c else None
    400        
     402
    401403        permanent = attrs["C_flag"]=="PERM" if "C_flag" in attrs else False
    402        
     404
    403405        repeatCycle = attrs["D"] if "D" in attrs else None
    404406
     
    473475    """A login request."""
    474476    iso88592decoder = codecs.getdecoder("iso-8859-2")
    475    
     477
    476478    def __init__(self, callback, pilotID, password, entranceExam):
    477479        """Construct the login request with the given pilot ID and
     
    488490        md5.update(self._pilotID)
    489491        pilotID = md5.hexdigest()
    490        
     492
    491493        md5 = hashlib.md5()
    492494        md5.update(self._password)
     
    524526                result.pilotName = self.iso88592decoder(readline(f))[0]
    525527                result.exams = readline(f)
    526                
     528
    527529                while True:
    528530                    line = readline(f)
     
    540542
    541543        return result
    542        
     544
    543545#------------------------------------------------------------------------------
    544546
    545547class GetFleet(Request):
    546548    """Request to get the fleet from the website."""
    547    
     549
    548550    def __init__(self, callback):
    549551        """Construct the fleet request."""
     
    558560        result.fleet = Fleet(f)
    559561        f.close()
    560        
     562
    561563        return result
    562564
     
    585587                                 ("status", status),
    586588                                 ("kapu", gateNumber)])
    587        
     589
    588590        f = urllib2.urlopen(url, data, timeout = 10.0)
    589591        line = readline(f)
    590        
     592
    591593        result = Result()
    592594        result.success = line == "OK"
    593595
    594596        return result
    595            
     597
    596598#------------------------------------------------------------------------------
    597599
     
    628630
    629631class GetMETARs(Request):
    630     """Get the METARs from the NOAA website for certain airport ICAOs."""   
     632    """Get the METARs from the NOAA website for certain airport ICAOs."""
    631633
    632634    def __init__(self, callback, airports):
     
    639641        url = "http://www.aviationweather.gov/adds/dataserver_current/httpparam?"
    640642        data = urllib.urlencode([ ("dataSource" , "metars"),
    641                                   ("requestType",  "retrieve"), 
     643                                  ("requestType",  "retrieve"),
    642644                                  ("format", "csv"),
    643645                                  ("stationString", " ".join(self._airports)),
     
    652654                if len(line)>5 and line[4]==' ':
    653655                    icao = line[0:4]
    654                     if icao in self._airports:                       
     656                    if icao in self._airports:
    655657                        result.metars[icao] = line.strip().split(",")[0]
    656658        finally:
     
    696698        data["bag"] = str(pirep.bagWeight)
    697699        data["mail"] = str(pirep.mailWeight)
    698        
     700
    699701        data["flttype"] = SendPIREP._flightTypes[pirep.flightType]
    700702        data["onoff"] = "1" if pirep.online else "0"
     
    742744            f.close()
    743745
    744         return result   
     746        return result
    745747#------------------------------------------------------------------------------
    746748
     
    757759        """Perform the sending of the ACARS."""
    758760        print "Sending the online ACARS"
    759        
     761
    760762        url = "http://www.virtualairlines.hu/acars2/acarsonline.php"
    761763
     
    766768        data["pid"] = acars.pid
    767769        data["pilot"] = SendACARS._latin2Encoder(acars.pilotName)[0]
    768    
     770
    769771        data["pass"] = str(bookedFlight.numPassengers)
    770772        data["callsign"] = bookedFlight.callsign
    771773        data["airplane"] = bookedFlight.aircraftTypeName
    772774        data["from"] = bookedFlight.departureICAO
    773         data["to"] = bookedFlight.arrivalICAO       
     775        data["to"] = bookedFlight.arrivalICAO
    774776        data["lajstrom"] = bookedFlight.tailNumber
    775777
     
    779781        data["altitude"] = str(acars.state.altitude)
    780782        data["speed"] = str(acars.state.groundSpeed)
    781        
     783
    782784        data["event"] = acars.getEventText()
    783785
     
    788790            f.close()
    789791
    790         return result   
     792        return result
    791793
    792794#------------------------------------------------------------------------------
     
    813815        """Enqueue a fleet retrieval request."""
    814816        self._addRequest(GetFleet(callback))
    815        
     817
    816818    def updatePlane(self, callback, tailNumber, status, gateNumber = None):
    817         """Update the status of the given plane."""       
     819        """Update the status of the given plane."""
    818820        self._addRequest(UpdatePlane(callback, tailNumber, status, gateNumber))
    819821
     
    821823        """Get the NOTAMs for the given two airports."""
    822824        self._addRequest(GetNOTAMs(callback, departureICAO, arrivalICAO))
    823        
     825
    824826    def getMETARs(self, callback, airports):
    825827        """Get the METARs for the given airports."""
     
    833835        """Send the given ACARS"""
    834836        self._addRequest(SendACARS(callback, acars))
    835        
     837
    836838    def run(self):
    837839        """Process the requests."""
     
    844846
    845847            request.perform()
    846    
     848
    847849    def _addRequest(self, request):
    848850        """Add the given request to the queue."""
     
    855857if __name__ == "__main__":
    856858    import time
    857    
     859
    858860    def callback(returned, result):
    859861        print returned, unicode(result)
    860        
     862
    861863    handler = Handler()
    862864    handler.start()
     
    866868    # Plane: HA-LEG home (gate 67)
    867869    #handler.updatePlane(callback, "HA-LQC", const.PLANE_AWAY, "72")
    868     #time.sleep(3)   
     870    #time.sleep(3)
    869871    #handler.getFleet(callback)
    870872    #time.sleep(3)
     
    873875    #handler.getMETARs(callback, ["LHBP", "EPWA"])
    874876    #time.sleep(5)
    875    
     877
    876878    handler.updatePlane(callback, "HA-LON", const.PLANE_AWAY, "")
    877     time.sleep(3)   
    878 
    879 #------------------------------------------------------------------------------
     879    time.sleep(3)
     880
     881#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.