Changes in / [466:7c66a233f9f3:464:2e0ef8c7ca9a]
- Files:
-
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r442 r276 6 6 mlx-common.nsh 7 7 locale/.+/LC_MESSAGES 8 locale/.+/mlx_delay.po9 src/mlx/gui/dcdata.py10 xplra.py -
.hgtags
r458 r411 7 7 13937d44e004a8751426c14f6173ff3240822f62 version_0.13 8 8 cc775599652d39ab574dac90fe8730ef52842744 version_0.14 9 e11be493e87d09619387e352c389208cca54097d version_0.1510 89c9d5d516eb0da04f2cd10db58332f054249bb1 version_0.1611 998ecee73a374558f87b42cd851d76b375870185 version_0.17 -
MLXMANIFEST
r457 r418 7 7 library/fnmatch.pyc 3414 4d50000f78e903598af06ef1c5cfb3ef 8 8 library/libexpat-1.dll 143096 701659d3689bf4a8265b669b7d774255 9 library/gtk/_gtk.pyc 549 47d70d42eae21e74c6032ae84cb153409 library/gtk/_gtk.pyc 549 6233f4030116a4767b50edc0fdb67866 10 10 library/encodings/cp858.pyc 7591 02054a0b8e91b9758826eb70cddf096f 11 library/mlx/pirep.pyc 4623 68189237ada6e14afd692f29194675a911 library/mlx/pirep.pyc 5235 fc4a7861ab475fe7e629ada4f84de089 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 20 2819da9092529a1f823300394d3f0b7c15 library/mlx/gui/gui.pyc 48512 c75d1f34de964078769de9b4ee5a0c3e 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 3c47e2c9b1ff22c82fa1138f94bb57824 library/gobject/_gobject.pyc 573 17a945fa9ae6b80db017ec58ebf10947 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 4951 cdb36f50aa93e2c35884a07b4d8b0ab742 library/mlx/gui/info.pyc 6082 fa61b9e5bd1dec5998a46ce9a07076e6 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 64529 cc181a87f3328bf8a736ef008a34197262 locale/hu/LC_MESSAGES/mlx.mo 44774 b7f65dc824054b25c08aa100b02d599c 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 85f44addf6e86ff56c1043c21217c41d75 library/_hashlib.pyc 549 ed1f009b3ccd9a93d8fa4258f9373796 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/ mlx/gui/dcdata.pyc 16051 4892c87e6998bb6151739e7994ebe5bf79 library/unittest/result.pyc 7444 aefbb3cc79c0ff17787ce84faed7f5e8 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 60039 ba50bf8059d1a393961d122430b40e7686 locale/en/LC_MESSAGES/mlx.mo 41375 3145880f78f59668a68f46eee10b6bc1 87 87 library/traceback.pyc 11223 50ace5c2c6c040a923082442da94cd78 88 88 library/_weakrefset.pyc 9290 a56e87c491c0511cd329a3c8c4cd9563 89 library/mlx/flight.pyc 17303 b9942b2863ce54ed3704e9883bf5454189 library/mlx/flight.pyc 17303 30d491cdcb9acb318d4c952ca777808a 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 2133 bb9dc9c43ea8ebf511f4069062577720116 library/mlx/fsuipc.pyc 70737 8d01b21710cf9438bbb0b20839dfc945 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 10275 4466f2d9547b91107ea7de9b69bcc71e128 library/mlx/gui/common.pyc 9996 53858ed2537f28fd26c1d95fa3ada991 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 cc9cb8a4064a24cef04a8a129edc4004135 library/win32file.pyc 552 e2a792eee61fb72563f73da86c462435134 library/cairo/_cairo.pyc 561 2d69c9c670ed352716d4fb97180ab533 135 library/win32file.pyc 552 02091144183ac705afe0a744872dcf7c 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 e59fe6bdb36241510519275012597648144 library/bz2.pyc 534 6fc99d980120fd663ffb0818a34828b1 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 31467783c1b3ebe2b17a07b760f5ac6a161 library/mlx/const.pyc 6 707 e11d9ff3e6aa26a56f1828be2f19fc3d160 mlxupdate.exe 19456 c887d69e3c2741503e23e244f0a689c4 161 library/mlx/const.pyc 6956 f4684465c27724b62f5a67c14fec672f 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 1cb0db32b06e3ca9372bd132e4c241a5174 library/_ssl.pyc 537 e26888c5773f237986294f0be8c60a62 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 fcecb75e0a3d45438f3c8b43b235948194 library/unicodedata.pyc 558 6297d24ae9647ab3fcdf09ca61b75c3c 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 286993c7cd527b1e0d5df1c72e64969225 library/pangocairo.pyc 555 3b0030fc6f2497e51ca60c00750d8684 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 9032 6dd23f897276b82ef46a40398e45ca96232 library/mlx/web.pyc 28982 9db31983a125d6fbb9cccd699f450889 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 36d2d5c3740dfe8e21fc3caa60d638af238 library/pyuipc.pyc 543 17740e034cdc12d87175e6f44f8d8c0c 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 a0d6186cd638718fb49119799e6e9de9262 library/win32pipe.pyc 552 eb124a4ee4010ec897a5d2ea2e19072d 263 263 doc/manual/hu/logTab.png 29189 d3cbae223d547919d9954fc535856298 264 264 library/encodings/iso2022_jp_2004.pyc 1723 66376e788f3819e781897268c1100986 265 library/win32event.pyc 555 85b44a4f42738a522ff0097d47e4e90e265 library/win32event.pyc 555 d8c0a9982b63b46d494318127fb020dd 266 266 library/encodings/cp866.pyc 8103 f36418dcf93b17b3ced63bd544f44159 267 library/gio/_gio.pyc 549 4e648e0b01c80d857604e50e631c74b3267 library/gio/_gio.pyc 549 9e7f2b095af02def0c64e781aac9ebc6 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 49 328578f8f3b6ecdb5a4fc66a69654b43287 library/mlx/gui/pirep.pyc 16780 06c8ceef8809771f5b870ca161d2a0e1 288 288 library/mimetypes.pyc 17806 927ce6a7079707aaee925e855ed23454 289 library/_ctypes.pyc 546 b4e549553cf3be3d4f7b48f2340c8729289 library/_ctypes.pyc 546 3537b8548171d9214a47aae373358d13 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 6d558b1484c61348b34e48a353c8fc09307 library/mlx/gui/monitor.pyc 12015 d770e12a62ca8d880144b8b45c3a2576 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 70 3632efc6ec9e67adebd76460bb18f556316 library/mlx/gui/flight.pyc 111758 d700fbd8afa04e59546d7e9cd374b10e 317 317 library/unittest/case.pyc 37758 1d2235e74c246b562c5c00ddf73c621a 318 318 library/subprocess.pyc 38648 c9f749db06dfc9fb32079de51d6efd01 319 library/mlx/acft.pyc 3 7473 3e6648f88ebabd4e2b695d2e49f4e79d319 library/mlx/acft.pyc 36286 14bca971b2e3aba95a2dcfca1e8317f7 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 0f30688f8dac3814a6eac9ca7910e527332 library/pyexpat.pyc 546 ccf3d0df566cb35274165187cc26b2fe 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 835167109a0196c168b7dd10e7562ab2357 library/_socket.pyc 546 0f631e04e95639805597d54f1753d7e0 358 358 library/encodings/hex_codec.pyc 3520 a8b8d5b7c8810379c7007bcbc253951c 359 library/mlx/checks.pyc 58 257 dbf35ff3f3e94e5479c32f39d8a919f0359 library/mlx/checks.pyc 58147 34a5bf3f11b975072500165bb3599f8f 360 360 doc/manual/en/statusIcon2.png 5875 71fc121823dee0a4c00715fac1b5665c 361 library/mlx/sound.pyc 6326 33443e15039f5714339f41b355d0e30f361 library/mlx/sound.pyc 6326 be3f6aa26c6b3fa2e358ad6882010a4d 362 362 doc/manual/en/pirepViewer.png 22216 326127e30fa405919b337cc9920698ed 363 363 library/encodings/aliases.pyc 8750 75c22196420d0157fec085d285947a71 364 library/glib/_glib.pyc 555 f86757facd85e32db6a4e3bb463f8019364 library/glib/_glib.pyc 555 50a45dfb7fc78fead808072687ba11d5 365 365 library/libpangowin32-1.0-0.dll 108945 d07f128828225b7cc38e9e590eb3ba8a 366 366 library/encodings/iso8859_10.pyc 2693 5e6cc8f721486ddbc1c99da285e13191 367 library/win32api.pyc 549 eb908638a60b5da82c9212c47b0f7781367 library/win32api.pyc 549 77d91a1efed3113697ab9b3dc3e12bea 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 894 38f9c05d6ef797a6d345174b9d6b9ead396 library/mlx/pyuipc_sim.pyc 56186 bd00d6dfd1771a62579c8fb84bf5dcf0 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 ff1dfee167d49aabeafa74ee4659ceb8409 library/select.pyc 543 4cc793adb82a4e1505ad2ee3f43b02ec 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 4796262a8b1b52345a59ba0faa53e5cc414 library/atk.pyc 534 b03849f4a1eac3e542e97a385e0d1657 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 10345b15a699aae07c3c15c2cdbe6bed424 runmlx.exe 64000 4ad32cb1aec39a193569f600adb7d977 425 425 library/optparse.pyc 51253 39594a40bc1222173d57b7d5740e3d92 426 library/mlx/fs.pyc 11756 e00d02c76fac4a787e7a5702441ea864 427 library/unittest/result.pyc 7444 aefbb3cc79c0ff17787ce84faed7f5e8 426 library/mlx/fs.pyc 11756 c8b8a4a1d355432ff2aaa9ac8cd445d7 428 427 library/inspect.pyc 38547 836f659fad54f5ee7e8f9d565003aacd 429 428 library/pickle.pyc 36348 2b55640f6f4e2fd70d95482fd16bfb73 … … 434 433 library/glib/option.pyc 11891 bd90183c75d8f473ecf653e3d63a27f9 435 434 library/StringIO.pyc 11100 f4eb4a2bb3d6fb0af925681c5375c673 436 library/pango.pyc 540 bc12badc36d786fa32f867aaf7fc8036435 library/pango.pyc 540 a9ea88a574b996c739cce07e2b315b3e 437 436 Microsoft.VC90.CRT/msvcp90.dll 568832 6de5c66e434a9c1729575763d891c6c2 438 437 library/sre_parse.pyc 18380 fe2376a101668be1124f9ee316662bab 439 library/mlx/gui/delaycodes.pyc 12327 1ef0c40dfd726f737eafc266975298a8440 438 library/encodings/raw_unicode_escape.pyc 2048 8138045029da04bf45204ab756d1bcd4 441 439 sounds/TOD.mp3 174707 92176d53d948fbfebd08c011b063179a -
Makefile
r439 r276 3 3 all: $(foreach lang,$(LANGUAGES),locale/$(lang)/LC_MESSAGES/mlx.mo) 4 4 5 locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po locale/%/mlx_delay.po5 locale/%/LC_MESSAGES/mlx.mo: locale/%/mlx.po 6 6 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 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. 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. 249 172 */ 173 -
locale/en/mlx.po
r445 r393 63 63 msgid "aircraft_yk40" 64 64 msgstr "Yakovlev Yak-40" 65 66 msgid "aircraft_b462"67 msgstr "British Aerospace 146-200"68 65 69 66 msgid "file_filter_all" … … 780 777 msgstr "N_ominal/takeoff:" 781 778 782 msgid "takeoff_derate_b462"783 msgstr "Der_ate (yes/no):"784 785 779 msgid "takeoff_derate_tooltip" 786 780 msgstr "Enter the takeoff derate parameter." … … 977 971 msgid "info_delay" 978 972 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" 979 1003 980 1004 msgid "statusbar_conn_tooltip" -
locale/hu/mlx.po
r445 r393 64 64 msgstr "Jakovlev Jak-40" 65 65 66 msgid "aircraft_b462"67 msgstr "British Aerospace 146-200"68 69 66 msgid "file_filter_all" 70 67 msgstr "Összes fájl" … … 781 778 msgstr "Névleges/felszállási:" 782 779 783 msgid "takeoff_derate_b462"784 msgstr "Teljesítménycsökkentés (yes/no):"785 786 780 msgid "takeoff_derate_tooltip" 787 781 msgstr "Írd be a felszállási teljesítménycsökkentés értékét." … … 980 974 msgid "info_delay" 981 975 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" 982 1006 983 1007 msgid "statusbar_conn_tooltip" -
src/mlx/acft.py
r447 r409 152 152 self._checkers.append(checks.VSChecker()) 153 153 154 timeout = 30.0 + config.realIASSmoothingLength - 1154 timeout = 5.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 following1023 structure:1024 - fuel: left, centre, right1025 - n1: left outer, left inner, right inner, right outer1026 - reverser: empty (the plane has no reversers)"""1027 def __init__(self, flight):1028 super(B462, self).__init__(flight)1029 self.dow = 257061030 self.mtow = 439981031 self.mlw = 385991032 self.mzfw = 337921033 self.gearSpeedLimit = 2101034 self.flapSpeedLimits = { 18 : 217,1035 24 : 180,1036 30 : 170,1037 33 : 150 }1038 1039 @property1040 def derateLabels(self):1041 """Get the derate strings for this type."""1042 return (xstr("takeoff_derate_b462"), None)1043 1044 @property1045 def derateTemplate(self):1046 """Get the derate template for this aicraft type."""1047 return "Derate enabled: %s"1048 1049 #---------------------------------------------------------------------------------------1050 1051 1019 mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1, 1052 1020 const.FUELTANK_LEFT_AUX, … … 1072 1040 const.AIRCRAFT_T134 : T134, 1073 1041 const.AIRCRAFT_T154 : T154, 1074 const.AIRCRAFT_YK40 : YK40, 1075 const.AIRCRAFT_B462 : B462 } 1042 const.AIRCRAFT_YK40 : YK40 } 1076 1043 1077 1044 #--------------------------------------------------------------------------------------- -
src/mlx/checks.py
r453 r416 940 940 if n1>5: numEnginesRunning += 1 941 941 942 if flight.stage==const.STAGE_PARKING or \ 943 (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking): 942 if flight.stage==const.STAGE_PARKING: 944 943 return numEnginesRunning<len(state.n1) \ 945 944 and state.antiCollisionLightsOn … … 1051 1050 def isCondition(self, flight, aircraft, oldState, state): 1052 1051 """Check if the fault condition holds.""" 1053 return state.gLoad>2.0 and not state.onTheGround and\1054 (flight.stage!=const.STAGE_LANDING orstate.radioAltitude>=50)1052 return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or \ 1053 state.radioAltitude>=50) 1055 1054 1056 1055 def logFault(self, flight, aircraft, logger, oldState, state): … … 1119 1118 (flight.stage in 1120 1119 [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 \ 1124 1121 ((not state.autoXPDR or \ 1125 1122 (self._liftOffTime is not None and … … 1238 1235 class OverspeedChecker(PatientFaultChecker): 1239 1236 """Check if Vne has been exceeded.""" 1240 def __init__(self, timeout = 30.0):1237 def __init__(self, timeout = 5.0): 1241 1238 """Construct the checker.""" 1242 1239 super(OverspeedChecker, self).__init__(timeout = timeout) … … 1307 1304 return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING, 1308 1305 const.STAGE_TAXIAFTERLAND] and \ 1309 state.reverser and \1310 1306 state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser) 1311 1307 … … 1354 1350 If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as 1355 1351 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 taxi1352 knots, or the plane remains on the ground for more than 20 seconds, a taxi 1357 1353 speed error is logged with the highest ground speed detected. This state is 1358 1354 also stored in the flight object as a possible 1359 1355 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, 1361 1357 and the previously saved takeoff state is logged. 1362 1358 … … 1390 1386 aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF) 1391 1387 self._takeoffState = None 1392 elif state.timestamp > (self._takeoffState.timestamp + 40):1388 elif state.timestamp > (self._takeoffState.timestamp + 30): 1393 1389 flight.setRTOState(self._highestSpeedState) 1394 1390 elif self._takeoffState is not None: -
src/mlx/const.py
r466 r459 11 11 12 12 ## The version of the program 13 VERSION="0.1 7.1"13 VERSION="0.15.1" 14 14 15 15 #------------------------------------------------------------------------------- … … 95 95 ## Aircraft type: Yakovlev Yak-40 96 96 AIRCRAFT_YK40 = 15 97 98 ## Aircraft type: British Aerospace BAe-14699 AIRCRAFT_B462 = 17100 97 101 98 #------------------------------------------------------------------------------- … … 111 108 AIRCRAFT_B733, AIRCRAFT_B734, AIRCRAFT_B735, 112 109 AIRCRAFT_T154, AIRCRAFT_T134, 113 AIRCRAFT_YK40, AIRCRAFT_DC3, 114 AIRCRAFT_B462] 110 AIRCRAFT_YK40, AIRCRAFT_DC3] 115 111 116 112 #------------------------------------------------------------------------------- … … 133 129 AIRCRAFT_T134 : "T134", 134 130 AIRCRAFT_T154 : "T154", 135 AIRCRAFT_YK40 : "YK40", 136 AIRCRAFT_B462 : "B462" } 131 AIRCRAFT_YK40 : "YK40" } 137 132 138 133 #------------------------------------------------------------------------------- … … 242 237 #------------------------------------------------------------------------------- 243 238 239 ## Delay code: loading problems 240 DELAYCODE_LOADING = 0 241 242 ## Delay code: VATSIM problem 243 DELAYCODE_VATSIM = 1 244 245 ## Delay code: network problems 246 DELAYCODE_NETWORK = 2 247 248 ## Delay code: controller's fault 249 DELAYCODE_CONTROLLER = 3 250 251 ## Delay code: system crash or freeze 252 DELAYCODE_SYSTEM = 4 253 254 ## Delay code: navigation problem 255 DELAYCODE_NAVIGATION = 5 256 257 ## Delay code: traffic problems 258 DELAYCODE_TRAFFIC = 6 259 260 ## Delay code: apron navigation 261 DELAYCODE_APRON = 7 262 263 ## Delay code: weather problems 264 DELAYCODE_WEATHER = 8 265 266 ## Delay code: personal reasons 267 DELAYCODE_PERSONAL = 9 268 269 #------------------------------------------------------------------------------- 270 244 271 ## Message type: logger error 245 272 # FIXME: cannot set the hotkey -
src/mlx/fsuipc.py
r456 r412 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 1748 1742 def getAircraftState(self, aircraft, timestamp, data): 1749 1743 """Get the aircraft state. … … 1753 1747 timestamp, 1754 1748 data) 1755 if data[self._dwdh8d_navgps]==1: 1756 state.apHeading = None 1749 state.pitotHeatOn = not state.pitotHeatOn 1757 1750 1758 1751 return state … … 2050 2043 #------------------------------------------------------------------------------ 2051 2044 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 @property2065 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 state2076 2077 #------------------------------------------------------------------------------2078 2079 2045 _genericModels = { const.AIRCRAFT_B736 : B737Model, 2080 2046 const.AIRCRAFT_B737 : B737Model, … … 2092 2058 const.AIRCRAFT_T134 : T134Model, 2093 2059 const.AIRCRAFT_T154 : T154Model, 2094 const.AIRCRAFT_YK40 : YK40Model, 2095 const.AIRCRAFT_B462 : B462Model } 2060 const.AIRCRAFT_YK40 : YK40Model } 2096 2061 2097 2062 #------------------------------------------------------------------------------ -
src/mlx/gui/common.py
r443 r401 73 73 74 74 SHADOW_IN = gtk.SHADOW_IN 75 SHADOW_NONE = gtk.SHADOW_NONE76 75 77 76 POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC … … 87 86 88 87 EVENT_BUTTON_PRESS = gdk.BUTTON_PRESS 89 90 TREE_VIEW_COLUMN_FIXED = gtk.TREE_VIEW_COLUMN_FIXED91 92 FILL = gtk.FILL93 EXPAND = gtk.EXPAND94 88 95 89 pixbuf_new_from_file = gdk.pixbuf_new_from_file … … 145 139 146 140 SHADOW_IN = gtk.ShadowType.IN 147 SHADOW_NONE = gtk.ShadowType.NONE148 141 149 142 POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC … … 159 152 160 153 EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS 161 162 TREE_VIEW_COLUMN_FIXED = gtk.TreeViewColumnSizing.FIXED163 164 FILL = gtk.AttachOptions.FILL165 EXPAND = gtk.AttachOptions.EXPAND166 154 167 155 pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file … … 298 286 _const.AIRCRAFT_T134 : xstr("aircraft_t134"), 299 287 _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") } 302 289 303 290 #------------------------------------------------------------------------------ -
src/mlx/gui/flight.py
r436 r413 368 368 def _loginClicked(self, button): 369 369 """Called when the login button was clicked.""" 370 print "mlx.flight.LoginPage: logg ingin"370 print "mlx.flight.LoginPage: logged 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( flight.aircraftType)593 self._wizard.gui.enableFlightInfo() 594 594 595 595 self._updateDepartureGate() -
src/mlx/gui/gui.py
r436 r393 486 486 self.reset() 487 487 488 def enableFlightInfo(self , aircraftType):488 def enableFlightInfo(self): 489 489 """Enable the flight info tab.""" 490 self._flightInfo.enable( aircraftType)490 self._flightInfo.enable() 491 491 492 492 def cancelFlight(self): -
src/mlx/gui/info.py
r441 r349 1 1 2 2 from common import * 3 4 from mlx.gui.delaycodes import DelayCodeTable5 3 6 4 from mlx.i18n import xstr … … 23 21 """The flight info tab.""" 24 22 @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 25 37 def _createCommentArea(label): 26 38 """Create a comment area. … … 40 52 41 53 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) 45 61 comments = gtk.TextView() 46 62 comments.set_wrap_mode(WRAP_WORD) … … 78 94 79 95 alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 80 xscale = 1.0, yscale = 1.0)96 xscale = 0.0, yscale = 0.0) 81 97 alignment.set_padding(padding_top = 4, padding_bottom = 4, 82 98 padding_left = 8, padding_right = 8) 83 99 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) 90 102 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) 92 119 frame.add(alignment) 93 120 94 121 self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5, 95 xscale = 1.0, yscale = 1.0)122 xscale = 0.0, yscale = 0.0) 96 123 self._delayAlignment.add(frame) 97 self._delayAlignment.set_padding(padding_top = 0, padding_bottom = 0,98 padding_left = 8, padding_right = 8)99 124 100 125 self.pack_start(self._delayAlignment, False, False, 8) … … 122 147 def delayCodes(self): 123 148 """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 125 155 126 def enable(self , aircraftType):156 def enable(self): 127 157 """Enable the flight info tab.""" 128 158 self._comments.set_sensitive(True) 129 159 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) 133 161 134 162 def disable(self): … … 136 164 self._comments.set_sensitive(False) 137 165 self._flightDefects.set_sensitive(False) 138 self._delayWindow.set_sensitive(False) 139 self._delayCodeTable.setStyle() 166 self._delayTable.set_sensitive(False) 140 167 141 168 def reset(self): … … 143 170 self._comments.get_buffer().set_text("") 144 171 self._flightDefects.get_buffer().set_text("") 145 self._delayCodeTable.reset() 172 173 for widget in self._delayCodeWidgets: 174 widget.set_active(False) 146 175 147 176 def _commentsChanged(self, textbuffer): -
src/mlx/gui/pirep.py
r437 r303 241 241 for code in pirep.delayCodes: 242 242 if delayCodes: delayCodes += ", " 243 delayCodes += code243 delayCodes += PIREP.delayCodeNames[code] 244 244 245 245 self._delayCodes.get_buffer().set_text(delayCodes) -
src/mlx/pirep.py
r437 r401 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 21 32 @staticmethod 22 33 def _formatLine(timeStr, line): … … 129 140 for code in self.delayCodes: 130 141 if s: s += ", " 131 s += code142 s += PIREP.delayCodeNames[code] 132 143 return s 133 144 -
src/mlx/pyuipc_sim.py
r443 r408 158 158 ENGINE_3 = 2 159 159 160 ## Engine index: engine #4161 ENGINE_4 = 3162 163 160 ## The number of hotkey entries 164 161 HOTKEY_SIZE = 56 … … 298 295 self.visibility = 10000 299 296 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] 302 299 303 300 self.payloadCount = 1 … … 331 328 self.eng2DeIce = False 332 329 self.eng3DeIce = False 333 self.eng4DeIce = False334 330 self.propDeIce = False 335 331 self.structDeIce = False … … 431 427 elif offset==0x09e2: # Engine #3 de-ice 432 428 return 1 if self.eng3DeIce else 0 433 elif offset==0x0a54: # Engine #4 throttle434 return self._getThrottle(self.ENGINE_4)435 elif offset==0x0a7a: # Engine #4 de-ice436 return 1 if self.eng4DeIce else 0437 429 elif offset==0x0af4: # Fuel weight 438 430 return int(self.fuelWeight * 256.0) … … 541 533 return self.n1[self.ENGINE_2] 542 534 elif offset==0x2200: # Engine #3 N1 543 return self.n1[self.ENGINE_3]544 elif offset==0x2300: # Engine #4 N1545 535 return self.n1[self.ENGINE_3] 546 536 elif offset==0x2ea0: # Elevator trim … … 705 695 elif offset==0x09e2: # Engine #3 de-ice 706 696 self.eng3DeIce = value!=0 707 elif offset==0x0a54: # Engine #4 throttle708 self._setThrottle(self.ENGINE_4, value)709 elif offset==0x0a7a: # Engine #4 de-ice710 self.eng4DeIce = value!=0711 697 elif offset==0x0af4: # Fuel weight 712 698 self.fuelWeight = value / 256.0 … … 810 796 elif offset==0x2200: # Engine #3 N1 811 797 self.n1[self.ENGINE_3] = value 812 elif offset==0x2300: # Engine #4 N1813 self.n1[self.ENGINE_4] = value814 798 elif offset==0x2ea0: # Elevator trim 815 799 self.elevatorTrim = value * 180.0 / math.pi … … 1429 1413 self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value, 1430 1414 lambda word: float(word)) 1431 self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value,1432 lambda word: float(word))1433 1415 1434 1416 self._valueHandlers["throttle_1"] = ([(0x088c, "H")], … … 1439 1421 CLI.throttle2pyuipc) 1440 1422 self._valueHandlers["throttle_3"] = ([(0x09bc, "H")], 1441 CLI.pyuipc2throttle,1442 CLI.throttle2pyuipc)1443 self._valueHandlers["throttle_4"] = ([(0x0a54, "H")],1444 1423 CLI.pyuipc2throttle, 1445 1424 CLI.throttle2pyuipc) … … 1511 1490 CLI.bool2str, CLI.str2bool) 1512 1491 self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")], 1513 CLI.bool2str, CLI.str2bool)1514 self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")],1515 1492 CLI.bool2str, CLI.str2bool) 1516 1493 self._valueHandlers["propDeice"] = ([(0x337c, "b")], -
src/mlx/web.py
r443 r401 63 63 "TU3" : const.AIRCRAFT_T134, 64 64 "TU5" : const.AIRCRAFT_T154, 65 "YK4" : const.AIRCRAFT_YK40, 66 "146" : const.AIRCRAFT_B462 } 65 "YK4" : const.AIRCRAFT_YK40 } 67 66 68 67 TYPE2TYPECODE = { const.AIRCRAFT_B736 : "736", … … 81 80 const.AIRCRAFT_T134 : "TU3", 82 81 const.AIRCRAFT_T154 : "TU5", 83 const.AIRCRAFT_YK40 : "YK4", 84 const.AIRCRAFT_B462 : "146" } 82 const.AIRCRAFT_YK40 : "YK4" } 85 83 86 84 @staticmethod … … 117 115 departureTime = readline(f) 118 116 self.departureTime = BookedFlight.getDateTime(date, departureTime) 119 117 120 118 arrivalTime = readline(f) 121 119 self.arrivalTime = BookedFlight.getDateTime(date, arrivalTime) … … 132 130 departureTime = None 133 131 arrivalTime = None 134 132 135 133 line = f.readline() 136 lineNumber = 0 134 lineNumber = 0 137 135 while line: 138 136 lineNumber += 1 139 137 line = line.strip() 140 138 141 139 hashIndex = line.find("#") 142 140 if hashIndex>=0: line = line[:hashIndex] … … 144 142 equalIndex = line.find("=") 145 143 lineOK = equalIndex>0 146 144 147 145 if lineOK: 148 key = line[:equalIndex].strip() 146 key = line[:equalIndex].strip() 149 147 value = line[equalIndex+1:].strip().replace("\:", ":") 150 148 151 149 lineOK = key and value 152 150 … … 198 196 self.aircraftTypeName = \ 199 197 BookedFlight.TYPE2TYPECODE[self.aircraftType] 200 198 201 199 def writeIntoFile(self, f): 202 200 """Write the flight into a file.""" … … 237 235 else: 238 236 raise Exception("Invalid aircraft type code: '" + typeCode + "'") 239 237 240 238 def __repr__(self): 241 239 """Get a representation of the flight.""" … … 250 248 s += ">" 251 249 return s 252 250 253 251 #------------------------------------------------------------------------------ 254 252 … … 281 279 def __repr__(self): 282 280 """Get the representation of the plane object.""" 283 s = "<Plane: %s %s" % (self.tailNumber, 281 s = "<Plane: %s %s" % (self.tailNumber, 284 282 "home" if self.status==const.PLANE_HOME else \ 285 283 "away" if self.status==const.PLANE_AWAY else \ … … 290 288 s += ">" 291 289 return s 292 290 293 291 294 292 #------------------------------------------------------------------------------ … … 325 323 gateNumbers.add(p.gateNumber) 326 324 return gateNumbers 327 325 328 326 def updatePlane(self, tailNumber, status, gateNumber = None): 329 327 """Update the status of the given plane.""" … … 332 330 plane.status = status 333 331 plane.gateNumber = gateNumber 334 332 335 333 def __iter__(self): 336 334 """Get an iterator over the planes.""" 337 335 for plane in self._planes.itervalues(): 338 336 yield plane 339 337 340 338 def __getitem__(self, tailNumber): 341 339 """Get the plane with the given tail number. … … 347 345 """Get the representation of the fleet object.""" 348 346 return self._planes.__repr__() 349 347 350 348 #------------------------------------------------------------------------------ 351 349 … … 373 371 s += ">" 374 372 return s 375 373 376 374 #------------------------------------------------------------------------------ 377 375 … … 391 389 "E" not in attrs or not attrs["E"]: 392 390 return 393 391 394 392 icao = attrs["A"] 395 393 if icao not in self._notams: 396 394 return 397 395 398 396 begin = datetime.datetime.strptime(attrs["B"], "%Y-%m-%d %H:%M:%S") 399 397 400 398 c = attrs["C"] if "C" in attrs else None 401 399 end = datetime.datetime.strptime(c, "%Y-%m-%d %H:%M:%S") if c else None 402 400 403 401 permanent = attrs["C_flag"]=="PERM" if "C_flag" in attrs else False 404 402 405 403 repeatCycle = attrs["D"] if "D" in attrs else None 406 404 … … 475 473 """A login request.""" 476 474 iso88592decoder = codecs.getdecoder("iso-8859-2") 477 475 478 476 def __init__(self, callback, pilotID, password, entranceExam): 479 477 """Construct the login request with the given pilot ID and … … 490 488 md5.update(self._pilotID) 491 489 pilotID = md5.hexdigest() 492 490 493 491 md5 = hashlib.md5() 494 492 md5.update(self._password) … … 526 524 result.pilotName = self.iso88592decoder(readline(f))[0] 527 525 result.exams = readline(f) 528 526 529 527 while True: 530 528 line = readline(f) … … 542 540 543 541 return result 544 542 545 543 #------------------------------------------------------------------------------ 546 544 547 545 class GetFleet(Request): 548 546 """Request to get the fleet from the website.""" 549 547 550 548 def __init__(self, callback): 551 549 """Construct the fleet request.""" … … 560 558 result.fleet = Fleet(f) 561 559 f.close() 562 560 563 561 return result 564 562 … … 587 585 ("status", status), 588 586 ("kapu", gateNumber)]) 589 587 590 588 f = urllib2.urlopen(url, data, timeout = 10.0) 591 589 line = readline(f) 592 590 593 591 result = Result() 594 592 result.success = line == "OK" 595 593 596 594 return result 597 595 598 596 #------------------------------------------------------------------------------ 599 597 … … 630 628 631 629 class 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.""" 633 631 634 632 def __init__(self, callback, airports): … … 641 639 url = "http://www.aviationweather.gov/adds/dataserver_current/httpparam?" 642 640 data = urllib.urlencode([ ("dataSource" , "metars"), 643 ("requestType", "retrieve"), 641 ("requestType", "retrieve"), 644 642 ("format", "csv"), 645 643 ("stationString", " ".join(self._airports)), … … 654 652 if len(line)>5 and line[4]==' ': 655 653 icao = line[0:4] 656 if icao in self._airports: 654 if icao in self._airports: 657 655 result.metars[icao] = line.strip().split(",")[0] 658 656 finally: … … 698 696 data["bag"] = str(pirep.bagWeight) 699 697 data["mail"] = str(pirep.mailWeight) 700 698 701 699 data["flttype"] = SendPIREP._flightTypes[pirep.flightType] 702 700 data["onoff"] = "1" if pirep.online else "0" … … 744 742 f.close() 745 743 746 return result 744 return result 747 745 #------------------------------------------------------------------------------ 748 746 … … 759 757 """Perform the sending of the ACARS.""" 760 758 print "Sending the online ACARS" 761 759 762 760 url = "http://www.virtualairlines.hu/acars2/acarsonline.php" 763 761 … … 768 766 data["pid"] = acars.pid 769 767 data["pilot"] = SendACARS._latin2Encoder(acars.pilotName)[0] 770 768 771 769 data["pass"] = str(bookedFlight.numPassengers) 772 770 data["callsign"] = bookedFlight.callsign 773 771 data["airplane"] = bookedFlight.aircraftTypeName 774 772 data["from"] = bookedFlight.departureICAO 775 data["to"] = bookedFlight.arrivalICAO 773 data["to"] = bookedFlight.arrivalICAO 776 774 data["lajstrom"] = bookedFlight.tailNumber 777 775 … … 781 779 data["altitude"] = str(acars.state.altitude) 782 780 data["speed"] = str(acars.state.groundSpeed) 783 781 784 782 data["event"] = acars.getEventText() 785 783 … … 790 788 f.close() 791 789 792 return result 790 return result 793 791 794 792 #------------------------------------------------------------------------------ … … 815 813 """Enqueue a fleet retrieval request.""" 816 814 self._addRequest(GetFleet(callback)) 817 815 818 816 def updatePlane(self, callback, tailNumber, status, gateNumber = None): 819 """Update the status of the given plane.""" 817 """Update the status of the given plane.""" 820 818 self._addRequest(UpdatePlane(callback, tailNumber, status, gateNumber)) 821 819 … … 823 821 """Get the NOTAMs for the given two airports.""" 824 822 self._addRequest(GetNOTAMs(callback, departureICAO, arrivalICAO)) 825 823 826 824 def getMETARs(self, callback, airports): 827 825 """Get the METARs for the given airports.""" … … 835 833 """Send the given ACARS""" 836 834 self._addRequest(SendACARS(callback, acars)) 837 835 838 836 def run(self): 839 837 """Process the requests.""" … … 846 844 847 845 request.perform() 848 846 849 847 def _addRequest(self, request): 850 848 """Add the given request to the queue.""" … … 857 855 if __name__ == "__main__": 858 856 import time 859 857 860 858 def callback(returned, result): 861 859 print returned, unicode(result) 862 860 863 861 handler = Handler() 864 862 handler.start() … … 868 866 # Plane: HA-LEG home (gate 67) 869 867 #handler.updatePlane(callback, "HA-LQC", const.PLANE_AWAY, "72") 870 #time.sleep(3) 868 #time.sleep(3) 871 869 #handler.getFleet(callback) 872 870 #time.sleep(3) … … 875 873 #handler.getMETARs(callback, ["LHBP", "EPWA"]) 876 874 #time.sleep(5) 877 875 878 876 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.