Added in the code to find the visual horizon (working)