Compass accuracy depends on your device orientation sensor.
Better results are obtained by shaking a bit or doing a full rotation.
All the sensors do not have the same orientation. if the compass turns the wrong way, please tap the following box: