code: public static List<Position> interpolateLongitude(List<? extends Position> positions,
              double maxLongitudeDifference) {
          List<Position> result = new ArrayList<Position>();
          Position previous = null;
          for (Position p : positions) {
              if (previous == null) {
                  result.add(p);
              } else {
                  double diff = longitudeDiff(p.getLon(), previous.getLon());
                  if (diff > maxLongitudeDifference) {
                      double delta = maxLongitudeDifference / diff;
                      double bearing = previous.getBearingDegrees(p);
                      double distanceKm = previous.getDistanceToKm(p);
                      for (double d = delta; d < 1.0; d += delta) {
                          result.add(previous.predict(d * distanceKm, bearing));
                      }
                  }
                  result.add(p);
              }
              previous = p;
          }
  
          return result;
      }
docs: TODO unit test