home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
SCIENCE
/
AA_51.ZIP
/
DEFLEC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-02-09
|
610b
|
33 lines
/* Correct for light deflection due to solar gravitation.
* AA page B37
*
* SE, pq, etc. were computed earlier by angles.c.
*/
#include "kep.h"
int relativity( p, q, e )
/* unit vector from earth to object:
*/
double p[];
/* heliocentric ecliptic rectangular coordinates
* of earth and object:
*/
double q[], e[];
{
double C;
int i;
C = 1.974e-8/(SE*(1.0+qe));
for( i=0; i<3; i++ )
{
dp[i] = C*(pq*e[i]/SE - ep*q[i]/SO);
p[i] += dp[i];
}
if( prtflg )
printf( "elongation from sun %.2f degrees, ", acos( -ep )/DTR );
showcor( "light defl.", p, dp );
return(0);
}