iPhone 4 requires recalibrating the compass almost every time I use it

Solution 1:

According to an Apple support article:

After updating or restoring your device, you may notice that the recalibration alert appears more frequently. This is expected behavior, because the calibration database is being recreated. The frequency diminishes over time as you calibrate the device for various locations.