The condition of a railway track is characterized by many indices, including its geometric shape, both in the horizontal and vertical planes. The purpose of this paper is to create a mathematical tool to ensure the operation of track machines for surfacing, tamping, and alignment, which are equipped with automation systems. The developed mathematical model will be integrated into the AS "Strela" software package which is currently installed on machines. Scientific approaches used in the mathematical model allowed to reduce the operation of machines in "window", to simplify the work of maintenance personnel, to create an information base of track parameters, to establish rational parameters of curves during surfacing.