Strange acceleration data in train.dat file - what happens internally?
3 posters
Page 1 of 1
Strange acceleration data in train.dat file - what happens internally?
I'm looking into the train.dat file, the acceleration section, for a tram I have not created myself. The numbers are somewhat strange, and causes error messages on loading. Nethertheless, the tram is drivable in OpenBVE.
I'm curious to know how this data is treated internally when a1 is always zero and v2 < v1? Are some of the less reasonable numbers replaced by other default values, or is the simulation in this case actually calculating the tram's behaviour from what is in the train.dat file?
This is a table of the values:
P1 | P2 | P3 | P4 | P5 | P6 | |
a0 | 4 | 4 | 4 | 4 | 4 | 4 |
a1 | 0 | 0 | 0 | 0 | 0 | 0 |
v1 | 80 | 80 | 80 | 80 | 80 | 80 |
v2 | 10 | 20 | 30 | 40 | 50 | 60 |
e | 1 | 1 | 1 | 1 | 1 | 1 |
Re: Strange acceleration data in train.dat file - what happens internally?
It might come from the BVE2 times when tutorials and localised specifications were scarce and developers just didn't have enough information.
Re: Strange acceleration data in train.dat file - what happens internally?
Looking in the parser, the following happens:
As a0 is zero, a constant 1.0 is used:
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/Parsers/Train/TrainDatParser.cs#L927
As v2 is less than v1, it is replaced by v1:
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/Parsers/Train/TrainDatParser.cs#L212
As a0 is zero, a constant 1.0 is used:
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/Parsers/Train/TrainDatParser.cs#L927
As v2 is less than v1, it is replaced by v1:
https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/Parsers/Train/TrainDatParser.cs#L212
Similar topics
» Train Plugin and Time Acceleration
» Even though the AI train hasn't stop completely, the AI train is open the doors.
» error with train.dat file
» TrainEditor can't open a train file
» Strange brake behavior with notched train brake + air loco brake
» Even though the AI train hasn't stop completely, the AI train is open the doors.
» error with train.dat file
» TrainEditor can't open a train file
» Strange brake behavior with notched train brake + air loco brake
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum