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/testxephem.c

    r2395 r2551  
    44#include <math.h>
    55#include <unistd.h>
    6 #include "P_.h"
     6/* include "P_.h" */
    77#include "astro.h"
    88
     
    1111int main(int narg,char** arg)
    1212{
    13   int year=1989,month=7,day=21; /* UTC*/
     13 int year=1989,month=7,day=21; /* UTC*/
    1414 double hour=12.5;
    1515 int npnum=8, pnum[8]={MERCURY,VENUS,MARS,JUPITER,SATURN,URANUS,NEPTUNE,PLUTO};
    1616 int i;
    17  double mjd,sunecl,sunecb,sundist,geodist,geoecl,geoecb,diamang,mag,msp,mdp;
     17 double mymjd,sunecl,sunecb,sundist,geodist,geoecl,geoecb,diamang,mag,msp,mdp;
    1818
    19  cal_mjd(month,day+hour/24.,year,&mjd);
    20  printf("date %d/%d/%d %gh  -> mjd=%f\n",day,month,year,hour,mjd);
     19 cal_mjd(month,day+hour/24.,year,&mymjd);
     20 printf("date %d/%d/%d %gh  -> mjd=%f\n",day,month,year,hour,mymjd);
    2121
    2222 /* Soleil */
    23  sunpos(mjd,&geoecl,&geodist,&geoecb);
     23 sunpos(mymjd,&geoecl,&geodist,&geoecb);
    2424 printf("Sun: geo ecl=%g ecb=%g dist=%g\n",geoecl*R2D,geoecb*R2D,geodist);
    2525
    2626 /* Lune */
    27  moon(mjd,&geoecl,&geoecb,&geodist,&msp,&mdp);
     27 moon(mymjd,&geoecl,&geoecb,&geodist,&msp,&mdp);
    2828 printf("Moon: geo ecl=%g ecb=%g dist=%g\n",geoecl*R2D,geoecb*R2D,geodist);
    2929
     
    3131 printf("--- Planets\n");
    3232 for(i=0;i<npnum;i++) {
    33    plans(mjd,pnum[i],&sunecl,&sunecb,&sundist,&geodist,&geoecl,&geoecb,&diamang,&mag);
     33   plans(mymjd,pnum[i],&sunecl,&sunecb,&sundist,&geodist,&geoecl,&geoecb,&diamang,&mag);
    3434   printf("pnum=%d: sun ecl=%g ecb=%g dist=%g,",pnum[i],sunecl*R2D,sunecb*R2D,sundist);
    3535   printf(" geo ecl=%g ecb=%g dist=%g,",geoecl*R2D,geoecb*R2D,geodist);
Note: See TracChangeset for help on using the changeset viewer.