This article explains how to calibrate Google Maps on an Android device so that your location is always accurate.
How to Calibrate the Compass (Smart Tools)
Before calibrating your compass, make sure that your location and direction are being tracked correctly by your Android device.
Open the Google Maps app on your smartphone or tablet. A map of the area should immediately appear, with a blue dot indicating your exact location and direction.
If no blue dot appears, tap Your location. It appears as a bullseye and is located in the bottom-right corner of the screen, directly above the GO icon.