I believe you'll find this is the deceleration at the maximum service brake notch.The deceleration for other brake notches should be proportional to this, e.g.Set a deceleration of 20km/h per second on a train with 10 brake notches:

Code:

#Deceleration200.3500.00251.1

Brake notch 1 will provide 2km/h per second of deceleration, brake notch 5 will provide 10km/h per second of deceleration and so-on.Using the partial air brake, it should work as a percentage based upon the brake pipe pressure.

Be aware, that this is effected by the brake type defined in the #Brake section, as follows:Brake Control System set to 0:The deceleration rate is the train's maximum acceleration (The documentation isn't clear on this, but I presume this is at the current speed, would have to check the code) *plus* the deceleration rate stated above.Brake Control System set to 1:If the speed is below that set by BrakeControlSpeed, use the value calculated above, otherwise, use this figure:

Code:

0.5 * (MaximumAcceleration + Deceleration calculated above)

Brake Control System set to 2:First, this sum is performed:

Code:

0.5 * (MaximumAcceleration + Deceleration calculated above)

If the figure produced from this sum is equal to or above that of maximum acceleration, this is used.Otherwise, the Deceleration calculated above is added to this figure.

To use the figure calculated solely, you want a #Brake section that looks like this (Unless you plan a train that goes faster than 999km/h....):

Code:

#Brake01999

Disclaimer:I haven't tried this or thought about it before now, but it's based upon a reasonable understanding of the workings of the sim, and seems reasonably logical to me None of the trains I've had a brief look at seem to follow this pattern, and a lot of the documentation I can find suggests just fudging the deceleration figure until you get one that's right.

The original BVE train.dat was built to simulate a standard Japanese EMU, with engine braking in addition to the train brakes, and OpenBVE never got as far as implementing a newer format, and so I'm afraid that anything other than this is somewhat of a fudge....

You're confusing acceleration with deceleration in your calculations, which is why I think your speed is off.

The MaximumAcceleration figure is the train's maximum acceleration under power (As calculated in the #Acceleration section), *not* the maximum deceleration figure.With your current #Brake section, the sim is taking into account engine braking.

Worked Example:Your calculation should therefore look like this for B3:Below 1km/h(8.8 / 5) * 3 = 5.28km/h per secondAbove 1km/h0.5 * (MaximumAcceleration + ((8.8 / 5) * 3))I haven't got the maximum acceleration for your train.dat, so let's take an example #Acceleration section (OpenBVE format exponents, although the result should be broadly similar):

For the maximum acceleration figure, we want the last notch (This is an assumption, again haven't tested this at the minute) at a reference speed of 72km/h.Please refer to the documentation for the exact formula (The board doesn't like exponent symbols...), but this gives us a maximum acceleration figure of:

Code:

2.330876215941685

This gives us a final calculation of:

Code:

0.5 * (2.330876215941685 + 5.28)

The result is a deceleration figure of 3.805438107970843 km/h per second at 72km/h This will decrease/ increase in line with the acceleration curve for your final power notch.

Post the #Acceleration section of your train.dat if you're not sure, and I can work out the exact figure.

Same disclaimer as above applies:Haven't personally tested this, but it's a logical working through based upon the documentation and a good understanding of how the sim works.

That figure is mathematically correct, but having tested, OpenBVE is doing something funky with the deceleration rates- Your train.dat is giving me a deceleration figure bouncing between 0.7m/s and about 1.5m/sI think that using a figure of about 1.1 (Fiddle around until you get something you're happy with, but driver reactions will differ so go high) in the equation above:

Code:

Distance = 20² / 2 * (-1.1)

will probably give you the results you want, but that's not really the point

I'm in the process of working through exactly what's going on in the code, but frankly it's an under-documented mess in there

Sorry, I know where I went wrong....One of the biggest issues with OpenBVE is that there are a nasty mix of units all over the place, and forgetting to convert once will throw everything off...

Revised:Our deceleration figure above is in km/h per second.Remembering to look closely (lol), you'll note that OpenBVE provides deceleration figures in meters per second, and this is also what the equation works in!Thus, we need to multiply our deceleration figure by 0.277777778 before trying to use or compare it.This gives us a this figure for deceleration in meters per second:

Code:

0.787562321404574

If you'll note above, the deceleration figures I observed under testing bounced around a little between 0.7 & 1.5 meters per second, and so this mathematical deceleration figure is broadly in accordance with what the sim is reporting once we've taken into account air resistance, wheelsip & gradient

Let's try again with the calculation:

Code:

Distance = 20² / 2 * (-0.787562321404574)

Our result this time is this:

Code:

-253.948156944978

I'd round up to a nice whole number and add 25m for something that will work reasonably well in the sim

This is on level track; I can go digging for how gradient effects things if you really want.