Distance To Horizon Calculator Coded in AngularJS

How far is the horizon? How far until the earth curves?

Your height:
Feet
Inches
Feet Above Ground (~10 feet per floor)
*In a tall building or hotel? Multiply floor # by 10. Then subtract 10.

The horizon is {{ (1.2246 * (squareRoot((inputUserHeightFeet + (inputUserHeightInches / 12) + inputFloorHeight)))) | number : 2 }} miles away. At this point, the earth is no longer visible because of the curve.

Horizon Distance Formula
Distance (in miles) = 1.2246 * √height
You are {{ inputUserHeightFeet }}' {{ inputUserHeightInches }}" and {{ inputFloorHeight }} feet above ground.
Height (in feet @ eye level) = {{ ((inputUserHeightFeet + (inputUserHeightInches / 12) + inputFloorHeight)) | number : 2 }}

How Does It Work?

A user inputs their height in feet and inches. Also, they input their feet above the ground. The inches in height are divided by 12 and added to the height in feet of the person. Next, you add that to the amount of feet above ground. This is your total height. Then you will find the square root and multiply it by 1.2246.

If you are stranded and swimming in the ocean, the height of your eyes will only be 6 inches to 1 foot. This will only allow you to see about 1 mile away. People will likely see you before you see them.

A distance to horizon calculator coded in AngularJS. This is an example of a Single-Page App (SPA) that can automatically update the display on the front end without the need of communicating with a server.

Connect
Copyright © Ray Sanchez. All Rights Reserved.