Air mass: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: added the computer programming language REXX.)
m (changed cruising to orbiting, added hightlighting and whitespace, added a ;Task: section header,)
Line 3: Line 3:
In astronomy '''air mass''' is a measure of the amount of atmosphere between the observer and the object being observed. It is a function of the ''zenith angle'' (the angle between the line of sight an vertical) and the altitude of the observer. It is defined as the integral of the atmospheric density along the line of sight and is usually expressed relative to the air mass at zenith. Thus, looking straight up gives an air mass of one (regardless of observer's altitude) and viewing at any zenith angle greater than zero gives higher values.
In astronomy '''air mass''' is a measure of the amount of atmosphere between the observer and the object being observed. It is a function of the ''zenith angle'' (the angle between the line of sight an vertical) and the altitude of the observer. It is defined as the integral of the atmospheric density along the line of sight and is usually expressed relative to the air mass at zenith. Thus, looking straight up gives an air mass of one (regardless of observer's altitude) and viewing at any zenith angle greater than zero gives higher values.


Write a function that calculates the air mass for an observer at a given altitude ''a'' above sea level and zenith angle ''z''.


For this task you can assume:

For this exercise you can assume:
* The density of Earth's atmosphere is proportional to exp(-a/8500 metres)
* The density of Earth's atmosphere is proportional to exp(-a/8500 metres)
* The Earth is a perfect sphere of radius 6731 km.
* The Earth is a perfect sphere of radius 6731 km.




;Task:
Show the air mass for zenith angles 0 to 90 in steps of 5 degrees for an observer at sea level. Do the same for the SOFIA infrared telescope, which has a cruising altitude of 13,700 m.
:*   Write a function that calculates the air mass for an observer at a given altitude   ''a''   above sea level and zenith angle   ''z''.
:*   Show the air mass for zenith angles '''0''' to '''90''' in steps of '''5''' degrees for an observer at sea level.
:*   Do the same for the SOFIA infrared telescope, which has an orbiting altitude of 13,700 meters.
<br><br>
<br><br>