Section.calcAccel C# (CSharp) Method

calcAccel() public method

public calcAccel ( ) : void
return void
    public void calcAccel()
    {
        switch (type) {
        case Type.ACCELERATION:
            accel = (2f * (s_inSection - velocReducer * v_max * t_inSection)) / (float) Math.Pow(t_inSection, 2);
            break;
        case Type.DECELERATION:
            accel = (2f * (s_inSection - v_max * t_inSection)) / (float) Math.Pow(t_inSection, 2); // can by definition never start from a v different to v_max -> no velocReducer
            break;
        }
    }