private OsmTrack searchTrack(final MatchedWaypoint startWp, final MatchedWaypoint endWp, final OsmTrack nearbyTrack, final OsmTrack refTrack) {
        // remove nogos with waypoints inside
        try {
            final boolean calcBeeline = startWp.direct;

            if (!calcBeeline) {
                return searchRoutedTrack(startWp, endWp, nearbyTrack, refTrack);
            }

            // we want a beeline-segment
            OsmPath path = routingContext.createPath(new OsmLink(null, startWp.crosspoint));
            path = routingContext.createPath(path, new OsmLink(startWp.crosspoint, endWp.crosspoint), null, false);
            return compileTrack(path);
        } finally {
            routingContext.restoreNogoList();
        }
    }
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