Heading calculation dev