From my understanding of the current map matching implementation it uses node-based traversal during path finding. There is a comment in the source:
// TODO initialization of start values for the algorithm is currently done explicitely via node IDs!
// To fix this use instead: traversalMode.createTraversalId(iter, false);
// this.traversalMode = graph.getExtension() instanceof TurnCostExtension
// ? TraversalMode.EDGE_BASED_2DIR : TraversalMode.NODE_BASED;
My understanding is that if this change was made it would only support bi-directional edge based traversal. For u-turn support the traversal mode would have to be
EDGE_BASED_2DIR_UTURN. But I am dubious of making such a change because of the ominous comment about this traversal mode:
Not recommended as it leads to strange routes that outsmart the turn costs.
To achieve map matching of trails with u-turns I am thinking of making the GPX sub-list extraction in
doWork(List<GPXEntry> gpxList) split on u-turns also.
What are your thoughts on supporting map matching for trails with u-turns?