-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexpn.py
433 lines (425 loc) · 15.6 KB
/
expn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
# Explanations of various codes found in an ACARS message compiled from
# various sources around the net...
# http://acarsonline.pbworks.com/w/page/1286730/Message%20Labels
# https://github.com/brmlab/acarsdec/blob/master/datasets/acars_mls.txt
# https://raw.githubusercontent.com/gat3way/rtl_acars_ng/master/datasets/acars_mls.txt
# http://www.cosmic.com.au/acarsanalyser/v3/datares/MsgLabelsData.asp
arinc620 = {
'00': ['Emergency SitRep', 'Hijack Situation Report'],
'10': ['British Airways ARR (ETA) Report', 'American Airlines/Eagle Frequency Change', 'Fedex ATIS Request Message', 'British Airways FST Report'],
'11': ['Inrange Arrival Report', 'Fedex In Range Arrival Report'],
'13': ['CMU loadsheet uplink'],
'14': ['General Aviation Free Text'],
'15': ['General Aviation Position Report'],
'16': ['Fedex Position Report-AUTPOS', 'General Aviation Weather Request'],
'17': ['Northwest Airlines Position/Weather Report'],
'18': ['General aviation weather report'],
'19': ['ATIS report'],
'1C': ['Flight plan request'],
'1L': ['Atlantic Coast Airlines/United Express QF OFF message'],
'1M': ['Estimated Time of Arrival report'],
'20': ['SAS Initialization'],
'21': ['SAS Takeoff Data calculation'],
'23': ['SAS Loadsheet Uplink'],
'24': ['Northwest Airlines Position/Weather Request'],
'25': ['SAS Special Load Notification'],
'26': ['SAS SIGMET message'],
'27': ['SA Weather Request'],
'28': ['Weather Request'],
'29': ['SAS Flow Message'],
'2S': ['Weather Request'],
'2U': ['Weather'],
'30': ['UPS Position Report'],
'31': ['Northwest Airlines Weather Report'],
'36': ['Northwest Airlines In Range Message'],
'39': ['Northwest Airlines arrival/free text message'],
'3F': ['UPS ETA Downlink Message'],
'3G': ['UPS Free Text Message Format'],
'3J': ['UPS Downlink Message'],
'3S': ['UPS Downlink Message'],
'3U': ['UPS Uplink acknowledgement'],
'41': ['SAS Flow Message'],
'46': ['Pirep'],
'47': ['747-400 Airway Position Downlink'],
'48': ['Misc Msgs'],
'49': ['Air Canada Status Reports'],
'4A': ['Air Canada latest new format'],
'4M': ['Cargo Info', 'Air Canada Uplink to Cockpit Printer-specific message'],
'4P': ['Weather report/forecast'],
'4Q': ['Air Canada departure format'],
'4R': ['OFF Air Canada-Specific Message Format'],
'4S': ['Weather Request'],
'4T': ['ETA Report'],
'4X': ['Air Canada Frequency List'],
'50': ['Possible HFDL Msg router'],
'51': ['Ground GMT Request/Update'],
'52': ['Ground UTC Request/Update'],
'53': ['Reserved Spare'],
'54': ['ACARS Frequency Uplink', 'Aircrew Initiated Voice Contact Request', 'Voice Go-Ahead'],
'57': ['Alternate Aircrew Initiated Position Report'],
'58': ['Aircraft Tracking Control', 'Aircraft Tracking Periodic Position Report'],
'5D': ['ATIS Request'],
'5P': ['Temporary Suspension of ACARS Service (reponse to Q6)'],
'5R': ['Aircraft initiated position report'],
'5U': ['Downlink Weather Request'],
'5V': ['VDL Switch Advisory'],
'5Y': ['ETA Revision', 'Diversion'],
'5Z': ['Airline designated downlink'],
'7A': ['Aircraft Initiated Engine Data', 'Takeoff Thrust Report'],
'7B': ['Misc Aircrew Initiated Msgs'],
'80': ['Delta/Canadian specific 3C03 position report format', 'Airline Defined'],
'81': ['Airline Defined'],
'82': ['Airline Defined'],
'83': ['Airline Defined'],
'84': ['S.A.S. Free Text Message', 'Airline Defined'],
'85': ['Airline Defined'],
'86': ['Airline Defined'],
'87': ['Airline Defined'],
'88': ['Airline Defined'],
'89': ['Airline Defined'],
'8A': ['SAS Out report'],
'8B': ['SAS Off report'],
'8C': ['SAS On report'],
'8D': ['SAS In report'],
'8E': ['SAS Out/return in report'],
'8G': ['SAS Take off data calculation request'],
'8H': ['SAS Loadsheet request/confirmation'],
'8I': ['SAS Flightplan request'],
'8J': ['SAS Crewlist request'],
'8X': ['Uplink ATIS Information'],
'8Z': ['Avionics unable to process data'],
'99': ['Emergency Situation Report'],
':;': ['Command Acft Xcvr change freq'],
'::': ['Reserved'],
':}': ['POA to AOA Retune'],
'A0': ['ATIS Facilities Notification'],
'A1': ['Deliver Oceanic Clearance'],
'A2': ['Unassigned'],
'A3': ['Deliver Departure Clearance'],
'A4': ['Acknowledge Departure Clearance'],
'A5': ['Request Position Report'],
'A6': ['Request ADS Report'],
'A7': ['Forward Free Text to Aircraft'],
'A8': ['Deliver Departure Slot'],
'A9': ['Deliver ATIS Information'],
'AA': ['ATC Communications'],
'AB': ['Terminal Weather Information for Pilots'],
'AC': ['Pushback Clearance Uplink'],
'AD': ['Expected Taxi Clearance'],
'AE': ['Unassigned'],
'AF': ['CPC Command Response'],
'AG': ['Unassigned'],
'AW': ['ATS Wind Data'],
'B0': ['ATS Facility Notification'],
'B1': ['Flight Plan Oceanic Clearance Request'],
'B2': ['Oceanic Clearance Readback'],
'B3': ['Request Departure Clearance'],
'B4': ['Acknowledge Departure Clearance'],
'B5': ['Provide Position Report'],
'B6': ['Provide ADS Report'],
'B7': ['Forward Free Text to ADS'],
'B8': ['Request Departure Slot'],
'B9': ['Request ATIS information', 'Flight Plan Information Receipt'],
'BA': ['ATC Communications'],
'BB': ['Terminal Weather Information for Pilots'],
'BC': ['Pushback Clearance Request'],
'BD': ['Expected Taxi Clearance Request'],
'BE': ['CPC Log-on/Log-off Request'],
'BF': ['CPC Wilco'],
'BG': ['Unassigned'],
'BW': ['ATS Wind Response'],
'C#': ['Message to Cockpit Printer #'],
'C0': ['Uplink message to all printers'],
'C1': ['Uplink message to printer 1'],
'C2': ['Uplink message to printer 2'],
'C3': ['Uplink message to printer 3'],
'CA': ['Printer Error'],
'CB': ['Printer Busy'],
'CC': ['Printer Local', 'Printer in Test Mode'],
'CD': ['Printer out of Paper', 'Printer No Paper'],
'CE': ['Printer Buffer Overrun'],
'CF': ['Printer Reserved Status'],
'DL': ['Reserved for Data Loading'],
'D' : ['De-Icing Downlinks'],
'DI': ['De-Icing Uplinks'],
'EI': ['Internet Email Message'],
'E1': ['Internet Email Message'],
'E2': ['Internet'],
'EL': ['Engine Monitoring Unit Message Downlink'],
'ER': ['Engine Monitoring Unit Message Downlink'],
'F3': ['Dedicated Transceiver Advisory'],
'H1': ['Message to/from terminal', 'Messages from Avionic Subsystem', 'OAT', 'OAX'],
'H2': ['Meteorological Report'],
'H3': ['Icing Report'],
'H4': ['Meteorological Report Configuration Downlink'],
'HF': ['HF Report'],
'HX': ['Undelivered Uplink report'],
'KB': ['Loopback Request/Response'],
'LB': ['Cabin E-Logbook'],
'LC': ['Cabin E-Logbook'],
'LS': ['Technical (Cockpit) E-Logbook'],
'LT': ['Technical (Cockpit) E-Logbook'],
'M1': ['IATA Departure Msg', 'IATA Departure Message'],
'M2': ['IATA Arrival Msg', 'USR', 'User Defined Message'],
'M3': ['IATA Return to Ramp Message'],
'M4': ['IATA Return from Airborne Message'],
'P0': ['AMS-Protected Downlink Message, Test System Destination'],
'P6': ['Unassigned'],
'P7': ['AMS-Protected Uplink ATS Message'],
'P8': ['AMS-Protected Uplink AMS-Specific Message'],
'P9': ['AMS-Protected Uplink AOC Message'],
'PA': ['AMS-Protected Downlink ATS Message'],
'PB': ['AMS-Protected Downlink AMS-Specific Message'],
'PC': ['AMS-Protected Downlink AOC Message'],
'Q0': ['ACARS Link Test'],
'Q1': ['ETA Departure/Arrival Report'],
'Q2': ['ETA Report'],
'Q3': ['GMT Clock Update'],
'Q4': ['Voice Circuit Busy - Reply to 54'],
'Q5': ['Unable to process uplinked messages'],
'Q6': ['Voice-to-ACARS change over-Joining ACARS'],
'Q7': ['Delay message'],
'Q8': ['Reserved'],
'Q9': ['Reserved'],
'QA': ['Out/fuel report', 'Departure Report'],
'QB': ['Off report'],
'QC': ['On Report'],
'QD': ['Arrival Report / In Fuel'],
'QE': ['Out/fuel destination report'],
'QF': ['OFF (Off/destination report) / Out Fuel'],
'QG': ['Returning to Gate Report'],
'QH': ['Out Report'],
'QK': ['Landing report'],
'QL': ['Arrival Report'],
'QM': ['Arrival Info Report'],
'QN': ['Diversion Report'],
'QP': ['OUT report'],
'QQ': ['OFF report'],
'QR': ['ON report'],
'QS': ['IN report'],
'QT': ['OUT/Return IN report'],
'QU': ['Unassigned'],
'QV': ['Autotune Reject'],
'QW': ['Unassigned'],
'QX': ['Intercept, airborne subsystem unable to process'],
'QY': ['Unassigned'],
'QZ': ['Unassigned'],
'RA': ['Command Acft terminal to TX data'],
'RB': ['Response of aircraft terminal to RA uplink message'],
'RE': ['Refuel'],
'S1': ['VHF Network Statistics Report'],
'S2': ['VHF Performance Report'],
'S3': ['LRU Configuration Report'],
'SA': ['Media Advisory'],
'SQ': ['Uplink Squitter'],
'UP': ['Message Acknowledgement'],
'WP': ['Potable Water Remote Pre-selection'],
'_D': ['General Response'],
'_J': ['No info to TX'],
}
# Label '5Z' is airline-defined. United Airlines seems to put a
# code at the beginning of the text
united_5z = {
'/10': 'PIREP',
'/AI': 'Auto Init',
'/B1': 'Request Weight and Balance',
'/B3': 'Request Runway Data',
'/B6': 'Runway Data Resp',
'/C11': 'International PIREP',
'/C3': 'Off message',
'/C4': 'Flight dispatch',
'/C5': 'Maintenance Message',
'/C6': 'Customer Service',
'/CD': 'Weight and Balance',
'/CG': 'Request Pre-departure clearance (PDC)',
'/CM': 'Crew Scheduling',
'/CS': 'Customer Service',
'/D3': 'Holding pattern message',
'/D6': 'From-to +date',
'/D7': 'From-to+Alternate+Time',
'/DS': 'Late message',
'/EO': 'In range',
'/ET': 'Expire Time',
'/M4': 'Request Maintenance Required Determination',
'/PB': 'Request Crew List',
'/PN': 'Problem Note?',
'/PW': 'Position weather',
'/R3': 'Request howgozit message',
'/R4': 'Request the latest POSBD',
'/RL': 'Request Release',
'/TC': 'From-to-fuel',
'/W1': 'Request weather - City',
'/WB': 'From-to',
'/71': 'Maintenance Issues',
}
abbrevs = {
'ADNS': 'ARINC Data Network Service',
'AL': 'Flight Level',
'AML': 'Aircraft Maintenace Log',
'AO': 'Pax Cnt in zone A (FC)',
'APRCH': 'Approach',
'ARINC': 'Aeronautical Radio Inc.',
'ATIS': 'Automatic Terminal Information Service',
'CFDIU': 'Combined Flight Data Indicator Unit',
'CG': 'Center of Gravity',
'CI': 'Cost Index',
'CL': 'Cruise Level',
'CR': 'Company Route',
'CW': 'Cruise wind',
'CZ': 'Cruise speed',
'DA': 'Departure Aerodrome',
'DFDAU': 'Digital Flight Data Acquisition Unit',
'DG': 'Drag factor',
'DP': 'Dew point',
'DS': 'Destination Station',
'DX': 'Long Distance',
'EO': 'Estimated Time Over',
'ET': 'Estimated Time',
'FB': 'Amount of fuel boarded',
'FC': 'Estimated further clearance',
'FD': 'Fuel over destination',
'FDR': 'Flight Data Recorder',
'FF': 'Fuel flow factor (lb/hr)',
'FI': 'Flight Identification',
'FL': 'Flight Level',
'FMC': 'Flight Management Computer',
'FO': 'First Officer',
'FOB': 'Fuel On Board',
'FQY': 'Frequency',
'FR': 'Fault Report Prefix',
'FRM': 'Maintenance codes',
'FX': 'En Route Fix',
'GL': 'Geographical Location',
'HD': 'Aircraft Heading',
'IC': 'Aircraft Icing',
'IN': 'Time In',
'IR': 'In VHF range and Instrument Rated',
'LA': 'Identification of officer landing aircraft',
'LT': 'Light',
'MA': 'Message Assurance',
'MN': 'Maintenance',
'MRD': "Maintenance Requirements Determination",
'MT': 'Maximum takeoff power computation',
'MU': 'Management Unit',
'N1': 'Speed of Turbine 1',
'N2': 'Speed of Turbine 2',
'NA': 'Navigation Aid',
'NL': 'Number of Landings',
'NON-FDE': 'Non-critical Faults, Aircraft is Airworthy',
'NP': 'Next report point',
'OA': 'Pax Cnt in zone A (FC)',
'OB': 'Pax Cnt in zone B (Biz)',
'OC': 'Pax Cnt in zone C (Econ)',
'OF': 'Time off',
'ON': 'Time on',
'OP': 'Oil Pressure',
'OS': 'Other supplementary information',
'OT': 'Time out',
'OT': 'Time out',
'OV': 'Present Location',
'PB': 'Persons onboard',
'PD': 'Point of Departure',
'PIREP': "Pilot's Report",
'PLTOKL': 'Internal Addressing within Computer System',
'PW': 'Position Weather',
'QN': 'Altimeter Settings',
'RD': 'Departure Runway',
'RF': 'Request Flight Level',
'RGS': 'Remote Ground Station',
'RI': 'Return In Time',
'RL': 'Request Cruising Level',
'RM': 'Remarks',
'RO': 'Return On Time',
'RQ': 'Request',
'RT': 'Route Information',
'SA': 'Alternative Aerodrome',
'SI': 'Special communication addressing instruction',
'SK': 'Sky Conditions',
'SL': 'SELCAL code',
'SP': 'Significant Point',
'ST': 'Standard Takeoff Power',
'TA': 'Static Air Temperature',
'TB': 'Turbulence',
'TD': 'Takeoff Temperature',
'TEI': 'Text Element Identifiers',
'TE': 'Time En Route',
'TM': 'Surface Air Temperature',
'TO': 'Time Over',
'TP': 'Transmission Path',
'TRIM': 'Required Compensation of MAC',
'V1': 'Velocity 1',
'V2': 'Velocity 2',
'VR': 'Rotate',
'VR': 'Runway Visual Range',
'WCHR': 'Wheelchair',
'WL': 'Weather',
'WP': 'Waypoint',
'WR': 'Warning',
'WV': 'Wind Information',
'WXRQ': 'Weather Request',
'WX': 'Weather',
'XPDR': 'Transponder',
'ZW': 'Zero Fuel Weight',
}
h1types = {
"A0": "ATS Facility Notification (AFN)",
"A1": "Oceanic Clearance",
"A2": "Unassigned",
"A3": "Departure Clearance Response",
"A4": "Flight Systems Message",
"A5": "Assigned",
"A6": "Request ADS Reports",
"A7": "Free Text",
"A8": "Deliver Departure Slot",
"A9": "ATIS report",
"AA": "ATCComm",
"AB": "TWIP Report",
"AC": "Pushback Clearance",
"AD": "Expected Taxi Clearance",
"AE": "Unassigned",
"AF": "CPC Command/Response",
"B0": "ATS Facility Notification",
"B1": "Request Oceanic Clearance",
"B2": "Oceanic Clearance Readback",
"B3": "Request Departure Clearance",
"B4": "Departure Clearance Readback",
"B5": "Reserved",
"B6": "Provide ADS Report",
"B7": "Free Text",
"B8": "Request Departure Slot",
"B9": "Request ATIS Report",
"BA": "ATCComm",
"BB": "Request TWIP Report",
"BC": "Pushback Clearance Request",
"BD": "Expected Taxi Clearance Request",
"BE": "CPC Aircraft Log-On/Off Request",
"BF": "CPC WILCO/UNABLE Response",
"CF": "Central Fault Display",
"DF": "Digital Flight Data Acquisition Unit",
"EC": "Engine Display System",
"EI": "Engine Report",
"H1": "HF Data Radio - Left",
"H2": "HF Data Radio - Right",
"H3": "Icing Report",
"HD": "HF Data Radio - Selected",
"M1": "Flight Management Computer - Left",
"M2": "Flight Management Computer - Right",
"M3": "Flight Management Computer - Center",
"MD": "Flight Management Computer - Selected",
"PS": "Keyboard/Display Unit",
"S1": "SDU - Left",
"S2": "SDU - Right",
"SD": "SDU - Selected",
"T0": "Cabin Terminal Message (Undefined)",
"T1": "Cabin Terminal Messages",
"T2": "Cabin Terminal Messages",
"T3": "Cabin Terminal Messages",
"T4": "Cabin Terminal Messages",
"T5": "Cabin Terminal Messages",
"T6": "Cabin Terminal Messages",
"T7": "Cabin Terminal Messages",
"T8": "Cabin Terminal Messages",
"WO": "Weather Observation Report"
}