Some of Garmin's hiking-oriented GPS units have actual compasses in. I don't think any of the bike ones do, though.
Most, if not all smart phones have a built in compass.
Most apps can use the phone masts, Wi-Fi to narrow down the location. Possibly grab a satellite maps similar to TomTom satnavs so they can locate quickly with the GPS. One done though it's pure GPS. Shifted over to the OS's readout and just logged. Correction is done online afterwards normally. So distance height will be smoothed out. At least it is currently with Strava and the others where similar when I looked a year or so ago.
Viewranger/maverick on android may use a few more. Compass for instance, barometer if you have it.
I know Maverick which I use for OS and other map work give accuracy, no of SATs mapping, altitude (that's just more trig just in the extra plane) etc.