mirror of
https://github.com/brmlab/acarsdec.git
synced 2025-08-01 21:53:38 +02:00
Mod for translation aircrafts, message labels
Data for translation stored in acars_*.h After data manipulation you need to make again
This commit is contained in:
parent
8223d9e9c8
commit
98451c2315
4 changed files with 46076 additions and 6 deletions
22969
acars_aircrafts.h
Normal file
22969
acars_aircrafts.h
Normal file
File diff suppressed because it is too large
Load diff
22969
acars_aircrafts_dot.h
Normal file
22969
acars_aircrafts_dot.h
Normal file
File diff suppressed because it is too large
Load diff
91
acars_labels.h
Normal file
91
acars_labels.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
const char * acars_labels[][2]={
|
||||
{"_j", "No info to transmit. Polled mode 1"},
|
||||
{"_DEL", "General response, Demand mode; no"},
|
||||
{" ", "information to transmit1"},
|
||||
{"00", "Emergency situation report"},
|
||||
{"2S", "Weather request"},
|
||||
{"2U", "Weather"},
|
||||
{"4M", "Cargo information"},
|
||||
{"51", "Ground GMT request response"},
|
||||
{"52", "Ground UTC request"},
|
||||
{"54", "Aircrew initiated voice contact request"},
|
||||
{"57", "Alternate aircrew initiated posit. rpt."},
|
||||
{"5D", "ATIS request"},
|
||||
{"5P", "Temporary suspension of ACARS"},
|
||||
{"5R", "Aircraft initiated position report"},
|
||||
{"5U", "Weather request"},
|
||||
{"5Y", "Revision to previous ETA"},
|
||||
{"5Z", "Airline designated downlink"},
|
||||
{"7A", "Aircraft initiated engine data"},
|
||||
{"7B", "Aircraft initiated misc.message"},
|
||||
{"80", "Aircraft addressed downlinks"},
|
||||
{"81", "Aircraft addressed downlinks"},
|
||||
{"82", "Aircraft addressed downlinks"},
|
||||
{"83", "Aircraft addressed downlinks"},
|
||||
{"84", "Aircraft addressed downlinks"},
|
||||
{"85", "Aircraft addressed downlinks"},
|
||||
{"86", "Aircraft addressed downlinks"},
|
||||
{"87", "Aircraft addressed downlinks"},
|
||||
{"88", "Aircraft addressed downlinks"},
|
||||
{"89", "Aircraft addressed downlinks"},
|
||||
{"A1", "Deliver oceanic clearance"},
|
||||
{"A2", "Deliver departure clearance"},
|
||||
{"A4", "Acknowledge PDC"},
|
||||
{"A5", "Request position report"},
|
||||
{"A6", "Request ADS report"},
|
||||
{"A7", "Forward free text to aircraft"},
|
||||
{"A8", "Deliver departure slot"},
|
||||
{"A9", "Deliver ATIS information"},
|
||||
{"A0", "ATIS Facilities notification"},
|
||||
{"B1", "Request oceanic clearance"},
|
||||
{"B2", "Request oceanic readback"},
|
||||
{"B3", "Request departure clearance"},
|
||||
{"B4", "Ackn. departure clearance"},
|
||||
{"B5", "Provide position report"},
|
||||
{"B6", "Provide ADS report"},
|
||||
{"B7", "Forward free text to ATS"},
|
||||
{"B8", "Request departure slot"},
|
||||
{"B9", "Request ATIS information"},
|
||||
{"C0", "Uplink msg. to all cockpit printers"},
|
||||
{"C1", "Uplink msg. to cockpit printer #1"},
|
||||
{"C2", "Uplink msg. to cockpit printer #2"},
|
||||
{"C3", "Uplink msg. to cockpit printer #3"},
|
||||
{"CA", "Printer status = error"},
|
||||
{"CB", "Printer status = busy"},
|
||||
{"CC", "Printer status = local"},
|
||||
{"CD", "Printer status = no paper"},
|
||||
{"CE", "Printer status = buffer overrun"},
|
||||
{"CF", "Printer status = reserved"},
|
||||
{"F3", "Dedicated transceiver advisory"},
|
||||
{"H1", "Message to/from terminal"},
|
||||
{"HX", "Undelivered uplink report"},
|
||||
{"M1", "IATA Departure message"},
|
||||
{"M2", "IATA Arrival message"},
|
||||
{"M3", "IATA Return to ramp message"},
|
||||
{"M4", "IATA Return from airborne message"},
|
||||
{"Q0", "ACARS link test"},
|
||||
{"Q1", "ETA Departure/arrival reports"},
|
||||
{"Q2", "ETA reports"},
|
||||
{"Q3", "Clock update"},
|
||||
{"Q4", "Voice circuit busy (response to 54)"},
|
||||
{"Q5", "Unable to process uplinked messages"},
|
||||
{"Q6", "Voice-to-ACARS change-over."},
|
||||
{"Q7", "Delay message"},
|
||||
{"QA", "Out/fuel report"},
|
||||
{"QB", "Off report"},
|
||||
{"QC", "On report"},
|
||||
{"QD", "In/fuel report"},
|
||||
{"QE", "Out/fuel destination report"},
|
||||
{"QF", "Off/destination report"},
|
||||
{"QG", "Out/return in report"},
|
||||
{"QH", "Out report"},
|
||||
{"QK", "Landing report"},
|
||||
{"QL", "Arrival report"},
|
||||
{"QM", "Arrival information report"},
|
||||
{"QN", "Diversion report"},
|
||||
{"QX", "Intercept"},
|
||||
{"RA", "Command aircraft term. to transmit data"},
|
||||
{"RB", "Response of aircraft terminal to RA msg."},
|
||||
{":;", "Command aircraft xcvr to change freq."},
|
||||
{0, 0}
|
||||
};
|
53
main.c
53
main.c
|
@ -26,9 +26,14 @@
|
|||
|
||||
#include "version.h"
|
||||
#include "acarsdec.h"
|
||||
#include "acars_labels.h"
|
||||
#include "acars_aircrafts.h"
|
||||
#include "acars_aircrafts_dot.h"
|
||||
|
||||
int posconv(char *txt, unsigned char *label, char *pos);
|
||||
extern int optind, opterr;
|
||||
extern char *optarg;
|
||||
long rx_idx;
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
|
@ -47,14 +52,50 @@ void print_mesg(msg_t * msg)
|
|||
struct tm *tmp;
|
||||
char pos[128];
|
||||
|
||||
printf("ACARS mode: %c", msg->mode);
|
||||
printf(" Aircraft reg: %s\n", msg->addr);
|
||||
printf("Message label: %s", msg->label);
|
||||
printf(" Block id: %d", (int) msg->bid);
|
||||
printf(" Msg. no: %s\n", msg->no);
|
||||
printf("Flight id: %s\n", msg->fid);
|
||||
long i=0;
|
||||
|
||||
printf("RX_IDX: %ld\n", rx_idx);
|
||||
printf("ACARS mode: %c, ", msg->mode);
|
||||
printf("message label: %s\n", msg->label);
|
||||
while(acars_labels[i][0]){
|
||||
if(!strcmp(acars_labels[i][0],(const char*)msg->label)){
|
||||
printf("ACARS ML description: %s\n",acars_labels[i][1]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
printf("Aircraft reg: %s, ", msg->addr);
|
||||
printf("flight id: %s\n", msg->fid);
|
||||
i=0;
|
||||
while(acars_aircrafts[i][0]){
|
||||
if(!strcmp(acars_aircrafts[i][0],(const char*)msg->addr)){
|
||||
printf("Aircraft type: %s, ",acars_aircrafts[i][2]);
|
||||
printf("carrier: %s, ",acars_aircrafts[i][1]);
|
||||
printf("cn: %s\n",acars_aircrafts[i][3]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
i=0;
|
||||
while(acars_aircrafts_dot[i][0]){
|
||||
if(!strcmp(acars_aircrafts_dot[i][0],(const char*)msg->addr)){
|
||||
printf("Aircraft type: %s, ",acars_aircrafts_dot[i][2]);
|
||||
printf("carrier: %s, ",acars_aircrafts_dot[i][1]);
|
||||
printf("cn: %s\n",acars_aircrafts_dot[i][3]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
printf("Block id: %d, ", (int) msg->bid);
|
||||
printf(" msg. no: %s\n", msg->no);
|
||||
printf("Message content:-\n%s", msg->txt);
|
||||
|
||||
rx_idx++;
|
||||
|
||||
if (posconv(msg->txt, msg->label, pos)==0)
|
||||
printf("\nAPRS : Addr:%s Fid:%s Lbl:%s pos:%s\n", msg->addr, msg->fid,msg->label,pos);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue