Class Interpolation

java.lang.Object
slash.navigation.common.Interpolation

public class Interpolation extends Object
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 Type
    Method
    Description
    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 every intervalMetres, as {longitude, latitude} pairs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 every intervalMetres, as {longitude, latitude} pairs. The endpoints are excluded. Returns an empty list when intervalMetres <= 0 or the leg is shorter than two intervals.