@Test public void testFindPosition() throws FormatException{ double lat = ParseUtils.parseLatitude("61 00.000N"); double lon = ParseUtils.parseLongitude("051 00.000W"); Position start = Position.create(lat, lon); Position result = Calculator.findPosition(start, 45.0, 9260.0); assertNotNull(result); assertEquals("61 03.530N", result.getLatitudeAsString()); assertEquals("050 52.699W", result.getLongitudeAsString()); }
public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocation.getLatitude()), Math.toRadians(startingLocation.getLongitude()), Math.toRadians(endLocation.getLatitude()), Math.toRadians(endLocation.getLongitude()), distance / 2, 512); return Position.create(result.getLatitude(), result.getLongitude()); }
Calculator { public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocation.getLatitude()), Math.toRadians(startingLocation.getLongitude()), Math.toRadians(endLocation.getLatitude()), Math.toRadians(endLocation.getLongitude()), distance / 2, 512); return Position.create(result.getLatitude(), result.getLongitude()); } }
Calculator { public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocation.getLatitude()), Math.toRadians(startingLocation.getLongitude()), Math.toRadians(endLocation.getLatitude()), Math.toRadians(endLocation.getLongitude()), distance / 2, 512); return Position.create(result.getLatitude(), result.getLongitude()); }  }
Calculator { public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocation.getLatitude()), Math.toRadians(startingLocation.getLongitude()), Math.toRadians(endLocation.getLatitude()), Math.toRadians(endLocation.getLongitude()), distance / 2, 512); return Position.create(result.getLatitude(), result.getLongitude()); }  static double crossTrackDistance(Position lineStart,
            Position lineEnd, Position point); static Position findCenterPosition(Position A, Position B,
            CoordinateSystem system); static double range(Position pos1, Position pos2, Heading heading); static double bearing(Position pos1, Position pos2, Heading heading); static double distanceAfterTimeMph(Double mph, long seconds); static Position findPosition(Position startingLocation,
            Position endLocation, double distanceTravelled); static Position findPosition(Position startingLocation,
            double bearing, double distanceTravelled); static Position calculateEndingGlobalCoordinates(
            Ellipsoid ellipsoid, Position start, double startBearing,
            double distance, double[] endBearing); static double turn90Plus(double direction); static double turn90Minus(double direction); static double reverseDirection(double direction); }
Calculator { public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocation.getLatitude()), Math.toRadians(startingLocation.getLongitude()), Math.toRadians(endLocation.getLatitude()), Math.toRadians(endLocation.getLongitude()), distance / 2, 512); return Position.create(result.getLatitude(), result.getLongitude()); }  static double crossTrackDistance(Position lineStart,
            Position lineEnd, Position point); static Position findCenterPosition(Position A, Position B,
            CoordinateSystem system); static double range(Position pos1, Position pos2, Heading heading); static double bearing(Position pos1, Position pos2, Heading heading); static double distanceAfterTimeMph(Double mph, long seconds); static Position findPosition(Position startingLocation,
            Position endLocation, double distanceTravelled); static Position findPosition(Position startingLocation,
            double bearing, double distanceTravelled); static Position calculateEndingGlobalCoordinates(
            Ellipsoid ellipsoid, Position start, double startBearing,
            double distance, double[] endBearing); static double turn90Plus(double direction); static double turn90Minus(double direction); static double reverseDirection(double direction);  }