private OsmTrack findTrack(final String operationName, final MatchedWaypoint startWp, final MatchedWaypoint endWp, final OsmTrack costCuttingTrack, final OsmTrack refTrack, final boolean fastPartialRecalc) {
        try {
            final List<OsmNode> wpts2 = new ArrayList<>();
            if (startWp != null) {
                wpts2.add(startWp.waypoint);
            }
            if (endWp != null) {
                wpts2.add(endWp.waypoint);
            }
            routingContext.cleanNogoList(wpts2);

            final boolean detailed = guideTrack != null;
            resetCache(detailed);
            nodesCache.nodesMap.cleanupMode = detailed ? 0 : (routingContext.considerTurnRestrictions ? 2 : 1);
            return findTrackHelper(operationName, startWp, endWp, costCuttingTrack, refTrack, fastPartialRecalc);
        } finally {
            routingContext.restoreNogoList();
            nodesCache.clean(false); // clean only non-virgin caches
        }
    }
find the elevation type for position
to determine the filter value

@param n  the point
@return  the filter value for 1sec / 3sec elevation source
main/src/main/java/cgeo/geocaching/brouter/core/RoutingEngine.java