IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8642


Ignore:
Timestamp:
Aug 27, 2006, 1:28:37 PM (20 years ago)
Author:
eugene
Message:

attempt to optimize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/airmass.c

    r5347 r8642  
    1010
    1111  double hour, cosz, secz;
     12  double rdec, rlat;
    1213
    1314  if (!AirmassQuality) return (secz_image);
     
    1718
    1819  /* hour : hour angle in degrees */
     20  rdec = RAD_DEG*dec;
     21  rlat = RAD_DEG*latitude;
    1922  hour = 15.0*st - ra;
    20   cosz = sin (RAD_DEG*dec) * sin (RAD_DEG*latitude) + cos (RAD_DEG*dec) * cos (RAD_DEG*hour) * cos (RAD_DEG*latitude);
     23  cosz = sin (rdec) * sin (rlat) + cos (rdec) * cos (RAD_DEG*hour) * cos (rlat);
    2124  secz = 1.000 / cosz;
    2225  return (secz);
Note: See TracChangeset for help on using the changeset viewer.