added function to test for visibility (for use underground?)