added stuff to calculate angles and x,y coordinates of 50 cm data