Class CoordinateConversionsTest

java.lang.Object
edu.nps.moves.dis7.test.CoordinateConversionsTest

@DisplayName("CoordinateConversionsTest") public class CoordinateConversionsTest extends Object
Unit tests for CoordinateConversions utility class. Validates WGS84 ECEF (xyz) to geodetic (lat/lon/alt) conversions and vice versa. Reference values computed from known geodetic coordinates.
  • Constructor Details

    • CoordinateConversionsTest

      public CoordinateConversionsTest()
      default constructor
  • Method Details

    • setUpClass

      @BeforeAll public static void setUpClass()
      preparation
    • tearDownClass

      @AfterAll public static void tearDownClass()
      cleanup
    • testConversionConstants

      @Test public void testConversionConstants()
      Test conversion constants are correct
    • testRoundTripMonterey

      @Test public void testRoundTripMonterey()
      Test round-trip: lat/lon/alt (radians) -> xyz -> lat/lon/alt (radians) Using NPS Monterey, CA as reference point (36.5967N, 121.8770W, 0m)
    • testRoundTripWithAltitude

      @Test public void testRoundTripWithAltitude()
      Test round-trip with altitude: lat/lon/alt (radians) -> xyz -> lat/lon/alt (radians) Using NPS Monterey at 100m elevation
    • testRoundTripDegrees

      @Test public void testRoundTripDegrees()
      Test round-trip using degree convenience methods Using Washington DC (38.8977N, 77.0365W, 0m)
    • testEquatorPrimeMeridian

      @Test public void testEquatorPrimeMeridian()
      Test equator/prime meridian intersection (0, 0, 0)
    • testEquator90East

      @Test public void testEquator90East()
      Test equator at 90 degrees east (0, 90E, 0)
    • testNorthPole

      @Test public void testNorthPole()
      Test north pole (90N, 0, 0) Note: the algorithm comments state it may not be 100% accurate near poles
    • testSouthernHemisphere

      @Test public void testSouthernHemisphere()
      Test southern hemisphere: Sydney, Australia (33.8688S, 151.2093E, 0m)
    • testHighAltitude

      @Test public void testHighAltitude()
      Test high altitude: geostationary orbit (~35786 km)
    • main

      public static void main(String[] args)
      Command-line invocation (CLI) of program, execution starts here
      Parameters:
      args - command-line arguments