Component for converting headings to compass directions