source: Sophya/trunk/SophyaExt/XephemAstroLib/airmass.c@ 2723

Last change on this file since 2723 was 2643, checked in by cmv, 21 years ago

update pour version 3.6.3 Xephem cmv 17/01/04

File size: 782 bytes
Line 
1#include <math.h>
2
3#include "astro.h"
4
5/* given apparent altitude find airmass.
6 * R.H. Hardie, 1962, `Photoelectric Reductions', Chapter 8 of Astronomical
7 * Techniques, W.A. Hiltner (Ed), Stars and Stellar Systems, II (University
8 * of Chicago Press: Chicago), pp178-208.
9 */
10void
11airmass (
12double aa, /* apparent altitude, rads */
13double *Xp) /* airmasses */
14{
15 double sm1; /* secant zenith angle, minus 1 */
16
17 /* degenerate near or below horizon */
18 if (aa < degrad(3.0))
19 aa = degrad(3.0);
20
21 sm1 = 1.0/sin(aa) - 1.0;
22 *Xp = 1.0 + sm1*(0.9981833 - sm1*(0.002875 + 0.0008083*sm1));
23}
24
25/* For RCS Only -- Do Not Edit */
26static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: airmass.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.