Ignore:
Timestamp:
Jun 15, 2004, 6:54:12 PM (21 years ago)
Author:
cmv
Message:

nouvelle version de xephem/libastro (3.6) cmv 15/6/04

File:
1 edited

Legend:

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

    r1719 r2551  
    11#include <math.h>
    22
    3 #include "P_.h"
     3#include <stdio.h>
     4
    45#include "astro.h"
    56
    6 /* convert those orbital elements that change from epoch mjd0 to epoch mjd.
     7/* convert those orbital elements that change from epoch mj0 to epoch mj.
    78 */
    89void
    9 reduce_elements (mjd0, mjd, inc0, ap0, om0, inc, ap, om)
    10 double mjd0;    /* initial epoch */
    11 double mjd;     /* desired epoch */
    12 double inc0;    /* initial inclination, rads */
    13 double ap0;     /* initial argument of perihelion, as an mjd */
    14 double om0;     /* initial long of ascending node, rads */
    15 double *inc;    /* desired inclination, rads */
    16 double *ap;     /* desired epoch of perihelion, as an mjd */
    17 double *om;     /* desired long of ascending node, rads */
     10reduce_elements (
     11double mj0,     /* initial epoch */
     12double mj,      /* desired epoch */
     13double inc0,    /* initial inclination, rads */
     14double ap0,     /* initial argument of perihelion, as an mj */
     15double om0,     /* initial long of ascending node, rads */
     16double *inc,    /* resultant inclination, rads */
     17double *ap,     /* resultant arg of perihelion, as an mj */
     18double *om)     /* resultant long of ascending node, rads */
    1819{
    1920        double t0, t1;
     
    2627        double seta, ceta;
    2728
    28         if (fabs(mjd - mjd0) < 1e-5) {
     29        if (fabs(mj - mj0) < 1e-5) {
    2930            /* sin(eta) blows for inc < 10 degrees -- anyway, no need */
    3031            *inc = inc0;
     
    3435        }
    3536
    36         t0 = mjd0/365250.0;
    37         t1 = mjd/365250.0;
     37        t0 = mj0/365250.0;
     38        t1 = mj/365250.0;
    3839
    3940        tt = t1-t0;
     
    7576
    7677/* For RCS Only -- Do Not Edit */
    77 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 2001-10-22 12:08:27 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
     78static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Note: See TracChangeset for help on using the changeset viewer.