How exactly does iPhone's Compass app work? Is there some kind of chip sensitive to Earth's magnetic field or does it deduce the device's orientation from GPS and other location data? Or a combination of both?

If there are differences among different models of iPhone, of course I'd be interested in learning them. Is the iPhone 7 different in this regard?

  • Google is your friend! Have a look at: How does the compass on the iPhone work? – user3439894 Mar 12 '16 at 12:28
  • @user3439894: Thanks, very useful! That is from almost five years ago, and covers iPhone 4. Do you happen to know if anything has changed since then? – DaG Mar 12 '16 at 13:07
  • Well, I could dig around a bit more on the Internet however you could do the same. I'd assume there has been improvements in the chips and gyros which have increased/improved accuracy and capability. Considering that the state of electronics, etc., are constantly improving it's a fair assumption. That said, Apple is, as usual, extremely tight lipid about its electronics, and rightly so. So if you're looking for more then what was in the link you'll need to do the research. – user3439894 Mar 12 '16 at 13:45
  • @user3439894, I am not sure whether you are suggesting that this question is too easily answerable for this site or requests too much research, but probably in some sense both are actually true. – DaG Mar 12 '16 at 15:33
  • 1
    Not sure what you want as an answer however the iPhone uses an Electronic Compass IC and software to communicate with the IC, along with the Accelerometer and Gyros also built into the iDevice. Apple has used more then one type/model Electronic Compass IC since it first introduced its Compass.app to iOS. If you want more specificity I'd suggest you do some research. – user3439894 Mar 12 '16 at 16:10

The iPhone 5s Compass app reacts to a magnet. This proves that it uses a magnetic sensor.

  • 1
    I have tested this too and can confirm it works on iPhone 7, iPhone 3GS, and iPhone 6. – JBis May 20 '18 at 0:34

There's a lot of online speculation on this, and some of it is laughable. Disclaimer: I use Apple products, but otherwise have no affiliation and know nothing with certainty. But, I have a very strong hunch that the the iPhone in all versions uses a device called a magnetometer for the compass. ICYI, the compass reading is combined with inertial data generated by accelerometers in the iPhone and GPS data from its receiver (when available) to calculate the phone's position using a technique known as Kalman filtering.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .