@@ -340,7 +340,7 @@ public void test_df20_bds50_48418A() throws UnknownDownlinkFormatException {
340
340
}
341
341
342
342
@ Test
343
- public void test_df16_bds50_48418A () throws UnknownDownlinkFormatException {
343
+ public void test_df16_02A198 () throws UnknownDownlinkFormatException {
344
344
DownlinkFormat df = testMessage ("80C18819584195384EF8505941FD" );
345
345
346
346
assertInstanceOf (DF16 .class , df );
@@ -366,6 +366,32 @@ public void test_df16_bds50_48418A() throws UnknownDownlinkFormatException {
366
366
assertFalse (df16 .isRANotTurnRight ());
367
367
}
368
368
369
+ @ Test
370
+ public void test_df21_bds50_02A185 () throws UnknownDownlinkFormatException {
371
+ DownlinkFormat df = testMessage ("A8001AA0F4596112BDFC569A3AEC" );
372
+
373
+ assertInstanceOf (DF21 .class , df );
374
+ DF21 df21 = (DF21 ) df ;
375
+ assertEquals ("02A185" , df .getIcao ()); // Military / corrupt transponder
376
+ assertEquals (7110 , df21 .getModeA ());
377
+
378
+ assertFalse (df21 .isMultipleMatches ());
379
+ assertTrue (df21 .isValid ());
380
+ assertEquals (Bds50 .class , df21 .getBds ().getClass ());
381
+
382
+ Bds50 bds = (Bds50 ) df21 .getBds ();
383
+ assertTrue (bds .isStatusGs ());
384
+ assertEquals (148 , bds .getGs (), 0.1 );
385
+ assertTrue (bds .isStatusTas ());
386
+ assertEquals (172 , bds .getTas (), 0.1 );
387
+ assertTrue (bds .isStatusRollAngle ());
388
+ assertEquals (-16.5 , bds .getRollAngle (), 0.1 );
389
+ assertTrue (bds .isStatusTrueAngleRate ());
390
+ assertEquals (-2.0 , bds .getTrackAngleRate (), 0.1 );
391
+ assertTrue (bds .isStatusTrackAngle ());
392
+ assertEquals (210.9 , bds .getTrueTrack (), 0.1 );
393
+ }
394
+
369
395
private DownlinkFormat testMessage (String message ) throws UnknownDownlinkFormatException {
370
396
Decoder decoder = new Decoder (new HashMap <>(), 50 , 2 , ModeSDatabase .createDatabase ());
371
397
0 commit comments