Please edit your post to add code tags.
Did you apply the correct magnetic declination at your location?
You may need to do the calibration more carefully. See this post for the most reliable and accurate approach: Correcting the Balboa magnetometer
Please edit your post to add code tags.
Did you apply the correct magnetic declination at your location?
You may need to do the calibration more carefully. See this post for the most reliable and accurate approach: Correcting the Balboa magnetometer