A magnetic or electronic device used to determine the cardinal directions (usually magnetic or true north).