-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07ff26d
commit a9b4c6e
Showing
4 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/test/java/aero/t2s/modes/decoder/df/df17/AircraftOperationalStatusMessageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package aero.t2s.modes.decoder.df.df17; | ||
|
||
import aero.t2s.modes.BinaryHelper; | ||
import aero.t2s.modes.constants.*; | ||
import aero.t2s.modes.decoder.df.df17.data.SurfaceOperationalMode; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class AircraftOperationalStatusMessageTest { | ||
@Test | ||
public void it_decodes_surface_version1_message() { | ||
AircraftOperationalStatusMessage message = new AircraftOperationalStatusMessage(BinaryHelper.stringToByteArray("8F40622DF900260283493839FD1F")).decode(); | ||
|
||
Assertions.assertInstanceOf(AircraftOperationalStatusVersion2.class, message); | ||
Assertions.assertInstanceOf(AircraftOperationalStatusVersion2Surface.class, message); | ||
|
||
AircraftOperationalStatusVersion2Surface surface = (AircraftOperationalStatusVersion2Surface) message; | ||
Assertions.assertEquals(Version.VERSION2, surface.getVersion()); | ||
Assertions.assertEquals(LengthWidthCode.CAT6, surface.getLengthWidthCode()); | ||
|
||
Assertions.assertFalse(surface.getSurfaceCapability().isCockpitDisplayOfTraffic()); | ||
Assertions.assertFalse(surface.getSurfaceCapability().isUatReceive()); | ||
Assertions.assertFalse(surface.getSurfaceCapability().isLowB2Power()); | ||
Assertions.assertFalse(surface.getSurfaceCapability().isPositionOffsetApplied()); | ||
Assertions.assertFalse(surface.getSurfaceCapability().isReceive1090ES()); | ||
Assertions.assertEquals(NavigationUncertaintyCategory.NUC1, surface.getSurfaceCapability().getNACv()); | ||
Assertions.assertEquals(0, surface.getSurfaceCapability().getNICsuppC()); | ||
|
||
Assertions.assertFalse(surface.getOperationalMode().isAcasIdent()); | ||
Assertions.assertTrue(surface.getOperationalMode().isGpsLateralOffsetAvailable()); | ||
Assertions.assertFalse(surface.getOperationalMode().isSingleAntennaFlag()); | ||
Assertions.assertTrue(surface.getOperationalMode().isGpsLongitudinalOffsetAvailable()); | ||
Assertions.assertFalse(surface.getOperationalMode().isGpsLongitudinalOffsetAppliedBySensor()); | ||
Assertions.assertEquals(AcasState.RA_NOT_ACTIVE, surface.getOperationalMode().getAcasRA()); | ||
Assertions.assertEquals(0, surface.getOperationalMode().getGpsLateralOffset()); | ||
Assertions.assertEquals(0, surface.getOperationalMode().getGpsLateralOffset()); | ||
Assertions.assertEquals(4, surface.getOperationalMode().getGpsLongitudinalOffset()); | ||
Assertions.assertEquals(SourceIntegrityLevel.LESS_THEN_ONE_PER_HUNDRED_THOUSAND, surface.getOperationalMode().getSystemDesignAssurance()); | ||
|
||
Assertions.assertEquals(NavigationIntegrityCategory.RC_75_M, surface.getNICp()); | ||
Assertions.assertEquals(Angle.TRUE_TRACK, surface.getHorizontalSource()); | ||
} | ||
} |