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

Last change on this file since 1681 was 1457, checked in by cmv, 24 years ago

import de la partie libastro de Xephem cmv+rz 10/4/2001

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