Changes in / [464:2e0ef8c7ca9a:466:7c66a233f9f3]
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r276 r442 6 6 mlx-common.nsh 7 7 locale/.+/LC_MESSAGES 8 locale/.+/mlx_delay.po 9 src/mlx/gui/dcdata.py 10 xplra.py -
.hgtags
r411 r458 7 7 13937d44e004a8751426c14f6173ff3240822f62 version_0.13 8 8 cc775599652d39ab574dac90fe8730ef52842744 version_0.14 9 e11be493e87d09619387e352c389208cca54097d version_0.15 10 89c9d5d516eb0da04f2cd10db58332f054249bb1 version_0.16 11 998ecee73a374558f87b42cd851d76b375870185 version_0.17 -
MLXMANIFEST
r418 r457 7 7 library/fnmatch.pyc 3414 4d50000f78e903598af06ef1c5cfb3ef 8 8 library/libexpat-1.dll 143096 701659d3689bf4a8265b669b7d774255 9 library/gtk/_gtk.pyc 549 6233f4030116a4767b50edc0fdb678669 library/gtk/_gtk.pyc 549 47d70d42eae21e74c6032ae84cb15340 10 10 library/encodings/cp858.pyc 7591 02054a0b8e91b9758826eb70cddf096f 11 library/mlx/pirep.pyc 5235 fc4a7861ab475fe7e629ada4f84de08911 library/mlx/pirep.pyc 4623 68189237ada6e14afd692f29194675a9 12 12 library/encodings/cp1254.pyc 2678 17ff2ac86f90886d5c73ed789f0499f3 13 13 library/encodings/unicode_internal.pyc 2022 1e902113491e0c334b44deb0c8940e01 14 14 library/libpango-1.0-0.dll 333729 5a14efd93ee27cfe960220fe4a904911 15 library/mlx/gui/gui.pyc 485 12 c75d1f34de964078769de9b4ee5a0c3e15 library/mlx/gui/gui.pyc 48520 2819da9092529a1f823300394d3f0b7c 16 16 library/encodings/cp737.pyc 8102 40e61988748e4ca1742a2bad43949f4e 17 17 library/stat.pyc 2503 d3b6dc7a54e705219f04d0be75a212de … … 22 22 library/encodings/cp932.pyc 1638 e060301989634a7fb30ded375011cb09 23 23 library/share/locale/hu/LC_MESSAGES/gtk20.mo 58794 6ee4491ae7bc9d3dfb778578eb29a0b3 24 library/gobject/_gobject.pyc 573 1 7a945fa9ae6b80db017ec58ebf1094724 library/gobject/_gobject.pyc 573 13c47e2c9b1ff22c82fa1138f94bb578 25 25 library/encodings/utf_7.pyc 1747 2beeb059236527197d6c640396476ce8 26 26 doc/manual/hu/pirepViewer.png 25089 47fd4cbd140cedcd5f972b16ef484ba0 … … 40 40 library/pangocairo.pyd 17920 5fc69a7d29a6d3127710c64de440daa4 41 41 doc/manual/en/fuel.png 23882 896aa65c7a8d4fcd7710b386b96bb97c 42 library/mlx/gui/info.pyc 6082 fa61b9e5bd1dec5998a46ce9a07076e642 library/mlx/gui/info.pyc 4951 cdb36f50aa93e2c35884a07b4d8b0ab7 43 43 library/xml/sax/xmlreader.pyc 17862 0362ded7016d21cdd85aea1170ebdda1 44 44 doc/manual/hu/fuel.png 27014 6a7764815c991f99961b39080bf9af03 … … 60 60 library/encodings/utf_8.pyc 1806 4b8dee0284ea2f55c4142fcde7463524 61 61 library/unicodedata.pyd 688128 c856c31a03dc892e4f2aee93d0bfee44 62 locale/hu/LC_MESSAGES/mlx.mo 44774 b7f65dc824054b25c08aa100b02d599c62 locale/hu/LC_MESSAGES/mlx.mo 64529 cc181a87f3328bf8a736ef008a341972 63 63 library/encodings/mac_roman.pyc 2716 4b4745eccfcb77860b70b374ac07fbcc 64 64 library/copy_reg.pyc 4893 7a58bc441232056d1c123cd3375b3774 … … 73 73 library/_hashlib.pyd 287232 a1a18de0644f481749fcbcf26005eeaf 74 74 doc/manual/en/monitorWindow.png 16582 e07cbd4f5b360e1e8e80bc8409ad242b 75 library/_hashlib.pyc 549 ed1f009b3ccd9a93d8fa4258f937379675 library/_hashlib.pyc 549 85f44addf6e86ff56c1043c21217c41d 76 76 library/libpng14-14.dll 230529 f3a15497e25baaa721f96638d7a4d2f8 77 77 library/copy.pyc 11674 30d1745c5e38ab170f8a0486fbebf305 78 78 library/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo 21895 a932ead453f04de30e348c1689a4d896 79 library/ unittest/result.pyc 7444 aefbb3cc79c0ff17787ce84faed7f5e879 library/mlx/gui/dcdata.pyc 16051 4892c87e6998bb6151739e7994ebe5bf 80 80 library/mlx/gui/__init__.pyc 107 3494fc6a671a7b8a9dc72ea93948ae52 81 81 library/encodings/iso8859_5.pyc 2679 58a290e94b0266ef8ff4ee52da00e257 … … 84 84 library/select.pyd 11776 d90bf525f9f6c9c3aa6532fa6e569b4f 85 85 library/base64.pyc 10528 39abec9c60dc011d3c763f443f9b1a11 86 locale/en/LC_MESSAGES/mlx.mo 41375 3145880f78f59668a68f46eee10b6bc186 locale/en/LC_MESSAGES/mlx.mo 60039 ba50bf8059d1a393961d122430b40e76 87 87 library/traceback.pyc 11223 50ace5c2c6c040a923082442da94cd78 88 88 library/_weakrefset.pyc 9290 a56e87c491c0511cd329a3c8c4cd9563 89 library/mlx/flight.pyc 17303 30d491cdcb9acb318d4c952ca777808a89 library/mlx/flight.pyc 17303 b9942b2863ce54ed3704e9883bf54541 90 90 library/urllib2.pyc 43566 7eb57ea0dcd1086d1d9073a5cefb0903 91 91 doc/manual/en/flightSelection.png 25456 84e5574bc58ff156da71470550d540d8 … … 114 114 library/encodings/mac_latin2.pyc 4717 564dbaf5c296a147203eb821dc2466ba 115 115 library/encodings/utf_16_be.pyc 1854 84a1d1465453727af051eaeeb853782f 116 library/mlx/fsuipc.pyc 7 0737 8d01b21710cf9438bbb0b20839dfc945116 library/mlx/fsuipc.pyc 72133 bb9dc9c43ea8ebf511f4069062577720 117 117 library/xml/sax/__init__.pyc 3579 c78222ad1fd4f3dbdea06666fe74e84e 118 118 doc/manual/en/connect.png 24272 01e31d899c4ede823423f705c6886f30 … … 126 126 library/libgdk-win32-2.0-0.dll 931390 a2b46daac3d4140efdf86429f7aea476 127 127 library/win32file.pyd 111616 25ecaa0a381c6fd9ba4080bea63b952e 128 library/mlx/gui/common.pyc 9996 53858ed2537f28fd26c1d95fa3ada991128 library/mlx/gui/common.pyc 10275 4466f2d9547b91107ea7de9b69bcc71e 129 129 library/dummy_threading.pyc 1265 5ab5c897721aeb346b5bccb84066c5bd 130 130 doc/manual/hu/index.html 47588 fd83bee17f50bf3fd488d86f65563f7d … … 132 132 sounds/767taxi.mp3 160496 4cb43cda6e1214fbe15328a716827345 133 133 doc/manual/en/prefsAdvanced.png 13720 d43a6df9991d331ce8fdc9fedae514c3 134 library/cairo/_cairo.pyc 561 2d69c9c670ed352716d4fb97180ab533135 library/win32file.pyc 552 02091144183ac705afe0a744872dcf7c134 library/cairo/_cairo.pyc 561 cc9cb8a4064a24cef04a8a129edc4004 135 library/win32file.pyc 552 e2a792eee61fb72563f73da86c462435 136 136 library/encodings/cp865.pyc 7868 7d40a7ba053ac23339218be8799e5397 137 137 library/lib/gtk-2.0/2.10.0/engines/libwimp.dll 97984 a5bbbe46e1363aba9020a76f2d58e9d6 … … 142 142 library/share/locale/hu/LC_MESSAGES/gtk20-properties.mo 167125 cd1b1b3693c1e3c74bfcea20be640cc6 143 143 conn_red.png 914 860388cb7c3b26b2f348fdbee40780ce 144 library/bz2.pyc 534 6fc99d980120fd663ffb0818a34828b1144 library/bz2.pyc 534 e59fe6bdb36241510519275012597648 145 145 library/xml/sax/expatreader.pyc 13563 4f64c0efb2f1f8dbba84cdb5c6036f2d 146 146 library/email/utils.pyc 8840 a7be428df6fddee6121cfce55382d1f8 … … 158 158 library/mlx/gui/statusbar.pyc 4812 49946660d92b7b634740537450b63723 159 159 library/warnings.pyc 12666 9788b5f45765e8204e04c820f2711094 160 mlxupdate.exe 19456 c887d69e3c2741503e23e244f0a689c4161 library/mlx/const.pyc 6 956 f4684465c27724b62f5a67c14fec672f160 mlxupdate.exe 19456 31467783c1b3ebe2b17a07b760f5ac6a 161 library/mlx/const.pyc 6707 e11d9ff3e6aa26a56f1828be2f19fc3d 162 162 library/email/errors.pyc 3229 cdb78ab237e195ad69f059128bc03b1d 163 163 library/linecache.pyc 3091 666e6f81b0ea9a7637f8068493f738d5 … … 172 172 library/shlex.pyc 7282 cbe1a4823894c97c87d01f9d9faf5b8f 173 173 library/cairo/__init__.pyc 142 010dd7cc8485565d5782d60e92e4ba34 174 library/_ssl.pyc 537 e26888c5773f237986294f0be8c60a62174 library/_ssl.pyc 537 1cb0db32b06e3ca9372bd132e4c241a5 175 175 library/encodings/iso8859_8.pyc 2717 f3ad6ce58cfac9e3ca86cf5c2fef092b 176 176 library/encodings/iso2022_jp_1.pyc 1699 faed9d5747e982cec9fa8b3ad8e1de26 … … 192 192 library/encodings/cp1252.pyc 2676 b4c43cc72650c911cf3654dbaf565df9 193 193 library/share/locale/hu/LC_MESSAGES/atk10.mo 8465 e3f3466da367215aad971d7b0394229d 194 library/unicodedata.pyc 558 6 297d24ae9647ab3fcdf09ca61b75c3c194 library/unicodedata.pyc 558 6fcecb75e0a3d45438f3c8b43b235948 195 195 library/encodings/uu_codec.pyc 4646 5282a5fcb676851224d2924aa3e48a9e 196 196 library/ConfigParser.pyc 23857 1d17020dd0000ce0f73de812effa152f … … 223 223 doc/manual/hu/flightInfoTab.png 22378 5f3e77393d8693fec723590daeedb50a 224 224 library/encodings/utf_8_sig.pyc 4625 1b1405db186e5819fa271ff96c1ca2c5 225 library/pangocairo.pyc 555 3 b0030fc6f2497e51ca60c00750d8684225 library/pangocairo.pyc 555 3286993c7cd527b1e0d5df1c72e64969 226 226 library/encodings/cp1255.pyc 2697 b265913c887f2e1c8736632b652c0093 227 227 library/encodings/zlib_codec.pyc 4308 319c9073aff840436a03cc1fa0b08fb5 … … 230 230 doc/manual/hu/connect.png 27238 50477d157c924984c224806455e8f87d 231 231 library/encodings/palmos.pyc 2876 9284ad53dcfd82dfae0a79923b1cf91d 232 library/mlx/web.pyc 2 8982 9db31983a125d6fbb9cccd699f450889232 library/mlx/web.pyc 29032 6dd23f897276b82ef46a40398e45ca96 233 233 library/mlx/gui/gates.pyc 5384 e85898dc153d9e624ff663afc0575e7d 234 234 library/email/feedparser.pyc 10682 4de6a63da8dc270c9881edb9c2f28508 … … 236 236 library/intl.dll 152489 eb2d4c4d4a527bc88a69a16cc99afcf5 237 237 library/encodings/mbcs.pyc 1883 2213911a7dd0deada6799b63e18b695b 238 library/pyuipc.pyc 543 17740e034cdc12d87175e6f44f8d8c0c238 library/pyuipc.pyc 543 36d2d5c3740dfe8e21fc3caa60d638af 239 239 sounds/TOC.mp3 273032 fae1be2ad25c8b54806bd1d759919705 240 240 library/encodings/iso8859_4.pyc 2678 16f2fe7994051752360c533c052b892b … … 260 260 doc/manual/hu/flightSelection.png 27734 560275c030f373691ca59e99c4ba686e 261 261 library/win32pipe.pyd 24064 de374eded459293b2a7eb8ed8fb38eaa 262 library/win32pipe.pyc 552 eb124a4ee4010ec897a5d2ea2e19072d262 library/win32pipe.pyc 552 a0d6186cd638718fb49119799e6e9de9 263 263 doc/manual/hu/logTab.png 29189 d3cbae223d547919d9954fc535856298 264 264 library/encodings/iso2022_jp_2004.pyc 1723 66376e788f3819e781897268c1100986 265 library/win32event.pyc 555 d8c0a9982b63b46d494318127fb020dd265 library/win32event.pyc 555 85b44a4f42738a522ff0097d47e4e90e 266 266 library/encodings/cp866.pyc 8103 f36418dcf93b17b3ced63bd544f44159 267 library/gio/_gio.pyc 549 9e7f2b095af02def0c64e781aac9ebc6267 library/gio/_gio.pyc 549 4e648e0b01c80d857604e50e631c74b3 268 268 library/encodings/cp437.pyc 7874 63f1278c0a66129c6fb4f504d6b61b66 269 269 doc/manual/hu/helpTab.png 25326 f83cf32e49d6de786df20885232aa1ee … … 285 285 library/email/message.pyc 27764 493826f529d17f5a21080a4c98b49369 286 286 library/encodings/mac_romanian.pyc 2756 a3b2a0892236bc80c8efe8940e33339e 287 library/mlx/gui/pirep.pyc 167 80 06c8ceef8809771f5b870ca161d2a0e1287 library/mlx/gui/pirep.pyc 16749 328578f8f3b6ecdb5a4fc66a69654b43 288 288 library/mimetypes.pyc 17806 927ce6a7079707aaee925e855ed23454 289 library/_ctypes.pyc 546 3537b8548171d9214a47aae373358d13289 library/_ctypes.pyc 546 b4e549553cf3be3d4f7b48f2340c8729 290 290 sounds/F70taxi.mp3 154854 51332dc691d3519355f61ed06c959d8d 291 291 library/encodings/cp857.pyc 7611 1b46c8959ac097b73e1c680d464cdc32 … … 305 305 library/repr.pyc 5045 82f0d89c685c3dacd941e01e4b2f31ef 306 306 library/quopri.pyc 6352 87c42d94f753dd4c8a761cfa79453bb8 307 library/mlx/gui/monitor.pyc 12015 d770e12a62ca8d880144b8b45c3a2576307 library/mlx/gui/monitor.pyc 12015 6d558b1484c61348b34e48a353c8fc09 308 308 library/encodings/latin_1.pyc 2111 52427573ccbfd06220b67d5a9dd1376e 309 309 library/mlx/update.pyc 16952 8fa20ca0ddd4ce5f06f70fba9bea6e83 … … 314 314 doc/manual/en/gatesTab.png 25611 6de724fef235fcdb11a5c960f9f40502 315 315 library/bdb.pyc 17708 9a8fdcaa65f595c842689247847879d9 316 library/mlx/gui/flight.pyc 1117 58 d700fbd8afa04e59546d7e9cd374b10e316 library/mlx/gui/flight.pyc 111770 3632efc6ec9e67adebd76460bb18f556 317 317 library/unittest/case.pyc 37758 1d2235e74c246b562c5c00ddf73c621a 318 318 library/subprocess.pyc 38648 c9f749db06dfc9fb32079de51d6efd01 319 library/mlx/acft.pyc 3 6286 14bca971b2e3aba95a2dcfca1e8317f7319 library/mlx/acft.pyc 37473 3e6648f88ebabd4e2b695d2e49f4e79d 320 320 library/gobject._gobject.pyd 113152 3d05dd191361f83aa247b62c700fa04e 321 321 doc/manual/hu/checklistEditor.png 27863 8c750892a52dc10ca654a9d0b2765358 … … 330 330 library/encodings/cp863.pyc 7868 fc7ff06dab536b93c68fcb8e7bac713f 331 331 library/xml/parsers/__init__.pyc 294 83f6a77ed8cd962b3c75c4779dc557ac 332 library/pyexpat.pyc 546 ccf3d0df566cb35274165187cc26b2fe332 library/pyexpat.pyc 546 0f30688f8dac3814a6eac9ca7910e527 333 333 doc/manual/hu/gateSelection.png 26472 aa5a7d5602ec8544d1aed25b731a2460 334 334 logo.png 69816 4a7517b22cfd75cc9c15e3fc1b7ebeec … … 355 355 library/_socket.pyd 38400 5d273be76603399e88cf57f2605004bf 356 356 sounds/ding.wav 80856 18e639792d3767436ac6955eb60e4f54 357 library/_socket.pyc 546 0f631e04e95639805597d54f1753d7e0357 library/_socket.pyc 546 835167109a0196c168b7dd10e7562ab2 358 358 library/encodings/hex_codec.pyc 3520 a8b8d5b7c8810379c7007bcbc253951c 359 library/mlx/checks.pyc 58 147 34a5bf3f11b975072500165bb3599f8f359 library/mlx/checks.pyc 58257 dbf35ff3f3e94e5479c32f39d8a919f0 360 360 doc/manual/en/statusIcon2.png 5875 71fc121823dee0a4c00715fac1b5665c 361 library/mlx/sound.pyc 6326 be3f6aa26c6b3fa2e358ad6882010a4d361 library/mlx/sound.pyc 6326 33443e15039f5714339f41b355d0e30f 362 362 doc/manual/en/pirepViewer.png 22216 326127e30fa405919b337cc9920698ed 363 363 library/encodings/aliases.pyc 8750 75c22196420d0157fec085d285947a71 364 library/glib/_glib.pyc 555 50a45dfb7fc78fead808072687ba11d5364 library/glib/_glib.pyc 555 f86757facd85e32db6a4e3bb463f8019 365 365 library/libpangowin32-1.0-0.dll 108945 d07f128828225b7cc38e9e590eb3ba8a 366 366 library/encodings/iso8859_10.pyc 2693 5e6cc8f721486ddbc1c99da285e13191 367 library/win32api.pyc 549 77d91a1efed3113697ab9b3dc3e12bea367 library/win32api.pyc 549 eb908638a60b5da82c9212c47b0f7781 368 368 library/gobject/constants.pyc 1957 2e9cdc605e7c449ef4fc23f56128acec 369 369 library/libgtk-win32-2.0-0.dll 4938115 cc6dca192aca6f91bd96a5b5f86e036d … … 394 394 library/webbrowser.pyc 18138 c85009edebad6d278fe786fec10ebbbe 395 395 library/sre_compile.pyc 10792 c58f94fbee661f3bb0c59ecc13c0416e 396 library/mlx/pyuipc_sim.pyc 56 186 bd00d6dfd1771a62579c8fb84bf5dcf0396 library/mlx/pyuipc_sim.pyc 56894 38f9c05d6ef797a6d345174b9d6b9ead 397 397 library/encodings/iso8859_9.pyc 2678 88880e046738ebd2012c8034416a9adf 398 398 library/encodings/cp875.pyc 2636 c72faa5d1cb6105ae81c971448fea479 … … 407 407 library/email/iterators.pyc 2266 b8a0df35815bc00be1ed8ece42aac537 408 408 library/encodings/hz.pyc 1614 876bb7c36683358c3e95005619b10541 409 library/select.pyc 543 4cc793adb82a4e1505ad2ee3f43b02ec409 library/select.pyc 543 ff1dfee167d49aabeafa74ee4659ceb8 410 410 library/encodings/iso2022_jp.pyc 1683 40c2b92127f99452f84b250c2b4b2cda 411 411 library/libgthread-2.0-0.dll 44287 7ad6f303082b382bff7bafbab246c61f 412 412 library/glib._glib.pyd 58368 0de636503e43c4eb00e80927bc9bda97 413 413 library/mlx/config.pyc 29918 3b72b0439191e799656171cc7dd7c019 414 library/atk.pyc 534 b03849f4a1eac3e542e97a385e0d1657414 library/atk.pyc 534 4796262a8b1b52345a59ba0faa53e5cc 415 415 library/gio._gio.pyd 263168 acb8c95fdc391079bebdf7d8685b0dbc 416 416 library/encodings/cp861.pyc 7868 c97a8970ce4d9f40cbafbea6576fbdca … … 422 422 library/__future__.pyc 4177 43d264d951ac2085334c7b9dd4558595 423 423 library/logging/__init__.pyc 54813 7bcdf2e8da474f5e94d8e499f6fc3ed4 424 runmlx.exe 64000 4ad32cb1aec39a193569f600adb7d977424 runmlx.exe 64000 10345b15a699aae07c3c15c2cdbe6bed 425 425 library/optparse.pyc 51253 39594a40bc1222173d57b7d5740e3d92 426 library/mlx/fs.pyc 11756 c8b8a4a1d355432ff2aaa9ac8cd445d7 426 library/mlx/fs.pyc 11756 e00d02c76fac4a787e7a5702441ea864 427 library/unittest/result.pyc 7444 aefbb3cc79c0ff17787ce84faed7f5e8 427 428 library/inspect.pyc 38547 836f659fad54f5ee7e8f9d565003aacd 428 429 library/pickle.pyc 36348 2b55640f6f4e2fd70d95482fd16bfb73 … … 433 434 library/glib/option.pyc 11891 bd90183c75d8f473ecf653e3d63a27f9 434 435 library/StringIO.pyc 11100 f4eb4a2bb3d6fb0af925681c5375c673 435 library/pango.pyc 540 a9ea88a574b996c739cce07e2b315b3e436 library/pango.pyc 540 bc12badc36d786fa32f867aaf7fc8036 436 437 Microsoft.VC90.CRT/msvcp90.dll 568832 6de5c66e434a9c1729575763d891c6c2 437 438 library/sre_parse.pyc 18380 fe2376a101668be1124f9ee316662bab 439 library/mlx/gui/delaycodes.pyc 12327 1ef0c40dfd726f737eafc266975298a8 438 440 library/encodings/raw_unicode_escape.pyc 2048 8138045029da04bf45204ab756d1bcd4 439 441 sounds/TOD.mp3 174707 92176d53d948fbfebd08c011b063179a -
Makefile
r276 r439 3 3 all: $(foreach lang,$(LANGUAGES),locale/$(lang)/LC_MESSAGES/mlx.mo) 4 4 5 locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po 5 locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po locale/%/mlx_delay.po 6 6 mkdir -p `dirname $@` 7 msgfmt -o $@ $^ 7 msgcat $^ | msgfmt -o $@ - 8 9 locale/hu/mlx_delay.po locale/en/mlx_delay.po: dcdatagen.py 10 ./dcdatagen.py -
doc/overview.dox
r302 r444 11 11 * Note, that to be able to understand the code most effectively, it 12 12 * is important to either use the application actively, or to read its 13 * user documentation carefully. 13 * user documentation carefully. 14 14 * 15 15 * \section overview Overview 16 16 * 17 * The application was written in 17 * The application was written in 18 18 * <a href="http://python.org">Python 2</a>. The Python wrapper 19 19 * <a href="http://gtk.org">Gtk+</a> toolkit was used for the graphical … … 23 23 * as the primary toolkit, while it has no reliable port for Windows 24 24 * 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 26 26 * <a href="http://pygtk.org">PyGTK</a> wrapper is used, while for Gtk+ 27 27 * 3 the <a href="https://live.gnome.org/PyGObject">PyGObject</a> … … 33 33 * <a href="http://www.schiratti.com/dowson.html">FSUIPC</a> 34 34 * 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 36 36 * appear in its next version. It is planned to support X-Plane in the 37 37 * near future (hopefully by the end of 2012) on both Linux and … … 45 45 * Gtk+ and Gtk+ itself. Since Python is an interpreted language, 46 46 * there is no need for any special build system. 47 * 47 * 48 48 * Python and Gtk+ are readily available on most Linux distributions, 49 49 * but some links are probably useful for Windows users: … … 54 54 * \li To create install packages, you also need py2exe: <a href="http://www.py2exe.org/">http://www.py2exe.org</a>, 55 55 * \li as well as the Nullsoft Install System: http://nsis.sourceforge.net/Main_Page 56 * 56 * 57 57 * The install package can be created by running the \c makeinst.bat 58 58 * file. It contains some absolute paths, so check those befure … … 81 81 * thread. Instead, use \c gobject.idle_add to "inject" the 82 82 * 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 84 84 * that take a short time should be executed in the GUI thread. 85 85 * … … 98 98 * simulator is to be supported, a class with the same (or at least 99 99 * sufficiently similar) public interface should be implemented. 100 * 100 * 101 101 * The most important function of the program is the 102 102 * continuous monitoring of the aircraft's parameters and some other 103 103 * data. The monitoring is started using the \ref 104 104 * 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 106 106 * mlx.acft.Aircraft.handleState "handleState" function of the 107 107 * mlx.acft.Aircraft instance used. The mlx.acft module contains one … … 114 114 * smoothed values of IAS and VS, and then calls each "checker". A 115 115 * 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 117 117 * 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 119 119 * "strobe lights" are switched on and off at the right stages of the 120 120 * flight. But some checkers simply log some \ref 121 121 * mlx.checks.AltimeterLogger "value" whenever it changes 122 122 * in an "interesting" way, or \ref mlx.checks.ACARSSender "send the 123 * ACARS" periodically. 123 * ACARS" periodically. 124 124 * 125 125 * There is also a \ref mlx.checks.StageCheker "checker" which 126 126 * detects the changes in the stage of the flight, and calls the 127 127 * \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 129 129 * \ref mlx.flight.Flight "flight"'s \ref mlx.flight.Flight.setStage 130 130 * "setStage" function, which notifies the GUI and the \ref … … 139 139 * mlx.soundsched.SoundScheduler "sound scheduler" to check if some 140 140 * 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 142 142 * "checklist scheduler" is notified too. 143 143 * 144 144 * As mentioned, there is a \ref mlx.logger.Logger "logger" in the 145 145 * application, which contains the textual log lines as well as the 146 * faults and their scores. 146 * faults and their scores. 147 147 * 148 148 * The business logic part contains many other components, but they … … 151 151 * modules for more information. 152 152 * 153 * \subsection arch_gui GUI 153 * \subsection arch_gui GUI 154 154 * 155 155 * As mentioned, the GUI is implemented using Gtk+. This toolkit … … 158 158 * experience with Glade in an earlier project, it was decided to not 159 159 * use it. Instead, the GUI elements are created and handled by 160 * hand-written code. 160 * hand-written code. 161 161 * 162 162 * The central class of the graphical user interface is … … 165 165 * connection to the simulator and creates the \ref mlx.flight.Flight 166 166 * "flight" and \ref mlx.flight.Aircraft "aircraft" objects as 167 * needed. 167 * needed. 168 168 * 169 169 * To understand the operation of the GUI, one should be familiar with 170 170 * 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. 172 249 */ 173 -
locale/en/mlx.po
r393 r445 63 63 msgid "aircraft_yk40" 64 64 msgstr "Yakovlev Yak-40" 65 66 msgid "aircraft_b462" 67 msgstr "British Aerospace 146-200" 65 68 66 69 msgid "file_filter_all" … … 777 780 msgstr "N_ominal/takeoff:" 778 781 782 msgid "takeoff_derate_b462" 783 msgstr "Der_ate (yes/no):" 784 779 785 msgid "takeoff_derate_tooltip" 780 786 msgstr "Enter the takeoff derate parameter." … … 971 977 msgid "info_delay" 972 978 msgstr "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"1003 979 1004 980 msgid "statusbar_conn_tooltip" -
locale/hu/mlx.po
r393 r445 64 64 msgstr "Jakovlev Jak-40" 65 65 66 msgid "aircraft_b462" 67 msgstr "British Aerospace 146-200" 68 66 69 msgid "file_filter_all" 67 70 msgstr "Összes fájl" … … 778 781 msgstr "Névleges/felszállási:" 779 782 783 msgid "takeoff_derate_b462" 784 msgstr "Teljesítménycsökkentés (yes/no):" 785 780 786 msgid "takeoff_derate_tooltip" 781 787 msgstr "Írd be a felszállási teljesítménycsökkentés értékét." … … 974 980 msgid "info_delay" 975 981 msgstr "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"1006 982 1007 983 msgid "statusbar_conn_tooltip" -
src/mlx/acft.py
r409 r447 152 152 self._checkers.append(checks.VSChecker()) 153 153 154 timeout = 5.0 + config.realIASSmoothingLength - 1154 timeout = 30.0 + config.realIASSmoothingLength - 1 155 155 self._checkers.append(checks.OverspeedChecker(timeout = timeout)) 156 156 … … 1017 1017 #--------------------------------------------------------------------------------------- 1018 1018 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 1019 1051 mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1, 1020 1052 const.FUELTANK_LEFT_AUX, … … 1040 1072 const.AIRCRAFT_T134 : T134, 1041 1073 const.AIRCRAFT_T154 : T154, 1042 const.AIRCRAFT_YK40 : YK40 } 1074 const.AIRCRAFT_YK40 : YK40, 1075 const.AIRCRAFT_B462 : B462 } 1043 1076 1044 1077 #--------------------------------------------------------------------------------------- -
src/mlx/checks.py
r416 r453 940 940 if n1>5: numEnginesRunning += 1 941 941 942 if flight.stage==const.STAGE_PARKING: 942 if flight.stage==const.STAGE_PARKING or \ 943 (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking): 943 944 return numEnginesRunning<len(state.n1) \ 944 945 and state.antiCollisionLightsOn … … 1050 1051 def isCondition(self, flight, aircraft, oldState, state): 1051 1052 """Check if the fault condition holds.""" 1052 return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or\1053 1053 return state.gLoad>2.0 and not state.onTheGround and \ 1054 (flight.stage!=const.STAGE_LANDING or state.radioAltitude>=50) 1054 1055 1055 1056 def logFault(self, flight, aircraft, logger, oldState, state): … … 1118 1119 (flight.stage in 1119 1120 [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 \ 1121 1124 ((not state.autoXPDR or \ 1122 1125 (self._liftOffTime is not None and … … 1235 1238 class OverspeedChecker(PatientFaultChecker): 1236 1239 """Check if Vne has been exceeded.""" 1237 def __init__(self, timeout = 5.0):1240 def __init__(self, timeout = 30.0): 1238 1241 """Construct the checker.""" 1239 1242 super(OverspeedChecker, self).__init__(timeout = timeout) … … 1304 1307 return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING, 1305 1308 const.STAGE_TAXIAFTERLAND] and \ 1309 state.reverser and \ 1306 1310 state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser) 1307 1311 … … 1350 1354 If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as 1351 1355 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 taxi1356 knots, or the plane remains on the ground for more than 40 seconds, a taxi 1353 1357 speed error is logged with the highest ground speed detected. This state is 1354 1358 also stored in the flight object as a possible 1355 1359 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, 1357 1361 and the previously saved takeoff state is logged. 1358 1362 … … 1386 1390 aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF) 1387 1391 self._takeoffState = None 1388 elif state.timestamp > (self._takeoffState.timestamp + 30):1392 elif state.timestamp > (self._takeoffState.timestamp + 40): 1389 1393 flight.setRTOState(self._highestSpeedState) 1390 1394 elif self._takeoffState is not None: -
src/mlx/const.py
r459 r466 11 11 12 12 ## The version of the program 13 VERSION="0.1 5.1"13 VERSION="0.17.1" 14 14 15 15 #------------------------------------------------------------------------------- … … 95 95 ## Aircraft type: Yakovlev Yak-40 96 96 AIRCRAFT_YK40 = 15 97 98 ## Aircraft type: British Aerospace BAe-146 99 AIRCRAFT_B462 = 17 97 100 98 101 #------------------------------------------------------------------------------- … … 108 111 AIRCRAFT_B733, AIRCRAFT_B734, AIRCRAFT_B735, 109 112 AIRCRAFT_T154, AIRCRAFT_T134, 110 AIRCRAFT_YK40, AIRCRAFT_DC3] 113 AIRCRAFT_YK40, AIRCRAFT_DC3, 114 AIRCRAFT_B462] 111 115 112 116 #------------------------------------------------------------------------------- … … 129 133 AIRCRAFT_T134 : "T134", 130 134 AIRCRAFT_T154 : "T154", 131 AIRCRAFT_YK40 : "YK40" } 135 AIRCRAFT_YK40 : "YK40", 136 AIRCRAFT_B462 : "B462" } 132 137 133 138 #------------------------------------------------------------------------------- … … 237 242 #------------------------------------------------------------------------------- 238 243 239 ## Delay code: loading problems240 DELAYCODE_LOADING = 0241 242 ## Delay code: VATSIM problem243 DELAYCODE_VATSIM = 1244 245 ## Delay code: network problems246 DELAYCODE_NETWORK = 2247 248 ## Delay code: controller's fault249 DELAYCODE_CONTROLLER = 3250 251 ## Delay code: system crash or freeze252 DELAYCODE_SYSTEM = 4253 254 ## Delay code: navigation problem255 DELAYCODE_NAVIGATION = 5256 257 ## Delay code: traffic problems258 DELAYCODE_TRAFFIC = 6259 260 ## Delay code: apron navigation261 DELAYCODE_APRON = 7262 263 ## Delay code: weather problems264 DELAYCODE_WEATHER = 8265 266 ## Delay code: personal reasons267 DELAYCODE_PERSONAL = 9268 269 #-------------------------------------------------------------------------------270 271 244 ## Message type: logger error 272 245 # FIXME: cannot set the hotkey -
src/mlx/fsuipc.py
r412 r456 1740 1740 return "FSUIPC/Dreamwings Bombardier Dash 8-Q400" 1741 1741 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 1742 1748 def getAircraftState(self, aircraft, timestamp, data): 1743 1749 """Get the aircraft state. … … 1747 1753 timestamp, 1748 1754 data) 1749 state.pitotHeatOn = not state.pitotHeatOn 1755 if data[self._dwdh8d_navgps]==1: 1756 state.apHeading = None 1750 1757 1751 1758 return state … … 2043 2050 #------------------------------------------------------------------------------ 2044 2051 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 2045 2079 _genericModels = { const.AIRCRAFT_B736 : B737Model, 2046 2080 const.AIRCRAFT_B737 : B737Model, … … 2058 2092 const.AIRCRAFT_T134 : T134Model, 2059 2093 const.AIRCRAFT_T154 : T154Model, 2060 const.AIRCRAFT_YK40 : YK40Model } 2094 const.AIRCRAFT_YK40 : YK40Model, 2095 const.AIRCRAFT_B462 : B462Model } 2061 2096 2062 2097 #------------------------------------------------------------------------------ -
src/mlx/gui/common.py
r401 r443 73 73 74 74 SHADOW_IN = gtk.SHADOW_IN 75 SHADOW_NONE = gtk.SHADOW_NONE 75 76 76 77 POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC … … 86 87 87 88 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 88 94 89 95 pixbuf_new_from_file = gdk.pixbuf_new_from_file … … 139 145 140 146 SHADOW_IN = gtk.ShadowType.IN 147 SHADOW_NONE = gtk.ShadowType.NONE 141 148 142 149 POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC … … 152 159 153 160 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 154 166 155 167 pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file … … 286 298 _const.AIRCRAFT_T134 : xstr("aircraft_t134"), 287 299 _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") } 289 302 290 303 #------------------------------------------------------------------------------ -
src/mlx/gui/flight.py
r413 r436 368 368 def _loginClicked(self, button): 369 369 """Called when the login button was clicked.""" 370 print "mlx.flight.LoginPage: logg edin"370 print "mlx.flight.LoginPage: logging in" 371 371 self._wizard.login(self._handleLoginResult, 372 372 self._pilotID.get_text(), … … 591 591 flight = self._getSelectedFlight() 592 592 self._wizard._bookedFlight = flight 593 self._wizard.gui.enableFlightInfo( )593 self._wizard.gui.enableFlightInfo(flight.aircraftType) 594 594 595 595 self._updateDepartureGate() -
src/mlx/gui/gui.py
r393 r436 486 486 self.reset() 487 487 488 def enableFlightInfo(self ):488 def enableFlightInfo(self, aircraftType): 489 489 """Enable the flight info tab.""" 490 self._flightInfo.enable( )490 self._flightInfo.enable(aircraftType) 491 491 492 492 def cancelFlight(self): -
src/mlx/gui/info.py
r349 r441 1 1 2 2 from common import * 3 4 from mlx.gui.delaycodes import DelayCodeTable 3 5 4 6 from mlx.i18n import xstr … … 21 23 """The flight info tab.""" 22 24 @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 @staticmethod37 25 def _createCommentArea(label): 38 26 """Create a comment area. … … 52 40 53 41 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 61 45 comments = gtk.TextView() 62 46 comments.set_wrap_mode(WRAP_WORD) … … 94 78 95 79 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 96 xscale = 0.0, yscale = 0.0)80 xscale = 1.0, yscale = 1.0) 97 81 alignment.set_padding(padding_top = 4, padding_bottom = 4, 98 82 padding_left = 8, padding_right = 8) 99 83 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) 102 90 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) 119 92 frame.add(alignment) 120 93 121 94 self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 122 xscale = 0.0, yscale = 0.0)95 xscale = 1.0, yscale = 1.0) 123 96 self._delayAlignment.add(frame) 97 self._delayAlignment.set_padding(padding_top = 0, padding_bottom = 0, 98 padding_left = 8, padding_right = 8) 124 99 125 100 self.pack_start(self._delayAlignment, False, False, 8) … … 147 122 def delayCodes(self): 148 123 """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 155 125 156 def enable(self ):126 def enable(self, aircraftType): 157 127 """Enable the flight info tab.""" 158 128 self._comments.set_sensitive(True) 159 129 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() 161 133 162 134 def disable(self): … … 164 136 self._comments.set_sensitive(False) 165 137 self._flightDefects.set_sensitive(False) 166 self._delayTable.set_sensitive(False) 138 self._delayWindow.set_sensitive(False) 139 self._delayCodeTable.setStyle() 167 140 168 141 def reset(self): … … 170 143 self._comments.get_buffer().set_text("") 171 144 self._flightDefects.get_buffer().set_text("") 172 173 for widget in self._delayCodeWidgets: 174 widget.set_active(False) 145 self._delayCodeTable.reset() 175 146 176 147 def _commentsChanged(self, textbuffer): -
src/mlx/gui/pirep.py
r303 r437 241 241 for code in pirep.delayCodes: 242 242 if delayCodes: delayCodes += ", " 243 delayCodes += PIREP.delayCodeNames[code]243 delayCodes += code 244 244 245 245 self._delayCodes.get_buffer().set_text(delayCodes) -
src/mlx/pirep.py
r401 r437 19 19 class PIREP(object): 20 20 """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 32 21 @staticmethod 33 22 def _formatLine(timeStr, line): … … 140 129 for code in self.delayCodes: 141 130 if s: s += ", " 142 s += PIREP.delayCodeNames[code]131 s += code 143 132 return s 144 133 -
src/mlx/pyuipc_sim.py
r408 r443 158 158 ENGINE_3 = 2 159 159 160 ## Engine index: engine #4 161 ENGINE_4 = 3 162 160 163 ## The number of hotkey entries 161 164 HOTKEY_SIZE = 56 … … 295 298 self.visibility = 10000 296 299 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] 299 302 300 303 self.payloadCount = 1 … … 328 331 self.eng2DeIce = False 329 332 self.eng3DeIce = False 333 self.eng4DeIce = False 330 334 self.propDeIce = False 331 335 self.structDeIce = False … … 427 431 elif offset==0x09e2: # Engine #3 de-ice 428 432 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 429 437 elif offset==0x0af4: # Fuel weight 430 438 return int(self.fuelWeight * 256.0) … … 533 541 return self.n1[self.ENGINE_2] 534 542 elif offset==0x2200: # Engine #3 N1 543 return self.n1[self.ENGINE_3] 544 elif offset==0x2300: # Engine #4 N1 535 545 return self.n1[self.ENGINE_3] 536 546 elif offset==0x2ea0: # Elevator trim … … 695 705 elif offset==0x09e2: # Engine #3 de-ice 696 706 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 697 711 elif offset==0x0af4: # Fuel weight 698 712 self.fuelWeight = value / 256.0 … … 796 810 elif offset==0x2200: # Engine #3 N1 797 811 self.n1[self.ENGINE_3] = value 812 elif offset==0x2300: # Engine #4 N1 813 self.n1[self.ENGINE_4] = value 798 814 elif offset==0x2ea0: # Elevator trim 799 815 self.elevatorTrim = value * 180.0 / math.pi … … 1413 1429 self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value, 1414 1430 lambda word: float(word)) 1431 self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value, 1432 lambda word: float(word)) 1415 1433 1416 1434 self._valueHandlers["throttle_1"] = ([(0x088c, "H")], … … 1421 1439 CLI.throttle2pyuipc) 1422 1440 self._valueHandlers["throttle_3"] = ([(0x09bc, "H")], 1441 CLI.pyuipc2throttle, 1442 CLI.throttle2pyuipc) 1443 self._valueHandlers["throttle_4"] = ([(0x0a54, "H")], 1423 1444 CLI.pyuipc2throttle, 1424 1445 CLI.throttle2pyuipc) … … 1490 1511 CLI.bool2str, CLI.str2bool) 1491 1512 self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")], 1513 CLI.bool2str, CLI.str2bool) 1514 self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")], 1492 1515 CLI.bool2str, CLI.str2bool) 1493 1516 self._valueHandlers["propDeice"] = ([(0x337c, "b")], -
src/mlx/web.py
r401 r443 63 63 "TU3" : const.AIRCRAFT_T134, 64 64 "TU5" : const.AIRCRAFT_T154, 65 "YK4" : const.AIRCRAFT_YK40 } 65 "YK4" : const.AIRCRAFT_YK40, 66 "146" : const.AIRCRAFT_B462 } 66 67 67 68 TYPE2TYPECODE = { const.AIRCRAFT_B736 : "736", … … 80 81 const.AIRCRAFT_T134 : "TU3", 81 82 const.AIRCRAFT_T154 : "TU5", 82 const.AIRCRAFT_YK40 : "YK4" } 83 const.AIRCRAFT_YK40 : "YK4", 84 const.AIRCRAFT_B462 : "146" } 83 85 84 86 @staticmethod … … 115 117 departureTime = readline(f) 116 118 self.departureTime = BookedFlight.getDateTime(date, departureTime) 117 119 118 120 arrivalTime = readline(f) 119 121 self.arrivalTime = BookedFlight.getDateTime(date, arrivalTime) … … 130 132 departureTime = None 131 133 arrivalTime = None 132 134 133 135 line = f.readline() 134 lineNumber = 0 136 lineNumber = 0 135 137 while line: 136 138 lineNumber += 1 137 139 line = line.strip() 138 140 139 141 hashIndex = line.find("#") 140 142 if hashIndex>=0: line = line[:hashIndex] … … 142 144 equalIndex = line.find("=") 143 145 lineOK = equalIndex>0 144 146 145 147 if lineOK: 146 key = line[:equalIndex].strip() 148 key = line[:equalIndex].strip() 147 149 value = line[equalIndex+1:].strip().replace("\:", ":") 148 150 149 151 lineOK = key and value 150 152 … … 196 198 self.aircraftTypeName = \ 197 199 BookedFlight.TYPE2TYPECODE[self.aircraftType] 198 200 199 201 def writeIntoFile(self, f): 200 202 """Write the flight into a file.""" … … 235 237 else: 236 238 raise Exception("Invalid aircraft type code: '" + typeCode + "'") 237 239 238 240 def __repr__(self): 239 241 """Get a representation of the flight.""" … … 248 250 s += ">" 249 251 return s 250 252 251 253 #------------------------------------------------------------------------------ 252 254 … … 279 281 def __repr__(self): 280 282 """Get the representation of the plane object.""" 281 s = "<Plane: %s %s" % (self.tailNumber, 283 s = "<Plane: %s %s" % (self.tailNumber, 282 284 "home" if self.status==const.PLANE_HOME else \ 283 285 "away" if self.status==const.PLANE_AWAY else \ … … 288 290 s += ">" 289 291 return s 290 292 291 293 292 294 #------------------------------------------------------------------------------ … … 323 325 gateNumbers.add(p.gateNumber) 324 326 return gateNumbers 325 327 326 328 def updatePlane(self, tailNumber, status, gateNumber = None): 327 329 """Update the status of the given plane.""" … … 330 332 plane.status = status 331 333 plane.gateNumber = gateNumber 332 334 333 335 def __iter__(self): 334 336 """Get an iterator over the planes.""" 335 337 for plane in self._planes.itervalues(): 336 338 yield plane 337 339 338 340 def __getitem__(self, tailNumber): 339 341 """Get the plane with the given tail number. … … 345 347 """Get the representation of the fleet object.""" 346 348 return self._planes.__repr__() 347 349 348 350 #------------------------------------------------------------------------------ 349 351 … … 371 373 s += ">" 372 374 return s 373 375 374 376 #------------------------------------------------------------------------------ 375 377 … … 389 391 "E" not in attrs or not attrs["E"]: 390 392 return 391 393 392 394 icao = attrs["A"] 393 395 if icao not in self._notams: 394 396 return 395 397 396 398 begin = datetime.datetime.strptime(attrs["B"], "%Y-%m-%d %H:%M:%S") 397 399 398 400 c = attrs["C"] if "C" in attrs else None 399 401 end = datetime.datetime.strptime(c, "%Y-%m-%d %H:%M:%S") if c else None 400 402 401 403 permanent = attrs["C_flag"]=="PERM" if "C_flag" in attrs else False 402 404 403 405 repeatCycle = attrs["D"] if "D" in attrs else None 404 406 … … 473 475 """A login request.""" 474 476 iso88592decoder = codecs.getdecoder("iso-8859-2") 475 477 476 478 def __init__(self, callback, pilotID, password, entranceExam): 477 479 """Construct the login request with the given pilot ID and … … 488 490 md5.update(self._pilotID) 489 491 pilotID = md5.hexdigest() 490 492 491 493 md5 = hashlib.md5() 492 494 md5.update(self._password) … … 524 526 result.pilotName = self.iso88592decoder(readline(f))[0] 525 527 result.exams = readline(f) 526 528 527 529 while True: 528 530 line = readline(f) … … 540 542 541 543 return result 542 544 543 545 #------------------------------------------------------------------------------ 544 546 545 547 class GetFleet(Request): 546 548 """Request to get the fleet from the website.""" 547 549 548 550 def __init__(self, callback): 549 551 """Construct the fleet request.""" … … 558 560 result.fleet = Fleet(f) 559 561 f.close() 560 562 561 563 return result 562 564 … … 585 587 ("status", status), 586 588 ("kapu", gateNumber)]) 587 589 588 590 f = urllib2.urlopen(url, data, timeout = 10.0) 589 591 line = readline(f) 590 592 591 593 result = Result() 592 594 result.success = line == "OK" 593 595 594 596 return result 595 597 596 598 #------------------------------------------------------------------------------ 597 599 … … 628 630 629 631 class 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.""" 631 633 632 634 def __init__(self, callback, airports): … … 639 641 url = "http://www.aviationweather.gov/adds/dataserver_current/httpparam?" 640 642 data = urllib.urlencode([ ("dataSource" , "metars"), 641 ("requestType", "retrieve"), 643 ("requestType", "retrieve"), 642 644 ("format", "csv"), 643 645 ("stationString", " ".join(self._airports)), … … 652 654 if len(line)>5 and line[4]==' ': 653 655 icao = line[0:4] 654 if icao in self._airports: 656 if icao in self._airports: 655 657 result.metars[icao] = line.strip().split(",")[0] 656 658 finally: … … 696 698 data["bag"] = str(pirep.bagWeight) 697 699 data["mail"] = str(pirep.mailWeight) 698 700 699 701 data["flttype"] = SendPIREP._flightTypes[pirep.flightType] 700 702 data["onoff"] = "1" if pirep.online else "0" … … 742 744 f.close() 743 745 744 return result 746 return result 745 747 #------------------------------------------------------------------------------ 746 748 … … 757 759 """Perform the sending of the ACARS.""" 758 760 print "Sending the online ACARS" 759 761 760 762 url = "http://www.virtualairlines.hu/acars2/acarsonline.php" 761 763 … … 766 768 data["pid"] = acars.pid 767 769 data["pilot"] = SendACARS._latin2Encoder(acars.pilotName)[0] 768 770 769 771 data["pass"] = str(bookedFlight.numPassengers) 770 772 data["callsign"] = bookedFlight.callsign 771 773 data["airplane"] = bookedFlight.aircraftTypeName 772 774 data["from"] = bookedFlight.departureICAO 773 data["to"] = bookedFlight.arrivalICAO 775 data["to"] = bookedFlight.arrivalICAO 774 776 data["lajstrom"] = bookedFlight.tailNumber 775 777 … … 779 781 data["altitude"] = str(acars.state.altitude) 780 782 data["speed"] = str(acars.state.groundSpeed) 781 783 782 784 data["event"] = acars.getEventText() 783 785 … … 788 790 f.close() 789 791 790 return result 792 return result 791 793 792 794 #------------------------------------------------------------------------------ … … 813 815 """Enqueue a fleet retrieval request.""" 814 816 self._addRequest(GetFleet(callback)) 815 817 816 818 def updatePlane(self, callback, tailNumber, status, gateNumber = None): 817 """Update the status of the given plane.""" 819 """Update the status of the given plane.""" 818 820 self._addRequest(UpdatePlane(callback, tailNumber, status, gateNumber)) 819 821 … … 821 823 """Get the NOTAMs for the given two airports.""" 822 824 self._addRequest(GetNOTAMs(callback, departureICAO, arrivalICAO)) 823 825 824 826 def getMETARs(self, callback, airports): 825 827 """Get the METARs for the given airports.""" … … 833 835 """Send the given ACARS""" 834 836 self._addRequest(SendACARS(callback, acars)) 835 837 836 838 def run(self): 837 839 """Process the requests.""" … … 844 846 845 847 request.perform() 846 848 847 849 def _addRequest(self, request): 848 850 """Add the given request to the queue.""" … … 855 857 if __name__ == "__main__": 856 858 import time 857 859 858 860 def callback(returned, result): 859 861 print returned, unicode(result) 860 862 861 863 handler = Handler() 862 864 handler.start() … … 866 868 # Plane: HA-LEG home (gate 67) 867 869 #handler.updatePlane(callback, "HA-LQC", const.PLANE_AWAY, "72") 868 #time.sleep(3) 870 #time.sleep(3) 869 871 #handler.getFleet(callback) 870 872 #time.sleep(3) … … 873 875 #handler.getMETARs(callback, ["LHBP", "EPWA"]) 874 876 #time.sleep(5) 875 877 876 878 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.