GreatCirclePointDistance { public static final LatLonPoint radToPoint(double latRad, double lonRad) { return radToPoint(latRad, lonRad, true); } GreatCirclePointDistance(double startLat, double startLon, double distance); double getDistance(); double getAngDistance(); double getStartLat(); double getStartLon(); double getLatRad(); double getLonRad(); double getSinStartLat(); double getCosStartLat(); double getSinAngDistance(); double getCosAngDistance(); @Override String toString(); double latitude(double bearingRad); double longitude(double endLatRad, double bearingRad); static final LatLonPoint radToPoint(double latRad, double lonRad); static final LatLonPoint radToPoint(double latRad, double lonRad, boolean isNormaliseLon); static double normaliseLongitude(double lonDegrees); static final LatLonPoint getPoint(LatLonPoint startPoint, double distance, double bearing); static final LatLonPoint getPoint(double startLat, double startLon, double distance, double bearing);  }
@Test public void testRadToPoint_double_double() { double latRad = 0.5; double lonRad = 0.1; LatLonPoint expResult = new LatLonPoint(Math.toDegrees(latRad), Math.toDegrees(lonRad)); LatLonPoint result = GreatCirclePointDistance.radToPoint(latRad, lonRad); assertEquals(expResult, result); }
@Test public void testRadToPoint_3args_false() { double latRad = 0.5; double lonRad = Math.PI + 0.1; boolean isNormaliseLon = false; LatLonPoint expResult = new LatLonPoint(Math.toDegrees(latRad), Math.toDegrees(lonRad)); LatLonPoint result = GreatCirclePointDistance.radToPoint(latRad, lonRad, isNormaliseLon); assertEquals(expResult, result); }
@Test public void testRadToPoint_3args_true() { double latRad = 0.5; double lonRad = Math.PI + 0.2; boolean isNormaliseLon = true; LatLonPoint expResult = new LatLonPoint(Math.toDegrees(latRad), Math.toDegrees(-Math.PI + 0.2)); LatLonPoint result = GreatCirclePointDistance.radToPoint(latRad, lonRad, isNormaliseLon); assertEquals(expResult, result); }