In similar circumstances I can whip out my iPhone and not only use its compass but have the map oriented in the direction I'm facing. This is very handy. I just make sure that I don't lose my situational awareness and to have some ne'er-do-well snatch it from me or worse.

This is not to disparage having a backup, non-electronic compass.