Interesting fact of the day.. a magnetic compass (when properly designed) doesn't just tell you the direction to north and south poles, it also tells you how far north or south you are (latitude), Simply put magnetic dip (the tendency for a magnetic compass to dip down or up) can be measured and used to determine latitude or compass direction.
I suspect the only reason we dont have digital compasses that can do this is simply because GPS is a more accurate and simpler to measure. But it would not be technologically very difficult to do.
@freemo I speculate we can't get enough accuracy in practice due to environmental disturbances e.g. magnets. It's ok to be a few degrees off when pointing north, but not ok if measuring latitude.
@freemo @mjambon It's a little more complicated than that. Magnetic deviation can be caused by anything that produces or alters the magnetic field, including trace ferrite in a nearby hill, nearby power lines, or even the phone in your pocket. Then you also have other issues, such as magnetic variation (the difference between magnetic north and true north), and even additional counterintuitive errors caused by acceleration and turning.
For example, in every airplane cockpit, you'll see something like this (to compensate for local fields caused by electronics):
@freemo Depends on your acceptable margin of error. But if you want the level of precision necessary to measure latitude dip, you definitely have to take such things into account.
@LouisIngenthron Well as I said, its margin of error is well below the alternatives anyway.
@LouisIngenthron No doubt it is a real effect, but easily managed in the wild. Any field that effect it are going to more or less within hands reach plus a little extra . So while its totally true it might be effected by an electronic device fairly close to it, or a large chunk of metal, anything even moderately far away (such as a deposit of metal a dozen feet under the earth) isnt likely to have much of an effect.