This digital compass may be the closest to possibly working for cave survey that I have seen. LINK
Says it's waterproof, accurate to +-.5 degrees. Pretty costly: ~$300, but for big projects where accuracy is important, this may work. Anyone seen/tried one?