starpv.c | starpv.c | |||
---|---|---|---|---|
skipping to change at line 145 | skipping to change at line 145 | |||
od = 0.0, odel = 0.0; /* warnings */ | od = 0.0, odel = 0.0; /* warnings */ | |||
/* Distance (AU). */ | /* Distance (AU). */ | |||
if (px >= PXMIN) { | if (px >= PXMIN) { | |||
w = px; | w = px; | |||
iwarn = 0; | iwarn = 0; | |||
} else { | } else { | |||
w = PXMIN; | w = PXMIN; | |||
iwarn = 1; | iwarn = 1; | |||
} | } | |||
r = DR2AS / w; | r = ERFA_DR2AS / w; | |||
/* Radial velocity (AU/day). */ | /* Radial velocity (AU/day). */ | |||
rd = DAYSEC * rv * 1e3 / DAU; | rd = ERFA_DAYSEC * rv * 1e3 / ERFA_DAU; | |||
/* Proper motion (radian/day). */ | /* Proper motion (radian/day). */ | |||
rad = pmr / DJY; | rad = pmr / ERFA_DJY; | |||
decd = pmd / DJY; | decd = pmd / ERFA_DJY; | |||
/* To pv-vector (AU,AU/day). */ | /* To pv-vector (AU,AU/day). */ | |||
eraS2pv(ra, dec, r, rad, decd, rd, pv); | eraS2pv(ra, dec, r, rad, decd, rd, pv); | |||
/* If excessive velocity, arbitrarily set it to zero. */ | /* If excessive velocity, arbitrarily set it to zero. */ | |||
v = eraPm(pv[1]); | v = eraPm(pv[1]); | |||
if (v / DC > VMAX) { | if (v / ERFA_DC > VMAX) { | |||
eraZp(pv[1]); | eraZp(pv[1]); | |||
iwarn += 2; | iwarn += 2; | |||
} | } | |||
/* Isolate the radial component of the velocity (AU/day). */ | /* Isolate the radial component of the velocity (AU/day). */ | |||
eraPn(pv[0], &w, x); | eraPn(pv[0], &w, x); | |||
vsr = eraPdp(x, pv[1]); | vsr = eraPdp(x, pv[1]); | |||
eraSxp(vsr, x, usr); | eraSxp(vsr, x, usr); | |||
/* Isolate the transverse component of the velocity (AU/day). */ | /* Isolate the transverse component of the velocity (AU/day). */ | |||
eraPmp(pv[1], usr, ust); | eraPmp(pv[1], usr, ust); | |||
vst = eraPm(ust); | vst = eraPm(ust); | |||
/* Special-relativity dimensionless parameters. */ | /* Special-relativity dimensionless parameters. */ | |||
betsr = vsr / DC; | betsr = vsr / ERFA_DC; | |||
betst = vst / DC; | betst = vst / ERFA_DC; | |||
/* Determine the inertial-to-observed relativistic correction terms. */ | /* Determine the inertial-to-observed relativistic correction terms. */ | |||
bett = betst; | bett = betst; | |||
betr = betsr; | betr = betsr; | |||
for (i = 0; i < IMAX; i++) { | for (i = 0; i < IMAX; i++) { | |||
d = 1.0 + betr; | d = 1.0 + betr; | |||
del = sqrt(1.0 - betr*betr - bett*bett) - 1.0; | del = sqrt(1.0 - betr*betr - bett*bett) - 1.0; | |||
betr = d * betsr + del; | betr = d * betsr + del; | |||
bett = d * betst; | bett = d * betst; | |||
if (i > 0) { | if (i > 0) { | |||
End of changes. 5 change blocks. | ||||
7 lines changed or deleted | 7 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |