Thank you for the response easbar.
I apologize if my post didn’t make sense.
I have an actual driven distance data for each GPS point and would like to replace the linearDistance:
final double linearDistance = distanceCalc.calcDist(prevTimeStep.observation.getPoint().lat, prevTimeStep.observation.getPoint().lon, timeStep.observation.getPoint().lat, timeStep.observation.getPoint().lon) + timeStep.observation.getAccumulatedLinearDistanceToPrevious();
double transitionLogProbability = probabilities.transitionLogProbability(path.getDistance(), linearDistance);
with the function similar to this:
final double drivenDistance = (timeStep.observation.getDrivenDistance() - prevTimeStep.observation.getDrivenDistance()) + timeStep.observation.getAccumulatedDrivenDistance();
then I can just use:
double transitionLogProbability = probabilities.transitionLogProbability(path.getDistance(), drivenDistance);
So I am thinking of adding this driven distance data in the GPX file in addition to the lon, lat and time (e.g. lon, lat, time and driven distance). I can then just read the GPX file and add the driven distance data in the observation class. However, I can’t seem to figure out how GH is reading input GPX files.