User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:core:acceleration

Acceleration

This page is mainly about acceleration, which is often used by LZB to prevent trains from overspeeding or getting off track. This may also be useful for the emulation of Advtrains. Note that braking is also a type of acceleration.

Acceleration value

The acceleration of each wagon is based on the type of the wagon:

Type of acceleration (lever) Acceleration value
Per wagon Per engine
Emergency brake BB -10 0
Normal brake B -3 0
Roll - -0.5 0
Neutral o 0 0
Acceleration + 0.5 1.5

The acceleration of the whole train can be calculated using:

    Acceleration of each wagon * Number of wagons + Acceleration of each engine * Number of engines
a = ———————————————————————————————————————————————————————————————————————————————————————————————  
                                           Number of wagons
                                                               Number of engines
  = Acceleration of each wagon + Acceleration of each engine * —————————————————
                                                               Number of wagons

Time needed for acceleration

The time needed to accelerate from v0 to v1 can be calculated as follows:

    v1 - v0
t = ———————
       a

Distance needed for acceleration

The distance needed to accelerate from v0 to v1 can be calculated as follows:

             a
s = v0 * t + — * t^2
             2
         v1 - v0   a   / v1 - v0 \ 2
  = v0 * ——————— + — * | ——————— |
            a      2   \    a    /
    v1^2 - v0^2
  = ———————————
        2*a
dev/core/acceleration.txt · Last modified: 2019-11-24 19:40 by ywang