Distance to the Horizon assignment

# Distance to the Horizon assignment - Distance to the...

This preview shows pages 1–2. Sign up to view the full content.

Distance to the Horizon If you are looking across a flat landscape or across water such as Lake Michigan or an ocean, the distance to the horizon line depends on how far above the ground your observation point is. If you measure your height above ground (sea) level in feet, the formula is: distance in miles = (square root of height in feet) times 1.225 For example, a person whose eyes are five feet from the ground would see 2.7 miles. The square root of 5 is 2.236, and 2.236 times 1.23 is 2.74. If you climb a 100 ft. tower, you'd be able to see 12.3 miles. The square root of 100 is 10, and 10 times 1.225 is 12.25. The Assignment Write a PHP program that receives an observation height in feet in the querystring, and replies with a web page telling the distance to the horizon. Here's a sample of how the program should work. You will type a URL like this in the browser: http://cis3.elgin.edu/loginname/horizon.php?height=1353 And your program should respond with a web page that says this:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

Distance to the Horizon assignment - Distance to the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online