TrailCam

Guides

Does a GPX file record which direction you were facing?

Look at a recorded hike on a map and the direction of travel seems obvious — the line clearly runs north, then bends east along the ridge. It is easy to assume that sense of direction is sitting somewhere in the file itself, as a compass reading attached to each point. Open the GPX file and look for it, and there is nothing to find. The direction you were facing, and even the direction you were moving, are not things a GPX point was ever built to hold.

The short answer

No. A GPX track point holds a latitude, a longitude, usually an elevation, and a timestamp — nothing else. There is no field for compass heading, no field for the direction you were facing, and no field that states which way you were moving. Any sense of direction you get from looking at a GPX track comes from comparing one point to the next, not from anything written into the point itself.

What a GPX point actually holds

The GPX schema keeps a track point to a small, fixed set of fields: where it was, how high it was, and when it was recorded. That is deliberately all a point needs to draw a line on a map. A compass heading — which way the phone was pointed at that instant — is a completely different kind of measurement, coming from a different sensor, and the format simply has nowhere to put it. Waypoints are just as limited: a name, a location, sometimes a short description, never a bearing.

Direction can be worked out — just not stored

A mapping app can still draw an arrow showing which way you were heading, and it gets that from doing the maths itself: taking one point, taking the next point after it, and calculating the bearing between the two. Strung together across a whole track, that gives a reasonable picture of the direction of travel at every step, entirely reconstructed after the fact from the ordered list of coordinates. Nothing about that calculation was stored in the file — it is recomputed by whatever software opens the track, every time.

That computed bearing is also not the same thing as which way you were facing. Walk backwards for a few steps, or stop to look at a view off to one side, and the direction between consecutive points still points along the path you actually traveled — it says nothing about where the phone, or you, happened to be pointed at that moment. A compass heading and a direction of travel are two different measurements that only line up when you are walking in a straight line facing forward.

Why the format leaves it out

GPX exists to move a route between apps as a small, predictable file, and a direction of travel does not need its own field to survive that trip — any app that wants an arrow can derive one from the coordinates already in the file, so storing it separately would just be redundant data bloating every point. Compass heading is a different case: it changes constantly and independently of the route, drifts with how a phone is held, and reflects a moment-to-moment orientation that has little to do with the shape of the path taken. Leaving it out keeps the format doing one job — recording where you went — instead of also trying to be a log of everything a phone's sensors happened to report along the way.

Things that trip people up

  • Expecting an "arrow" or "heading" field somewhere in the raw GPX file — there is not one; any arrow shown by an app is calculated from consecutive points, not read out of a field.
  • Assuming the direction between two points tells you which way the phone was facing — it only tells you which way the position moved, which is not the same thing whenever you stop, look around, or backtrack.
  • Expecting a single point, viewed on its own, to carry any sense of direction — a lone point is just a location; direction only exists as a relationship between two or more points in sequence.
  • Thinking a device without a working compass could not have recorded a usable track — direction of travel comes from the sequence of GPS positions, not from a compass, so the track is unaffected either way.

Where TrailCam fits in

TrailCam records a route with GPS on an iPhone and pins a video clip, a photo or a voice note to the exact point where you captured it, so replaying a saved route shows what you noticed and where, with the elevation profile running underneath. Exporting that route as GPX 1.1 or CSV — for a single walk or the whole history at once — carries the same coordinates a GPX point has always carried: location, elevation and time, which is what lets the file open cleanly in Strava, Garmin Connect or Komoot. Export is part of the optional TrailCam Pro upgrade; the app itself is free to download.

Questions

Does any version of GPX support a heading or bearing field?
The core GPX schema does not define one for a track point. Some software adds extra, non-standard fields for its own purposes, but that is outside the base format, and there is no guarantee another app will read or preserve it.
If direction is not stored, how do apps draw a moving arrow on a route?
By calculating it after the fact — comparing each point to the one before it and working out the bearing between them, then redoing that calculation every time the track is displayed rather than reading it from the file.
Is the direction between two GPX points the same as compass heading?
No. One is the direction your position moved between two recorded points; the other is which way a phone was physically pointed at a given instant. They usually roughly agree while walking forward in a straight line and can diverge completely otherwise.

Recording your own routes

TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.

Download on the App Store