add calculation of bearing

Just add the calculation of bearing according to given points