bearings and direction calculation