Remapstat: added function calc_maxdist().

4 jobs for develop in 16 minutes and 43 seconds (queued for 1 second)