Solving for height using trigonometric functions