The co-ordinate system of the rail profile is then transformed from the camera based system of the original XY measurements into a rail based system in which the rail is vertical and the origin is located on the center line of the rail. Cant angle is also calculated.
The alignment method is a least-squares fit of the non-wearing features of the measured rail (base, fillet, and web on both sides) to the corresponding features of the unworn rail profile of the identified type.