I think i've found a close (or maybe even the exact) ratio the game uses to convert distances covered by minecarts on ramps: standard distance travelled *0,70707.
I worked out the baffling "lost" tiles when minecarts move on long ramped slopes (they sometimes move fewer ramp tiles than their speed suggests, e.g. spend two steps on a tile when going at 200 000+ speed, i.e. much faster than one tile/step, even on ramps): there's a "secondary checkpoint" effect where carts moving on ramps run a check every 100.000 normal distance and stop if they haven't moved to a new tile since the last check:
long explanation here ; i had seen the effect earlier but hadn't understood it, so with some retroactive help from user fricy, who posted several data dumps, i could look up such an event in detail:
open spoiler at own risk. Extracting the few ramp-check-braked shortened moves, we get these data:
Coordinate speed accel. z z-movement
26,72592 1,0816 0,0489 144 -1
27,43299 1,1305 0,0489 144 0
...
38,50771 1,6684 0,0489 132 -2
39,21478 1,7173 0,0489 132 0
......
55,78747 2,353 0,0489 115 -2
56,49454 2,4019 0,0489 115 0
...
59,99488 2,4997 0,0489 111 -2
61,40902 2,5486 0,0489 110 -1
(not quoting all of them, just three of the moves that went zero z-levels due to the effect, and one that only made one z-level)
Unfortunately, the dump doesn't explicitly contain the "distance travelled" field, so you'll have to subtract the co-ordinates to get the values. You'll see that the zero-z moves (stopped after 100.000 conventional distance) all have a distance travelled of 0,70707, and the one-z move (after 200.000 distance conventional) a distance travelled of 1,41414. I went and tested the value a bit on the high-speed turns in the dump that went the full distance and am reasonably sure that
on ramps, distance travelled is calculated normally, then multiplied by 0,70707.
(it could also be done by division, presumably by 1,41429, but that may be more effort for the CPU for pretty much the same result. Incidentally, a very human-friendly rendition of that divisor is 99/70, which at ~1,4143 is a reasonably good approximation of sqrt2.)