code: private List<Observation> filterGPXEntries(List<Observation> gpxList) {
          List<Observation> filtered = new ArrayList<>();
          Observation prevEntry = null;
          int last = gpxList.size() - 1;
          for (int i = 0; i <= last; i++) {
              Observation gpxEntry = gpxList.get(i);
              if (i == 0 || i == last || distanceCalc.calcDist(
                      prevEntry.getPoint().getLat(), prevEntry.getPoint().getLon(),
                      gpxEntry.getPoint().getLat(), gpxEntry.getPoint().getLon()) > 2 * measurementErrorSigma) {
                  filtered.add(gpxEntry);
                  prevEntry = gpxEntry;
              } else {
                  logger.debug("Filter out GPX entry: {}", i + 1);
              }
          }
          return filtered;
      }
docs: Filters GPX entries to only those which will be used for map matching (i.e. those which
  are separated by at least 2 * measurementErrorSigman