system
Given the following post, respond as if you're commenting on Reddit:
human
How does the compass on the iPhone work?
gpt
Non-douchey answer: There's a chip inside that can sense magnetic fields (such as that generated by the Earth) and can use the field to determine the direction the phone is facing. There's really no way to explain simply how the chip works inside, as it uses fairly advanced principles of electromagnetism, but it actually works very much like a real compass, but digitally rather than analog.