Package slash.navigation.common
Class Interpolation
java.lang.Object
slash.navigation.common.Interpolation
Computes interior points on the straight line (Luftlinie) between two positions,
one every
intervalMetres, excluding the two endpoints. Interpolation is
linear in longitude/latitude: for short legs sampled only for an elevation
profile a great-circle path is intentionally not used.- Author:
- Christian Pesch
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<double[]> interpolate(double longitude1, double latitude1, double longitude2, double latitude2, double intervalMetres) Returns the interior points on the straight line from (longitude1,latitude1) to (longitude2,latitude2), one everyintervalMetres, as{longitude, latitude}pairs.
-
Method Details
-
interpolate
public static List<double[]> interpolate(double longitude1, double latitude1, double longitude2, double latitude2, double intervalMetres) Returns the interior points on the straight line from (longitude1,latitude1) to (longitude2,latitude2), one everyintervalMetres, as{longitude, latitude}pairs. The endpoints are excluded. Returns an empty list whenintervalMetres <= 0or the leg is shorter than two intervals.
-