Ignore:
Files:
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • .hgignore

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

    r458 r411  
    7713937d44e004a8751426c14f6173ff3240822f62 version_0.13
    88cc775599652d39ab574dac90fe8730ef52842744 version_0.14
    9 e11be493e87d09619387e352c389208cca54097d version_0.15
    10 89c9d5d516eb0da04f2cd10db58332f054249bb1 version_0.16
    11 998ecee73a374558f87b42cd851d76b375870185 version_0.17
  • MLXMANIFEST

    r457 r418  
    77library/fnmatch.pyc     3414    4d50000f78e903598af06ef1c5cfb3ef
    88library/libexpat-1.dll  143096  701659d3689bf4a8265b669b7d774255
    9 library/gtk/_gtk.pyc    549     47d70d42eae21e74c6032ae84cb15340
     9library/gtk/_gtk.pyc    549     6233f4030116a4767b50edc0fdb67866
    1010library/encodings/cp858.pyc     7591    02054a0b8e91b9758826eb70cddf096f
    11 library/mlx/pirep.pyc   4623    68189237ada6e14afd692f29194675a9
     11library/mlx/pirep.pyc   5235    fc4a7861ab475fe7e629ada4f84de089
    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 48520   2819da9092529a1f823300394d3f0b7c
     15library/mlx/gui/gui.pyc 48512   c75d1f34de964078769de9b4ee5a0c3e
    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     13c47e2c9b1ff22c82fa1138f94bb578
     24library/gobject/_gobject.pyc    573     17a945fa9ae6b80db017ec58ebf10947
    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        4951    cdb36f50aa93e2c35884a07b4d8b0ab7
     42library/mlx/gui/info.pyc        6082    fa61b9e5bd1dec5998a46ce9a07076e6
    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    64529   cc181a87f3328bf8a736ef008a341972
     62locale/hu/LC_MESSAGES/mlx.mo    44774   b7f65dc824054b25c08aa100b02d599c
    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     85f44addf6e86ff56c1043c21217c41d
     75library/_hashlib.pyc    549     ed1f009b3ccd9a93d8fa4258f9373796
    7676library/libpng14-14.dll 230529  f3a15497e25baaa721f96638d7a4d2f8
    7777library/copy.pyc        11674   30d1745c5e38ab170f8a0486fbebf305
    7878library/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo       21895   a932ead453f04de30e348c1689a4d896
    79 library/mlx/gui/dcdata.pyc      16051   4892c87e6998bb6151739e7994ebe5bf
     79library/unittest/result.pyc     7444    aefbb3cc79c0ff17787ce84faed7f5e8
    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    60039   ba50bf8059d1a393961d122430b40e76
     86locale/en/LC_MESSAGES/mlx.mo    41375   3145880f78f59668a68f46eee10b6bc1
    8787library/traceback.pyc   11223   50ace5c2c6c040a923082442da94cd78
    8888library/_weakrefset.pyc 9290    a56e87c491c0511cd329a3c8c4cd9563
    89 library/mlx/flight.pyc  17303   b9942b2863ce54ed3704e9883bf54541
     89library/mlx/flight.pyc  17303   30d491cdcb9acb318d4c952ca777808a
    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  72133   bb9dc9c43ea8ebf511f4069062577720
     116library/mlx/fsuipc.pyc  70737   8d01b21710cf9438bbb0b20839dfc945
    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      10275   4466f2d9547b91107ea7de9b69bcc71e
     128library/mlx/gui/common.pyc      9996    53858ed2537f28fd26c1d95fa3ada991
    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     cc9cb8a4064a24cef04a8a129edc4004
    135 library/win32file.pyc   552     e2a792eee61fb72563f73da86c462435
     134library/cairo/_cairo.pyc        561     2d69c9c670ed352716d4fb97180ab533
     135library/win32file.pyc   552     02091144183ac705afe0a744872dcf7c
    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     e59fe6bdb36241510519275012597648
     144library/bz2.pyc 534     6fc99d980120fd663ffb0818a34828b1
    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   31467783c1b3ebe2b17a07b760f5ac6a
    161 library/mlx/const.pyc   6707    e11d9ff3e6aa26a56f1828be2f19fc3d
     160mlxupdate.exe   19456   c887d69e3c2741503e23e244f0a689c4
     161library/mlx/const.pyc   6956    f4684465c27724b62f5a67c14fec672f
    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     1cb0db32b06e3ca9372bd132e4c241a5
     174library/_ssl.pyc        537     e26888c5773f237986294f0be8c60a62
    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     6fcecb75e0a3d45438f3c8b43b235948
     194library/unicodedata.pyc 558     6297d24ae9647ab3fcdf09ca61b75c3c
    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     3286993c7cd527b1e0d5df1c72e64969
     225library/pangocairo.pyc  555     3b0030fc6f2497e51ca60c00750d8684
    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     29032   6dd23f897276b82ef46a40398e45ca96
     232library/mlx/web.pyc     28982   9db31983a125d6fbb9cccd699f450889
    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     36d2d5c3740dfe8e21fc3caa60d638af
     238library/pyuipc.pyc      543     17740e034cdc12d87175e6f44f8d8c0c
    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     a0d6186cd638718fb49119799e6e9de9
     262library/win32pipe.pyc   552     eb124a4ee4010ec897a5d2ea2e19072d
    263263doc/manual/hu/logTab.png        29189   d3cbae223d547919d9954fc535856298
    264264library/encodings/iso2022_jp_2004.pyc   1723    66376e788f3819e781897268c1100986
    265 library/win32event.pyc  555     85b44a4f42738a522ff0097d47e4e90e
     265library/win32event.pyc  555     d8c0a9982b63b46d494318127fb020dd
    266266library/encodings/cp866.pyc     8103    f36418dcf93b17b3ced63bd544f44159
    267 library/gio/_gio.pyc    549     4e648e0b01c80d857604e50e631c74b3
     267library/gio/_gio.pyc    549     9e7f2b095af02def0c64e781aac9ebc6
    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       16749   328578f8f3b6ecdb5a4fc66a69654b43
     287library/mlx/gui/pirep.pyc       16780   06c8ceef8809771f5b870ca161d2a0e1
    288288library/mimetypes.pyc   17806   927ce6a7079707aaee925e855ed23454
    289 library/_ctypes.pyc     546     b4e549553cf3be3d4f7b48f2340c8729
     289library/_ctypes.pyc     546     3537b8548171d9214a47aae373358d13
    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   6d558b1484c61348b34e48a353c8fc09
     307library/mlx/gui/monitor.pyc     12015   d770e12a62ca8d880144b8b45c3a2576
    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      111770  3632efc6ec9e67adebd76460bb18f556
     316library/mlx/gui/flight.pyc      111758  d700fbd8afa04e59546d7e9cd374b10e
    317317library/unittest/case.pyc       37758   1d2235e74c246b562c5c00ddf73c621a
    318318library/subprocess.pyc  38648   c9f749db06dfc9fb32079de51d6efd01
    319 library/mlx/acft.pyc    37473   3e6648f88ebabd4e2b695d2e49f4e79d
     319library/mlx/acft.pyc    36286   14bca971b2e3aba95a2dcfca1e8317f7
    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     0f30688f8dac3814a6eac9ca7910e527
     332library/pyexpat.pyc     546     ccf3d0df566cb35274165187cc26b2fe
    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     835167109a0196c168b7dd10e7562ab2
     357library/_socket.pyc     546     0f631e04e95639805597d54f1753d7e0
    358358library/encodings/hex_codec.pyc 3520    a8b8d5b7c8810379c7007bcbc253951c
    359 library/mlx/checks.pyc  58257   dbf35ff3f3e94e5479c32f39d8a919f0
     359library/mlx/checks.pyc  58147   34a5bf3f11b975072500165bb3599f8f
    360360doc/manual/en/statusIcon2.png   5875    71fc121823dee0a4c00715fac1b5665c
    361 library/mlx/sound.pyc   6326    33443e15039f5714339f41b355d0e30f
     361library/mlx/sound.pyc   6326    be3f6aa26c6b3fa2e358ad6882010a4d
    362362doc/manual/en/pirepViewer.png   22216   326127e30fa405919b337cc9920698ed
    363363library/encodings/aliases.pyc   8750    75c22196420d0157fec085d285947a71
    364 library/glib/_glib.pyc  555     f86757facd85e32db6a4e3bb463f8019
     364library/glib/_glib.pyc  555     50a45dfb7fc78fead808072687ba11d5
    365365library/libpangowin32-1.0-0.dll 108945  d07f128828225b7cc38e9e590eb3ba8a
    366366library/encodings/iso8859_10.pyc        2693    5e6cc8f721486ddbc1c99da285e13191
    367 library/win32api.pyc    549     eb908638a60b5da82c9212c47b0f7781
     367library/win32api.pyc    549     77d91a1efed3113697ab9b3dc3e12bea
    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      56894   38f9c05d6ef797a6d345174b9d6b9ead
     396library/mlx/pyuipc_sim.pyc      56186   bd00d6dfd1771a62579c8fb84bf5dcf0
    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     ff1dfee167d49aabeafa74ee4659ceb8
     409library/select.pyc      543     4cc793adb82a4e1505ad2ee3f43b02ec
    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     4796262a8b1b52345a59ba0faa53e5cc
     414library/atk.pyc 534     b03849f4a1eac3e542e97a385e0d1657
    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   10345b15a699aae07c3c15c2cdbe6bed
     424runmlx.exe      64000   4ad32cb1aec39a193569f600adb7d977
    425425library/optparse.pyc    51253   39594a40bc1222173d57b7d5740e3d92
    426 library/mlx/fs.pyc      11756   e00d02c76fac4a787e7a5702441ea864
    427 library/unittest/result.pyc     7444    aefbb3cc79c0ff17787ce84faed7f5e8
     426library/mlx/fs.pyc      11756   c8b8a4a1d355432ff2aaa9ac8cd445d7
    428427library/inspect.pyc     38547   836f659fad54f5ee7e8f9d565003aacd
    429428library/pickle.pyc      36348   2b55640f6f4e2fd70d95482fd16bfb73
     
    434433library/glib/option.pyc 11891   bd90183c75d8f473ecf653e3d63a27f9
    435434library/StringIO.pyc    11100   f4eb4a2bb3d6fb0af925681c5375c673
    436 library/pango.pyc       540     bc12badc36d786fa32f867aaf7fc8036
     435library/pango.pyc       540     a9ea88a574b996c739cce07e2b315b3e
    437436Microsoft.VC90.CRT/msvcp90.dll  568832  6de5c66e434a9c1729575763d891c6c2
    438437library/sre_parse.pyc   18380   fe2376a101668be1124f9ee316662bab
    439 library/mlx/gui/delaycodes.pyc  12327   1ef0c40dfd726f737eafc266975298a8
    440438library/encodings/raw_unicode_escape.pyc        2048    8138045029da04bf45204ab756d1bcd4
    441439sounds/TOD.mp3  174707  92176d53d948fbfebd08c011b063179a
  • Makefile

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

    r444 r302  
    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.
    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.
     171 * documentation of the relevant modules for more information.
    249172 */
     173 
  • locale/en/mlx.po

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

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

    r447 r409  
    152152        self._checkers.append(checks.VSChecker())
    153153
    154         timeout = 30.0 + config.realIASSmoothingLength - 1
     154        timeout = 5.0 + config.realIASSmoothingLength - 1
    155155        self._checkers.append(checks.OverspeedChecker(timeout = timeout))
    156156
     
    10171017#---------------------------------------------------------------------------------------
    10181018
    1019 class 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 
    10511019mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
    10521020                 const.FUELTANK_LEFT_AUX,
     
    10721040             const.AIRCRAFT_T134  : T134,
    10731041             const.AIRCRAFT_T154  : T154,
    1074              const.AIRCRAFT_YK40  : YK40,
    1075              const.AIRCRAFT_B462  : B462 }
     1042             const.AIRCRAFT_YK40  : YK40 }
    10761043
    10771044#---------------------------------------------------------------------------------------
  • src/mlx/checks.py

    r453 r416  
    940940            if n1>5: numEnginesRunning += 1
    941941
    942         if flight.stage==const.STAGE_PARKING or \
    943            (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking):
     942        if flight.stage==const.STAGE_PARKING:
    944943            return numEnginesRunning<len(state.n1) \
    945944                   and state.antiCollisionLightsOn
     
    10511050    def isCondition(self, flight, aircraft, oldState, state):
    10521051        """Check if the fault condition holds."""
    1053         return state.gLoad>2.0 and not state.onTheGround and \
    1054           (flight.stage!=const.STAGE_LANDING or state.radioAltitude>=50)
     1052        return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or \
     1053                                    state.radioAltitude>=50)
    10551054
    10561055    def logFault(self, flight, aircraft, logger, oldState, state):
     
    11191118                 (flight.stage in
    11201119                  [const.STAGE_CRUISE, const.STAGE_DESCENT,
    1121                    const.STAGE_GOAROUND] or \
    1122                   (flight.stage==const.STAGE_LANDING  and
    1123                    state.groundSpeed>50.0) or \
     1120                   const.STAGE_LANDING, const.STAGE_GOAROUND] or \
    11241121                  ((not state.autoXPDR or \
    11251122                    (self._liftOffTime is not None and
     
    12381235class OverspeedChecker(PatientFaultChecker):
    12391236    """Check if Vne has been exceeded."""
    1240     def __init__(self, timeout = 30.0):
     1237    def __init__(self, timeout = 5.0):
    12411238        """Construct the checker."""
    12421239        super(OverspeedChecker, self).__init__(timeout = timeout)
     
    13071304        return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING,
    13081305                                const.STAGE_TAXIAFTERLAND] and \
    1309             state.reverser and \
    13101306            state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser)
    13111307
     
    13541350    If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as
    13551351    saved as a provisional takeoff state. If the speed then decreases below 50
    1356     knots, or the plane remains on the ground for more than 40 seconds, a taxi
     1352    knots, or the plane remains on the ground for more than 20 seconds, a taxi
    13571353    speed error is logged with the highest ground speed detected. This state is
    13581354    also stored in the flight object as a possible
    13591355
    1360     If the plane becomes airborne within 40 seconds, the stage becomes TAKEOFF,
     1356    If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,
    13611357    and the previously saved takeoff state is logged.
    13621358
     
    13901386                    aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF)
    13911387                    self._takeoffState = None
    1392                 elif state.timestamp > (self._takeoffState.timestamp + 40):
     1388                elif state.timestamp > (self._takeoffState.timestamp + 30):
    13931389                    flight.setRTOState(self._highestSpeedState)
    13941390        elif self._takeoffState is not None:
  • src/mlx/const.py

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

    r456 r412  
    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 
    17481742    def getAircraftState(self, aircraft, timestamp, data):
    17491743        """Get the aircraft state.
     
    17531747                                                                  timestamp,
    17541748                                                                  data)
    1755         if data[self._dwdh8d_navgps]==1:
    1756             state.apHeading = None
     1749        state.pitotHeatOn = not state.pitotHeatOn
    17571750
    17581751        return state
     
    20502043#------------------------------------------------------------------------------
    20512044
    2052 class 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 
    20792045_genericModels = { const.AIRCRAFT_B736  : B737Model,
    20802046                   const.AIRCRAFT_B737  : B737Model,
     
    20922058                   const.AIRCRAFT_T134  : T134Model,
    20932059                   const.AIRCRAFT_T154  : T154Model,
    2094                    const.AIRCRAFT_YK40  : YK40Model,
    2095                    const.AIRCRAFT_B462  : B462Model }
     2060                   const.AIRCRAFT_YK40  : YK40Model }
    20962061
    20972062#------------------------------------------------------------------------------
  • src/mlx/gui/common.py

    r443 r401  
    7373
    7474    SHADOW_IN = gtk.SHADOW_IN
    75     SHADOW_NONE = gtk.SHADOW_NONE
    7675
    7776    POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC
     
    8786
    8887    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
    9488
    9589    pixbuf_new_from_file = gdk.pixbuf_new_from_file
     
    145139
    146140    SHADOW_IN = gtk.ShadowType.IN
    147     SHADOW_NONE = gtk.ShadowType.NONE
    148141
    149142    POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC
     
    159152
    160153    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
    166154
    167155    pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
     
    298286                  _const.AIRCRAFT_T134  : xstr("aircraft_t134"),
    299287                  _const.AIRCRAFT_T154  : xstr("aircraft_t154"),
    300                   _const.AIRCRAFT_YK40  : xstr("aircraft_yk40"),
    301                   _const.AIRCRAFT_B462  : xstr("aircraft_b462") }
     288                  _const.AIRCRAFT_YK40  : xstr("aircraft_yk40") }
    302289
    303290#------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r436 r413  
    368368    def _loginClicked(self, button):
    369369        """Called when the login button was clicked."""
    370         print "mlx.flight.LoginPage: logging in"
     370        print "mlx.flight.LoginPage: logged 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(flight.aircraftType)
     593        self._wizard.gui.enableFlightInfo()
    594594
    595595        self._updateDepartureGate()
  • src/mlx/gui/gui.py

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

    r441 r349  
    11
    22from common import *
    3 
    4 from mlx.gui.delaycodes import DelayCodeTable
    53
    64from mlx.i18n import xstr
     
    2321    """The flight info tab."""
    2422    @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
    2537    def _createCommentArea(label):
    2638        """Create a comment area.
     
    4052
    4153        scroller = gtk.ScrolledWindow()
    42         scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
    43         scroller.set_shadow_type(SHADOW_IN)
    44 
     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)
    4561        comments = gtk.TextView()
    4662        comments.set_wrap_mode(WRAP_WORD)
     
    7894
    7995        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
    80                                   xscale = 1.0, yscale = 1.0)
     96                                  xscale = 0.0, yscale = 0.0)
    8197        alignment.set_padding(padding_top = 4, padding_bottom = 4,
    8298                              padding_left = 8, padding_right = 8)
    8399
    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)
     100        self._delayTable = table = gtk.Table(5, 2)
     101        table.set_col_spacings(16)
    90102
    91         alignment.add(scrolledWindow)
     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)
    92119        frame.add(alignment)
    93120
    94121        self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
    95                                              xscale = 1.0, yscale = 1.0)
     122                                             xscale = 0.0, yscale = 0.0)
    96123        self._delayAlignment.add(frame)
    97         self._delayAlignment.set_padding(padding_top = 0, padding_bottom = 0,
    98                                          padding_left = 8, padding_right = 8)
    99124
    100125        self.pack_start(self._delayAlignment, False, False, 8)
     
    122147    def delayCodes(self):
    123148        """Get the list of delay codes checked by the user."""
    124         return self._delayCodeTable.delayCodes
     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
    125155
    126     def enable(self, aircraftType):
     156    def enable(self):
    127157        """Enable the flight info tab."""
    128158        self._comments.set_sensitive(True)
    129159        self._flightDefects.set_sensitive(True)
    130         self._delayCodeTable.setType(aircraftType)
    131         self._delayWindow.set_sensitive(True)
    132         self._delayCodeTable.setStyle()
     160        self._delayTable.set_sensitive(True)
    133161
    134162    def disable(self):
     
    136164        self._comments.set_sensitive(False)
    137165        self._flightDefects.set_sensitive(False)
    138         self._delayWindow.set_sensitive(False)
    139         self._delayCodeTable.setStyle()
     166        self._delayTable.set_sensitive(False)
    140167
    141168    def reset(self):
     
    143170        self._comments.get_buffer().set_text("")
    144171        self._flightDefects.get_buffer().set_text("")
    145         self._delayCodeTable.reset()
     172
     173        for widget in self._delayCodeWidgets:
     174            widget.set_active(False)
    146175
    147176    def _commentsChanged(self, textbuffer):
  • src/mlx/gui/pirep.py

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

    r437 r401  
    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
    2132    @staticmethod
    2233    def _formatLine(timeStr, line):
     
    129140            for code in self.delayCodes:
    130141                if s: s += ", "
    131                 s += code
     142                s += PIREP.delayCodeNames[code]
    132143            return s
    133144
  • src/mlx/pyuipc_sim.py

    r443 r408  
    158158    ENGINE_3 = 2
    159159
    160     ## Engine index: engine #4
    161     ENGINE_4 = 3
    162 
    163160    ## The number of hotkey entries
    164161    HOTKEY_SIZE = 56
     
    298295        self.visibility = 10000
    299296
    300         self.n1 = [0.0, 0.0, 0.0, 0.0]
    301         self.throttles = [0.0, 0.0, 0.0, 0.0]
     297        self.n1 = [0.0, 0.0, 0.0]
     298        self.throttles = [0.0, 0.0, 0.0]
    302299
    303300        self.payloadCount = 1
     
    331328        self.eng2DeIce = False
    332329        self.eng3DeIce = False
    333         self.eng4DeIce = False
    334330        self.propDeIce = False
    335331        self.structDeIce = False
     
    431427        elif offset==0x09e2:       # Engine #3 de-ice
    432428            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
    437429        elif offset==0x0af4:       # Fuel weight
    438430            return int(self.fuelWeight * 256.0)
     
    541533            return self.n1[self.ENGINE_2]
    542534        elif offset==0x2200:       # Engine #3 N1
    543             return self.n1[self.ENGINE_3]
    544         elif offset==0x2300:       # Engine #4 N1
    545535            return self.n1[self.ENGINE_3]
    546536        elif offset==0x2ea0:       # Elevator trim
     
    705695        elif offset==0x09e2:       # Engine #3 de-ice
    706696            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
    711697        elif offset==0x0af4:       # Fuel weight
    712698            self.fuelWeight = value / 256.0
     
    810796        elif offset==0x2200:       # Engine #3 N1
    811797            self.n1[self.ENGINE_3] = value
    812         elif offset==0x2300:       # Engine #4 N1
    813             self.n1[self.ENGINE_4] = value
    814798        elif offset==0x2ea0:       # Elevator trim
    815799            self.elevatorTrim = value * 180.0 / math.pi
     
    14291413        self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value,
    14301414                                       lambda word: float(word))
    1431         self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value,
    1432                                        lambda word: float(word))
    14331415
    14341416        self._valueHandlers["throttle_1"] = ([(0x088c, "H")],
     
    14391421                                             CLI.throttle2pyuipc)
    14401422        self._valueHandlers["throttle_3"] = ([(0x09bc, "H")],
    1441                                              CLI.pyuipc2throttle,
    1442                                              CLI.throttle2pyuipc)
    1443         self._valueHandlers["throttle_4"] = ([(0x0a54, "H")],
    14441423                                             CLI.pyuipc2throttle,
    14451424                                             CLI.throttle2pyuipc)
     
    15111490                                            CLI.bool2str, CLI.str2bool)
    15121491        self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")],
    1513                                             CLI.bool2str, CLI.str2bool)
    1514         self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")],
    15151492                                            CLI.bool2str, CLI.str2bool)
    15161493        self._valueHandlers["propDeice"] = ([(0x337c, "b")],
  • src/mlx/web.py

    r443 r401  
    6363                      "TU3"  : const.AIRCRAFT_T134,
    6464                      "TU5"  : const.AIRCRAFT_T154,
    65                       "YK4"  : const.AIRCRAFT_YK40,
    66                       "146"  : const.AIRCRAFT_B462 }
     65                      "YK4"  : const.AIRCRAFT_YK40 }
    6766
    6867    TYPE2TYPECODE = { const.AIRCRAFT_B736  : "736",
     
    8180                      const.AIRCRAFT_T134  : "TU3",
    8281                      const.AIRCRAFT_T154  : "TU5",
    83                       const.AIRCRAFT_YK40  : "YK4",
    84                       const.AIRCRAFT_B462  : "146" }
     82                      const.AIRCRAFT_YK40  : "YK4" }
    8583
    8684    @staticmethod
     
    117115        departureTime = readline(f)
    118116        self.departureTime = BookedFlight.getDateTime(date, departureTime)
    119 
     117                                               
    120118        arrivalTime = readline(f)
    121119        self.arrivalTime = BookedFlight.getDateTime(date, arrivalTime)
     
    132130        departureTime = None
    133131        arrivalTime = None
    134 
     132       
    135133        line = f.readline()
    136         lineNumber = 0
     134        lineNumber = 0   
    137135        while line:
    138136            lineNumber += 1
    139137            line = line.strip()
    140 
     138           
    141139            hashIndex = line.find("#")
    142140            if hashIndex>=0: line = line[:hashIndex]
     
    144142                equalIndex = line.find("=")
    145143                lineOK = equalIndex>0
    146 
     144               
    147145                if lineOK:
    148                     key = line[:equalIndex].strip()
     146                    key = line[:equalIndex].strip()                   
    149147                    value = line[equalIndex+1:].strip().replace("\:", ":")
    150 
     148                   
    151149                    lineOK = key and value
    152150
     
    198196            self.aircraftTypeName = \
    199197                BookedFlight.TYPE2TYPECODE[self.aircraftType]
    200 
     198           
    201199    def writeIntoFile(self, f):
    202200        """Write the flight into a file."""
     
    237235        else:
    238236            raise Exception("Invalid aircraft type code: '" + typeCode + "'")
    239 
     237       
    240238    def __repr__(self):
    241239        """Get a representation of the flight."""
     
    250248        s += ">"
    251249        return s
    252 
     250       
    253251#------------------------------------------------------------------------------
    254252
     
    281279    def __repr__(self):
    282280        """Get the representation of the plane object."""
    283         s = "<Plane: %s %s" % (self.tailNumber,
     281        s = "<Plane: %s %s" % (self.tailNumber, 
    284282                               "home" if self.status==const.PLANE_HOME else \
    285283                               "away" if self.status==const.PLANE_AWAY else \
     
    290288        s += ">"
    291289        return s
    292 
     290       
    293291
    294292#------------------------------------------------------------------------------
     
    325323                gateNumbers.add(p.gateNumber)
    326324        return gateNumbers
    327 
     325   
    328326    def updatePlane(self, tailNumber, status, gateNumber = None):
    329327        """Update the status of the given plane."""
     
    332330            plane.status = status
    333331            plane.gateNumber = gateNumber
    334 
     332   
    335333    def __iter__(self):
    336334        """Get an iterator over the planes."""
    337335        for plane in self._planes.itervalues():
    338336            yield plane
    339 
     337       
    340338    def __getitem__(self, tailNumber):
    341339        """Get the plane with the given tail number.
     
    347345        """Get the representation of the fleet object."""
    348346        return self._planes.__repr__()
    349 
     347       
    350348#------------------------------------------------------------------------------
    351349
     
    373371        s += ">"
    374372        return s
    375 
     373   
    376374#------------------------------------------------------------------------------
    377375
     
    391389           "E" not in attrs or not attrs["E"]:
    392390            return
    393 
     391       
    394392        icao = attrs["A"]
    395393        if icao not in self._notams:
    396394            return
    397 
     395       
    398396        begin = datetime.datetime.strptime(attrs["B"], "%Y-%m-%d %H:%M:%S")
    399397
    400398        c = attrs["C"] if "C" in attrs else None
    401399        end = datetime.datetime.strptime(c, "%Y-%m-%d %H:%M:%S") if c else None
    402 
     400       
    403401        permanent = attrs["C_flag"]=="PERM" if "C_flag" in attrs else False
    404 
     402       
    405403        repeatCycle = attrs["D"] if "D" in attrs else None
    406404
     
    475473    """A login request."""
    476474    iso88592decoder = codecs.getdecoder("iso-8859-2")
    477 
     475   
    478476    def __init__(self, callback, pilotID, password, entranceExam):
    479477        """Construct the login request with the given pilot ID and
     
    490488        md5.update(self._pilotID)
    491489        pilotID = md5.hexdigest()
    492 
     490       
    493491        md5 = hashlib.md5()
    494492        md5.update(self._password)
     
    526524                result.pilotName = self.iso88592decoder(readline(f))[0]
    527525                result.exams = readline(f)
    528 
     526               
    529527                while True:
    530528                    line = readline(f)
     
    542540
    543541        return result
    544 
     542       
    545543#------------------------------------------------------------------------------
    546544
    547545class GetFleet(Request):
    548546    """Request to get the fleet from the website."""
    549 
     547   
    550548    def __init__(self, callback):
    551549        """Construct the fleet request."""
     
    560558        result.fleet = Fleet(f)
    561559        f.close()
    562 
     560       
    563561        return result
    564562
     
    587585                                 ("status", status),
    588586                                 ("kapu", gateNumber)])
    589 
     587       
    590588        f = urllib2.urlopen(url, data, timeout = 10.0)
    591589        line = readline(f)
    592 
     590       
    593591        result = Result()
    594592        result.success = line == "OK"
    595593
    596594        return result
    597 
     595           
    598596#------------------------------------------------------------------------------
    599597
     
    630628
    631629class GetMETARs(Request):
    632     """Get the METARs from the NOAA website for certain airport ICAOs."""
     630    """Get the METARs from the NOAA website for certain airport ICAOs."""   
    633631
    634632    def __init__(self, callback, airports):
     
    641639        url = "http://www.aviationweather.gov/adds/dataserver_current/httpparam?"
    642640        data = urllib.urlencode([ ("dataSource" , "metars"),
    643                                   ("requestType",  "retrieve"),
     641                                  ("requestType",  "retrieve"), 
    644642                                  ("format", "csv"),
    645643                                  ("stationString", " ".join(self._airports)),
     
    654652                if len(line)>5 and line[4]==' ':
    655653                    icao = line[0:4]
    656                     if icao in self._airports:
     654                    if icao in self._airports:                       
    657655                        result.metars[icao] = line.strip().split(",")[0]
    658656        finally:
     
    698696        data["bag"] = str(pirep.bagWeight)
    699697        data["mail"] = str(pirep.mailWeight)
    700 
     698       
    701699        data["flttype"] = SendPIREP._flightTypes[pirep.flightType]
    702700        data["onoff"] = "1" if pirep.online else "0"
     
    744742            f.close()
    745743
    746         return result
     744        return result   
    747745#------------------------------------------------------------------------------
    748746
     
    759757        """Perform the sending of the ACARS."""
    760758        print "Sending the online ACARS"
    761 
     759       
    762760        url = "http://www.virtualairlines.hu/acars2/acarsonline.php"
    763761
     
    768766        data["pid"] = acars.pid
    769767        data["pilot"] = SendACARS._latin2Encoder(acars.pilotName)[0]
    770 
     768   
    771769        data["pass"] = str(bookedFlight.numPassengers)
    772770        data["callsign"] = bookedFlight.callsign
    773771        data["airplane"] = bookedFlight.aircraftTypeName
    774772        data["from"] = bookedFlight.departureICAO
    775         data["to"] = bookedFlight.arrivalICAO
     773        data["to"] = bookedFlight.arrivalICAO       
    776774        data["lajstrom"] = bookedFlight.tailNumber
    777775
     
    781779        data["altitude"] = str(acars.state.altitude)
    782780        data["speed"] = str(acars.state.groundSpeed)
    783 
     781       
    784782        data["event"] = acars.getEventText()
    785783
     
    790788            f.close()
    791789
    792         return result
     790        return result   
    793791
    794792#------------------------------------------------------------------------------
     
    815813        """Enqueue a fleet retrieval request."""
    816814        self._addRequest(GetFleet(callback))
    817 
     815       
    818816    def updatePlane(self, callback, tailNumber, status, gateNumber = None):
    819         """Update the status of the given plane."""
     817        """Update the status of the given plane."""       
    820818        self._addRequest(UpdatePlane(callback, tailNumber, status, gateNumber))
    821819
     
    823821        """Get the NOTAMs for the given two airports."""
    824822        self._addRequest(GetNOTAMs(callback, departureICAO, arrivalICAO))
    825 
     823       
    826824    def getMETARs(self, callback, airports):
    827825        """Get the METARs for the given airports."""
     
    835833        """Send the given ACARS"""
    836834        self._addRequest(SendACARS(callback, acars))
    837 
     835       
    838836    def run(self):
    839837        """Process the requests."""
     
    846844
    847845            request.perform()
    848 
     846   
    849847    def _addRequest(self, request):
    850848        """Add the given request to the queue."""
     
    857855if __name__ == "__main__":
    858856    import time
    859 
     857   
    860858    def callback(returned, result):
    861859        print returned, unicode(result)
    862 
     860       
    863861    handler = Handler()
    864862    handler.start()
     
    868866    # Plane: HA-LEG home (gate 67)
    869867    #handler.updatePlane(callback, "HA-LQC", const.PLANE_AWAY, "72")
    870     #time.sleep(3)
     868    #time.sleep(3)   
    871869    #handler.getFleet(callback)
    872870    #time.sleep(3)
     
    875873    #handler.getMETARs(callback, ["LHBP", "EPWA"])
    876874    #time.sleep(5)
    877 
     875   
    878876    handler.updatePlane(callback, "HA-LON", const.PLANE_AWAY, "")
    879     time.sleep(3)
    880 
    881 #------------------------------------------------------------------------------
     877    time.sleep(3)   
     878
     879#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.