A number of people have reported difficulty in calibrating their 3G S Compass.
The documentation is rather vague in the procedure. It states:
"The compass needs to be calibrated the first time you use it, and may need to be calibrated occasionally after that. iPhone alerts you whenever calibration is needed.
Calibrate iPhone: Wave iPhone in a figure eight. You may also be asked to move away from a source of interference."
What isn't clear is "What is a figure-8?" Is it a vertical or horizontal pattern and how should the phone be oriented? Do you twist your hand, or hold it pointing in one direction.
The best (and only) clue comes from the image presented on the iPhone itself, when the Calibration message appears.
(The following explaination has been editied from my original post to correct the process description based on feedback from a reader's comment below.)
As seen in the graphic above, the phone should be held horizontally, parallel to the ground.
Pretend the iPhone is a toy car and "drive" it around the figure-8 track. This orients the phone in all directions of the compass rose. Alternatively you might hold the phone and turn yourself around twice at a steady rate, but I haven't tried this to see if it works well.
Since the above process requires you to move the phone from hand to hand (unless you are quadriple jointed and can twist a hand around twice!) for safety you may want to lay the phone on a non-metalic surface such as a table, and drive it around the figure-8 course.
NOTE: if you are near steel surfaces, or other magnetic sources, the earth's magnetic fields are distorted, the phone cannot calibrate properly, and you will continue to get the calibration message. Thus it may be difficult to calibrate in a car with all the steel components around you. Trying to use the compass while on a subway may be impossible due to the large amount of steel AND the strong magnetic fields generated by the electrified track and large drive motors.

very easy
I've found it very easy to calibrate and though the instructions were quite clear when the popped up. But I was not able to calibrate in my car. When I moved out of the car it calibrated easy. But it still didn't sense very well in the car with the roof up (roof down, it worked pretty good).
iPhone Compass calibration
To calibrate the compass, you will have to turn the phone heading in all 360 degs. This will allow the sensor to measure when the earth magnetic field and the phone native field will add or subtract in a vector space.
Pretend the iPhone is a small toy car and drive it around in a figure 8, then the heading will do a full 360 degs. The figure 8 helps the accellerator to calculate the rotation.
The way you describe it the iPhone will only be pointed in one direction.
In theory you could also just spind the phone (slowly), but then the accelerator can not assist the calibration.
Re: Compass Calibration
THANK YOU! Good feedback.
Your explaination makes so much more sense!!!!!!!!! I have never calibrated a digital compass the way Apple describes. That is why I was puzzled by their instructions on "how to calibrate."
I researched all the calibration blogs I could find and Googled the heck out of the subject. All I found, that seemed to be the most positive, did it the way I described, but I was not comfortable with it.
It seemed to work, however, on my phone so I went with it. I toyed with holding the phone and turning myself around in a 360 degree circle twice, but didn't try it.
I agree with your accessment though as it makes the most sense, and jibes with my belief of how it should be done. I should have trusted my judgement, and gone with the gut instead of the majority vote of the Googled sites I found!
To make "driving the car" easy without fear of droping the iPhone, layiing it on a non-metalic surface and driving it around the figure-8 course, would be a safe and simple way to do it.
Thanks again for the good feedback.
PS-I just "confused" my phone with a magnet so it popped up the calibration message and then drove the phone around the figure-8. It significantly improved the accuracy of the compass heading by better than 30 degrees. It now is very accurate!
I found the best calibration movie
I found the best calibration method movie on youtube.
Try it!
http://www.youtube.com/watch?v=sP3d00Hr14o
Need to change the heading is right, orientation is not?
The key seems to be
1. rotate the iphone like a steering wheel through 360 degrees, stopping at each 90° orientation for 5 seconds
2. lay it on its belly, then on its back for 5 seconds.
http://www.youtube.com/watch?v=86yUpUt8U6s
Nothing works
I've tried all these suggestions and more and it still is stuck in this state needing calibration.
Notice that others on ios4 seem to have this.
Nothing works
I've tried all these suggestions and more and it still is stuck in this state needing calibration.
Notice that others on ios4 seem to have this.
I encountered the same
I encountered the same problem. I am using iPhone 3GS with OS 4.0.2.
Is it the OS4 issues ?
OS4 3GS
Same problem with mine. Noticed it after upgrade to OS4...
Stuck Compass
wave a real magnet around the iphone and it will release the compass
Stuck iPhone Compass
Thank you 123 - Your advice was the best of all! I finally was able to reset my stuck compass on my iPhone 3GS. Thank you so much!!!
Thanks so much! I'd tried
Thanks so much! I'd tried everything and nothing worked until I got a real magnet and waved it over the compass. It started working again immediately!