The compass on the 3GS works in airplane mode, so no outside info required (beyond the magnetic field).
So far, I've found my 3GS compass function to often be less accurate than it would appear from the specific degree readings it provides. For example, it has put true North in a different place on multiple sequential trials (not a whole lot different [25 degrees or so], but enough to mess you up if you're trying to identify an exit on a roundabout with a lot of exits and no signs). Inexplicably, mine (at least) does get better over time with trials in the same location.
My $8 pocket compass is very consistent, if not very specific.