Simpack - measuring a clearance of a vehicle at a curve

I would like to measure the clearance (as shown in the figure) in online time integration. The clearance is the distance between the center of a rail track to the end of a vehicle at the outer rail. 

Could anyone suggest me how can I measure this clearance on Simpack ?

 

Thank you very much for your time and kind support in advance