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

Last change on this file since 2896 was 2818, checked in by cmv, 20 years ago

Update de Xephem 3.7 cmv 21/08/2005

File size: 782 bytes
RevLine 
[1457]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
[2551]11airmass (
12double aa, /* apparent altitude, rads */
13double *Xp) /* airmasses */
[1457]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 */
[2818]26static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: airmass.c,v $ $Date: 2005-08-21 10:02:36 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.