Ignore:
Timestamp:
Aug 21, 2005, 12:02:40 PM (20 years ago)
Author:
cmv
Message:

Update de Xephem 3.7 cmv 21/08/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/XephemAstroLib/misc.c

    r2653 r2818  
    180180}
    181181
    182 /* convert ra to ha, in range -PI .. PI.
     182/* convert ra to ha, in range 0..2*PI
    183183 * need dec too if not already apparent.
    184184 */
     
    192192        now_lst (np, &lst);
    193193        ha = hrrad(lst) - ra;
    194         if (ha < -PI) ha += 2*PI;
    195         if (ha >  PI) ha -= 2*PI;
     194        if (ha < 0)
     195            ha += 2*PI;
    196196        *hap = ha;
     197}
     198
     199/* find Greenwich Hour Angle of the given object at the given time, 0..2*PI.
     200 */
     201void
     202gha (Now *np, Obj *op, double *ghap)
     203{
     204        Now n = *np;
     205        Obj o = *op;
     206        double tmp;
     207
     208        n.n_epoch = EOD;
     209        n.n_lng = 0.0;
     210        n.n_lat = 0.0;
     211        obj_cir (&n, &o);
     212        now_lst (&n, &tmp);
     213        tmp = hrrad(tmp) - o.s_ra;
     214        if (tmp < 0)
     215            tmp += 2*PI;
     216        *ghap = tmp;
    197217}
    198218
     
    481501
    482502/* For RCS Only -- Do Not Edit */
    483 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: misc.c,v $ $Date: 2005-03-07 16:47:18 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
     503static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: misc.c,v $ $Date: 2005-08-21 10:02:38 $ $Revision: 1.6 $ $Name: not supported by cvs2svn $"};
Note: See TracChangeset for help on using the changeset viewer.