| 
            Last change
 on this file since 3689 was             3654, checked in by cmv, 16 years ago           | 
        
        
          | 
             
mise a niveau Xephem 3.7.4, cmv 16/07/2009 
 
           | 
        
        
          | 
            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 |  */
 | 
|---|
| 10 | void
 | 
|---|
| 11 | airmass (
 | 
|---|
| 12 | double aa,              /* apparent altitude, rads */
 | 
|---|
| 13 | double *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 */
 | 
|---|
| 26 | static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: airmass.c,v $ $Date: 2009-07-16 10:34:35 $ $Revision: 1.8 $ $Name: not supported by cvs2svn $"};
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.