PikkaBird wrote:No, Trains use 1.6*mph (and road vehicles use 3.2*mph). However, it appears than in their infinite wisdom, the OTTD coders have changed it so that OTTD thinks km/h is exactly mph*1.6.
If I code a train with a speed of 224 (140*1.6), it will show as 140 mph in both TTDP and OTTD, and as 225 km/h in TTDP (which is correct), but as 224 km/h in OTTD.
You are wrong. You are confusing the speed values with the units. Since 1 mile is 1.6 km (approximately), 1.6 km/h is 1.0 mph, so 1.0 km/h is 1/1.6 mph, not 1.6 mph (or 1.6*mph as you write it).
However, this implies that the speed values relate as (speed in km/h) = 1.6 * (speed in mph).
I already got confused by the ttdpatch wiki before, since it states for instance
TTDpatch wiki, Action0Trains wrote:Speed in mph*1.6 (see below)
(for property 09). At first glance, I would read this as "speed in (mph*1.6)", i.e. speed in units of 1.6 mph, or units of approximately 2.56 km/h. Further below, it reads
TTDpatch wiki, Action0Trains wrote:Train speed is in units of mph*1.6, i.e. approximately km/h.
If you read the part of this sentence up to the comma, then one might think that indeed "Train speed is in units of 1.6 mph", but the last part, shows that the sentence should be interpreted as "Train speed is in units of mph, times 1.6" (i.e. take the value of the train speed in mph, and then multiply with 1.6) [1]. Indeed, when you take the value of the train speed in mph, and then multiply it with 1.6, you get the train speed in units approximately equal to km/h.
I would say that the wiki is wrong at this point, but one might also say that only the way it is formulated is confusing.
The same applies to road vehicles and ships, but this time the units are 1/3.2 mph, or approximately 0.5 km/h.
OpenTTD indeed takes the values from newgrf to be km/h. Indeed, OpenTTD does think that 1.0 mph is 1.6 km/h. That needs to be fixed. I already proposed the conversion factor 159/256 earlier [2], which is equal to 1/1.610; indeed fairly close to the number of miles in a km.
[1] Or, equivalently, one may read it as "Train speed is in units of miles per time unit equal to 1.6 hours".
[2] Rather than the current 10/16. I thought that it was changed already, but upon close inspection I saw it wasn't.