192 #ifdef __STDC_VERSION__ 193 # if (__STDC_VERSION__ >= 199901L) 194 # define HAVE_COPYSIGN 1 207 # define COPYSIGN copysign 209 # define COPYSIGN(a,b) DSIGN(a,b) 212 void palPertue(
double date,
double u[13],
int *jstat ) {
215 const double RNE=1.0;
218 const double COINC=0.0001;
221 const double TSC=1e-4;
224 const double TSMIN = 0.01;
225 const double TSMAX = 10.0;
228 const double AGEPMO=5.0;
231 const double AGEPEL=50.0;
234 const double TINY=1e-6;
237 const double AGEBEL=100.0;
298 double VB[3],PB[3],VH[3],PE[3];
332 double DELTA[3],DELTA3;
336 double R2,W,DT,DT2,R,FT;
340 const double AMAS[10] = {
341 6023600., 408523.5, 328900.5, 3098710.,
342 1047.355, 3498.5, 22869., 19314.,
343 332946.038, 27068709.
353 for (I=0; I<13; I++) {
365 if (fabs(TSPAN) > 36525.0) *jstat=101;
374 for (I=0; I<3; I++) {
384 while (FB*TLEFT > 0.0) {
391 for (I=0; I<3; I++) {
408 if (fabs(TS) > fabs(TLEFT)) TS=TLEFT;
415 if (FIRST || fabs(T-TPEL)-AGEPEL >= TINY) {
421 for (NP=1; NP<=8; NP++) {
432 palPv2ue(PV,TPEL,0.0,&(UP[NP-1][0]),&J);
433 if (J != 0)
goto ABORT;
438 if (FIRST || fabs(T-TPMO)-AGEPMO >= TINY) {
444 for (NP=1; NP<=8; NP++) {
447 palUe2pv(TPMO,&(UP[NP-1][0]),&(PVIN[NP-1][0]),&J);
448 if (J != 0)
goto ABORT;
451 for (J=3; J<6; J++) {
452 PVIN[NP-1][J] = PVIN[NP-1][J]*
PAL__SPD;
457 for (I=0; I<3; I++) {
462 GC[NP-1] = GCON2/(2.0*R2*sqrt(R2));
471 if (J != 0)
goto ABORT;
475 for (I=0; I<3; I++) {
476 W = PV0[I]+PERP[I]+(PERV[I]+PERA[I]*HTS/2.0)*HTS;
484 for (I=0; I<3; I++) {
491 for (I=0; I<3; I++) {
492 FI[I] = PV0[I]/R03-PV[I]/R3;
506 for (NP=1; NP<10; NP++) {
513 for (J=3; J<6; J++) {
514 W = PVIN[NP-1][J]*DT;
519 FC = 1.0+R2/R2X3[NP-1];
522 FG = 1.0-GC[NP-1]*DT2;
525 for (I=0; I<3; I++) {
526 RHO[I] = FG*(PVIN[NP-1][I]+FC*PVIN[NP-1][I+3]*DT);
537 for (I=0; I<3; I++) {
547 for (I=0; I<3; I++) {
548 RHO[I] = PM[I]+PE[I];
558 for (I=0; I<3; I++) {
567 for (I=0; I<3; I++) {
575 if (NP == 3 && R < RNE) NE = 1;
578 if ( ! (NE && NP == 3) ) {
589 for (I=0; I<3; I++) {
590 FD[I] = FD[I]+(DELTA[I]/DELTA3-RHO[I]/RHO3)/W;
599 for (I=0; I<3; I++) {
600 W = (FI[I]+FD[I])*GCON2;
602 PERP[I] = PERP[I]+(PERV[I]+FT/2.0)*TS;
603 PERV[I] = PERV[I]+FT;
611 if (fabs(RTN) >= AGEBEL || FB*TLEFT <= 0.0) {
619 if (J != 0)
goto ABORT;
622 for (I=0; I<3; I++) {
624 PV[I] = PV0[I]+PERP[I];
628 PERA[I] = FD[I]*GCON2;
633 if (J != 0)
goto ABORT;
644 for (I=0; I<13; I++) {
void palPertue(double date, double u[13], int *jstat)
void palPrec(double ep0, double ep1, double rmatp[3][3])
double palEpj(double date)
void palPv2ue(const double pv[6], double date, double pmass, double u[13], int *jstat)
static const double PAL__GCON
void palDmoon(double date, double pv[6])
void palEpv(double date, double ph[3], double vh[3], double pb[3], double vb[3])
void eraRxp(double r[3][3], double p[3], double rp[3])
void palPlanet(double date, int np, double pv[6], int *j)
static const double PAL__SPD
void palUe2pv(double date, double u[13], double pv[], int *jstat)