fixed bugs in calculateHeadingToPoint(); modified calculateHeadings; passed all tests