Try calibrating your compass by moving it in a figure of 8 motion or as described here https://www.youtube.com/watch?v=k1EPbAapaeI.Are there any magnets or metal nearby that might interfere with the compass? Try switching off "magnetic correction" (in settings) and see if that is more accurate.