ELi5: How does GPS decide which way I’m facing?

195 views

Why does my phone gps know which way I’m facing when driving, but when walking it always thinks I’m walking backwards?

In: Technology

On its own, GPS doesn’t know that, it only works for positioning. It can only guess when you start moving, then it could make the assumption that you’re facing the direction you’re moving in.

Pretty much every device made today has a magnetometer that acts as a compass, and that’s what gives the direction, separately from GPS. It’s an entirely separate thing that has nothing to do with the GPS/GLONASS/Galileo satellites. Magnetometers are not entirely reliable though, and need calibration and can be confused by magnetic fields.

The phone uses gyroscopes to understand it’s orientation but more importantly they use a magnetometer to discern it’s relational direction to magnetic North and even more importantly it uses the direction of movement to discern it’s direction of travel.

GPS doesn’t have any sense of direction in it. However, your phone does have a gyroscope that can be used to keep track of what direction it’s facing. That gyroscope gets calibrated via GPS, since it can track what direction it is moving based on changes in GPS, and it can use that to calibrate what direction the gyroscope is pointing at.

Gps isn’t exact usually. The government doesn’t want it to be exact. So it gives a range within a few feet.

When driving you are moving forward and google maps or whatever understand you are going forward in that direction. It also assumes you are on the road most of the time and not driving in the wrong direction.

If you walk backwards you likely aren’t moving enough. Try doing it for longe stretchs. Remember gps has a built in margin of error.

Also phones have their own sensors. And can sorta tell where they are and where they are facing.

Phones typically use their magnetic sensor to detect north, and give you direction that way. Once GPS shows you are moving (indicated by position is changing), then your phone changes to GPS, which is where they just take the last few fixes, draw a line through them, and say you are going in the direction of the line. Then to display it on the phone, it just assumes the top/front of your phone is facing forward (depending on the orientation of your phone, as detected by accelerometers) and draws the arrow in that direction (so when using GPU, spinning your phone won’t typically cause the arrow to move).

GPS has no idea which way you’re facing. Your phone does, though, because it has a compass built into it. That compass tells the app you’re using which way your facing, and the GPS tells the app where you are. The app puts them together to give you a whole picture of where you are and where you’re headed.