GPS, and compass heading error

Usually the error in the GPS heading is much more than the compass error. On my capstone project that made it basically useless as we were pinging the GPS sensor very frequently and the vehicle would still be in the error range of the previous ping. That made that heading very unhelpful.

The compass is probably your most viable way of getting a heading. The compass can be very sensitive to magnetic interference. I would keep it away from fast switching circuits and high inductive loads. I would also recommend a moving average filter that could keep your heading from drifting too quickly.

Using waypoints with a built in error range could also be helpful to not have the system over correcting or over shooting.