Skip to content

Commit c8410c5

Browse files
author
Dan Geabunea
committed
Fixed printing of Cat-004 decoding report; Now it displayes all items, not just items present in the last message;
1 parent 487c61e commit c8410c5

File tree

2 files changed

+137
-80
lines changed

2 files changed

+137
-80
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>jlg-consulting</groupId>
77
<artifactId>jade</artifactId>
8-
<version>0.9.31</version>
8+
<version>0.9.32</version>
99
<packaging>jar</packaging>
1010

1111
<name>jade</name>

src/main/java/jlg/jade/asterix/counters/Cat004ItemCounter.java

Lines changed: 136 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ private void increment(Cat004Record record) {
119119
if (!record.getItem010().isValid()) {
120120
this.item010Invalid = this.item010Invalid + 1;
121121
}
122-
appendItemCounterMsg(
123-
"Item 010 - Data source identifier",
124-
item010Present,
125-
item010Invalid);
126122
}
127123

128124
//increment counters for item 000
@@ -131,10 +127,7 @@ private void increment(Cat004Record record) {
131127
if (!record.getItem000().isValid()) {
132128
this.item000Invalid = this.item000Invalid + 1;
133129
}
134-
appendItemCounterMsg(
135-
"Item 000 - Message Type",
136-
item000Present,
137-
item000Invalid);
130+
138131

139132
switch (record.getItem000().getMessageType()) {
140133
case (Cat004MessageType.STCA):
@@ -160,11 +153,6 @@ private void increment(Cat004Record record) {
160153
break;
161154
}
162155
}
163-
appendItemCounterMsg(" ALIVE", nbAliveMessages, 0);
164-
appendItemCounterMsg(" STCA", nbStcaMessages, 0);
165-
appendItemCounterMsg(" APW", nbApwMessages, 0);
166-
appendItemCounterMsg(" MSAW", nbMsawMessages, 0);
167-
appendItemCounterMsg(" EOC", nbEocMessages, 0);
168156
}
169157

170158
//increment counters for item 015
@@ -173,10 +161,6 @@ private void increment(Cat004Record record) {
173161
if (!record.getItem015().isValid()) {
174162
this.item015Invalid = this.item015Invalid + 1;
175163
}
176-
appendItemCounterMsg(
177-
"Item 015 - SDPS Identifier (Skipped)",
178-
item015Present,
179-
item015Invalid);
180164
}
181165

182166
//increment counters for item 020
@@ -185,10 +169,6 @@ private void increment(Cat004Record record) {
185169
if (!record.getItem020().isValid()) {
186170
this.item020Invalid = this.item020Invalid + 1;
187171
}
188-
appendItemCounterMsg(
189-
"Item 020 - Time of Message",
190-
item020Present,
191-
item020Invalid);
192172
}
193173

194174
//increment counters for item 040
@@ -197,10 +177,6 @@ private void increment(Cat004Record record) {
197177
if (!record.getItem040().isValid()) {
198178
this.item040Invalid = this.item040Invalid + 1;
199179
}
200-
appendItemCounterMsg(
201-
"Item 040 - Alert Identifier",
202-
item040Present,
203-
item040Invalid);
204180
}
205181

206182
//increment counters for item 045
@@ -209,10 +185,6 @@ private void increment(Cat004Record record) {
209185
if (!record.getItem045().isValid()) {
210186
this.item045Invalid = this.item045Invalid + 1;
211187
}
212-
appendItemCounterMsg(
213-
"Item 045 - Alert Status",
214-
item045Present,
215-
item045Invalid);
216188
}
217189

218190
//increment counters for item 060
@@ -221,10 +193,7 @@ private void increment(Cat004Record record) {
221193
if (!record.getItem060().isValid()) {
222194
this.item060Invalid = this.item060Invalid + 1;
223195
}
224-
appendItemCounterMsg(
225-
"Item 060 - Safety Net Function and Status (Skipped)",
226-
item060Present,
227-
item060Invalid);
196+
228197
}
229198

230199
//increment counters for item 030
@@ -233,10 +202,6 @@ private void increment(Cat004Record record) {
233202
if (!record.getItem030().isValid()) {
234203
this.item030Invalid = this.item030Invalid + 1;
235204
}
236-
appendItemCounterMsg(
237-
"Item 030 - Track Number 1",
238-
item030Present,
239-
item030Invalid);
240205
}
241206

242207
//increment counters for item 170
@@ -245,10 +210,6 @@ private void increment(Cat004Record record) {
245210
if (!record.getItem170().isValid()) {
246211
this.item170Invalid = this.item170Invalid + 1;
247212
}
248-
appendItemCounterMsg(
249-
"Item 170 - Aircraft Characteristics 1",
250-
item170Present,
251-
item170Invalid);
252213
}
253214

254215
//increment counters for item 120
@@ -257,10 +218,7 @@ private void increment(Cat004Record record) {
257218
if (!record.getItem120().isValid()) {
258219
this.item120Invalid = this.item120Invalid + 1;
259220
}
260-
appendItemCounterMsg(
261-
"Item 120 - Conflict Characteristics",
262-
item120Present,
263-
item120Invalid);
221+
264222
}
265223

266224
//increment counters for item 070
@@ -269,10 +227,7 @@ private void increment(Cat004Record record) {
269227
if (!record.getItem070().isValid()) {
270228
this.item070Invalid = this.item070Invalid + 1;
271229
}
272-
appendItemCounterMsg(
273-
"Item 070 - Conflict Timing and Separation",
274-
item070Present,
275-
item070Invalid);
230+
276231
}
277232

278233
//increment counters for item 076
@@ -281,10 +236,7 @@ private void increment(Cat004Record record) {
281236
if (!record.getItem076().isValid()) {
282237
this.item076Invalid = this.item076Invalid + 1;
283238
}
284-
appendItemCounterMsg(
285-
"Item 076 - Vertical Deviation",
286-
item076Present,
287-
item076Invalid);
239+
288240
}
289241

290242
//increment counters for item 074
@@ -293,10 +245,7 @@ private void increment(Cat004Record record) {
293245
if (!record.getItem074().isValid()) {
294246
this.item074Invalid = this.item074Invalid + 1;
295247
}
296-
appendItemCounterMsg(
297-
"Item 074 - Longitudinal Deviation",
298-
item074Present,
299-
item074Invalid);
248+
300249
}
301250

302251
//increment counters for item 075
@@ -305,10 +254,7 @@ private void increment(Cat004Record record) {
305254
if (!record.getItem075().isValid()) {
306255
this.item075Invalid = this.item075Invalid + 1;
307256
}
308-
appendItemCounterMsg(
309-
"Item 075 - Transversal Distance Deviation",
310-
item075Present,
311-
item075Invalid);
257+
312258
}
313259

314260
//increment counters for item 100
@@ -317,10 +263,7 @@ private void increment(Cat004Record record) {
317263
if (!record.getItem100().isValid()) {
318264
this.item100Invalid = this.item100Invalid + 1;
319265
}
320-
appendItemCounterMsg(
321-
"Item 100 - Area Definitions",
322-
item100Present,
323-
item100Invalid);
266+
324267
}
325268

326269
//increment counters for item 035
@@ -329,10 +272,7 @@ private void increment(Cat004Record record) {
329272
if (!record.getItem035().isValid()) {
330273
this.item035Invalid = this.item035Invalid + 1;
331274
}
332-
appendItemCounterMsg(
333-
"Item 035 - Track Number 2",
334-
item035Present,
335-
item035Invalid);
275+
336276
}
337277

338278
//increment counters for item 171
@@ -341,10 +281,6 @@ private void increment(Cat004Record record) {
341281
if (!record.getItem171().isValid()) {
342282
this.item171Invalid = this.item171Invalid + 1;
343283
}
344-
appendItemCounterMsg(
345-
"Item 171 - Aircraft Characteristics 2",
346-
item171Present,
347-
item171Invalid);
348284
}
349285

350286
//increment counters for item 110
@@ -353,10 +289,6 @@ private void increment(Cat004Record record) {
353289
if (!record.getItem110().isValid()) {
354290
this.item110Invalid = this.item110Invalid + 1;
355291
}
356-
appendItemCounterMsg(
357-
"Item 110 - FDPS Control Identifier (Skipped)",
358-
item110Present,
359-
item110Invalid);
360292
}
361293

362294

@@ -365,16 +297,16 @@ private void increment(Cat004Record record) {
365297
if (!record.getReservedExpansionField().isValid()) {
366298
this.itemReInvalid = this.getItemReInvalid() + 1;
367299
}
368-
appendItemCounterMsg("RE", getItemRePresent(), getItemReInvalid());
369300
}
370301

371302
if (record.getSpecialPurposeField() != null) {
372303
this.itemSpPresent = this.getItemSpPresent() + 1;
373304
if (!record.getSpecialPurposeField().isValid()) {
374305
this.itemSpInvalid = this.getItemSpInvalid() + 1;
375306
}
376-
appendItemCounterMsg("SP", getItemSpPresent(), getItemSpInvalid());
377307
}
308+
309+
createPrintMsg();
378310
}
379311

380312
public int getNbRecords() {
@@ -544,4 +476,129 @@ public int getItemSpPresent() {
544476
public int getItemSpInvalid() {
545477
return itemSpInvalid;
546478
}
479+
480+
private void createPrintMsg() {
481+
clearDebugMsg();
482+
appendNewLine();
483+
appendItemCounterMsg("Asterix Category 004 Counters", "Nb. decoded", "Nb. invalid");
484+
485+
appendItemCounterMsg(
486+
"Item 010 - Data source identifier",
487+
item010Present,
488+
item010Invalid
489+
);
490+
491+
appendItemCounterMsg(
492+
"Item 000 - Message Type",
493+
item000Present,
494+
item000Invalid
495+
);
496+
497+
appendItemCounterMsg(" ALIVE", nbAliveMessages, 0);
498+
appendItemCounterMsg(" STCA", nbStcaMessages, 0);
499+
appendItemCounterMsg(" APW", nbApwMessages, 0);
500+
appendItemCounterMsg(" MSAW", nbMsawMessages, 0);
501+
appendItemCounterMsg(" EOC", nbEocMessages, 0);
502+
503+
appendItemCounterMsg(
504+
"Item 015 - SDPS Identifier (Skipped)",
505+
item015Present,
506+
item015Invalid
507+
);
508+
509+
appendItemCounterMsg(
510+
"Item 020 - Time of Message",
511+
item020Present,
512+
item020Invalid
513+
);
514+
515+
appendItemCounterMsg(
516+
"Item 040 - Alert Identifier",
517+
item040Present,
518+
item040Invalid
519+
);
520+
521+
appendItemCounterMsg(
522+
"Item 045 - Alert Status",
523+
item045Present,
524+
item045Invalid
525+
);
526+
527+
appendItemCounterMsg(
528+
"Item 060 - Safety Net Function and Status (Skipped)",
529+
item060Present,
530+
item060Invalid
531+
);
532+
533+
appendItemCounterMsg(
534+
"Item 030 - Track Number 1",
535+
item030Present,
536+
item030Invalid
537+
);
538+
539+
appendItemCounterMsg(
540+
"Item 170 - Aircraft Characteristics 1",
541+
item170Present,
542+
item170Invalid
543+
);
544+
545+
appendItemCounterMsg(
546+
"Item 120 - Conflict Characteristics",
547+
item120Present,
548+
item120Invalid
549+
);
550+
551+
552+
appendItemCounterMsg(
553+
"Item 070 - Conflict Timing and Separation",
554+
item070Present,
555+
item070Invalid
556+
);
557+
558+
appendItemCounterMsg(
559+
"Item 076 - Vertical Deviation",
560+
item076Present,
561+
item076Invalid
562+
);
563+
564+
appendItemCounterMsg(
565+
"Item 074 - Longitudinal Deviation",
566+
item074Present,
567+
item074Invalid
568+
);
569+
570+
appendItemCounterMsg(
571+
"Item 075 - Transversal Distance Deviation",
572+
item075Present,
573+
item075Invalid
574+
);
575+
576+
appendItemCounterMsg(
577+
"Item 100 - Area Definitions",
578+
item100Present,
579+
item100Invalid
580+
);
581+
582+
appendItemCounterMsg(
583+
"Item 035 - Track Number 2",
584+
item035Present,
585+
item035Invalid
586+
);
587+
588+
appendItemCounterMsg(
589+
"Item 171 - Aircraft Characteristics 2",
590+
item171Present,
591+
item171Invalid
592+
);
593+
594+
appendItemCounterMsg(
595+
"Item 110 - FDPS Control Identifier (Skipped)",
596+
item110Present,
597+
item110Invalid
598+
);
599+
600+
appendItemCounterMsg("RE", getItemRePresent(), getItemReInvalid());
601+
appendItemCounterMsg("SP", getItemSpPresent(), getItemSpInvalid());
602+
}
603+
547604
}

0 commit comments

Comments
 (0)