RE: Lesson Learned the Hard Way: Compass
What GPS do you have? I always use one of my GPS units and they have never failed me. Although I usally have a prety good sense of direction so I rarely need them. Some GPS units you have to be moving for the compass to work correctly and others will work while standing still. If you have a Garmin with the built in compass all you have to do to calibrate it is go to the menu page and calibrate compass and turn around two times.
From the story it sounds like you have a unit that the compass only works when you are moving. Or the unit really screwed up. Glad you made it out ok!