FACT++  1.0
void palFk45z ( double  r1950,
double  d1950,
double  bepoch,
double *  r2000,
double *  d2000 
)

Definition at line 124 of file palFk45z.c.

References eraAnp(), eraC2s(), eraS2c(), i, PAL__PMF, palEpb2d(), and palEpj().

Referenced by t_fk45z().

125  {
126 
127 /* Local Variables: */
128  double w;
129  int i;
130  int j;
131  double r0[3], a1[3], v1[3], v2[6]; /* Position and position+velocity vectors */
132 
133 
134 /* CANONICAL CONSTANTS (see references) */
135 
136 /* Vector A. */
137  double a[3] = { -1.62557E-6, -0.31919E-6, -0.13843E-6 };
138 
139 /* Vectors Adot. */
140  double ad[3] = { 1.245E-3, -1.580E-3, -0.659E-3 };
141 
142 /* Matrix M (only half of which is needed here). */
143  double em[6][3] = { {0.9999256782, -0.0111820611, -0.0048579477},
144  {0.0111820610, 0.9999374784, -0.0000271765},
145  {0.0048579479, -0.0000271474, 0.9999881997},
146  {-0.000551, -0.238565, 0.435739},
147  {0.238514, -0.002667, -0.008541},
148  {-0.435623, 0.012254, 0.002117} };
149 
150 
151 /* Spherical to Cartesian. */
152  eraS2c( r1950, d1950, r0 );
153 
154 /* Adjust vector A to give zero proper motion in FK5. */
155  w = ( bepoch - 1950.0 )/PAL__PMF;
156  for( i = 0; i < 3; i++ ) {
157  a1[ i ] = a[ i ] + w*ad[ i ];
158  }
159 
160 /* Remove e-terms. */
161  w = r0[ 0 ]*a1[ 0 ] + r0[ 1 ]*a1[ 1 ] + r0[ 2 ]*a1[ 2 ];
162  for( i = 0; i < 3; i++ ) {
163  v1[ i ] = r0[ i ] - a1[ i ] + w*r0[ i ];
164  }
165 
166 /* Convert position vector to Fricke system. */
167  for( i = 0; i < 6; i++ ) {
168  w = 0.0;
169  for( j = 0; j < 3; j++ ) {
170  w += em[ i ][ j ]*v1[ j ];
171  }
172  v2[ i ] = w;
173  }
174 
175 /* Allow for fictitious proper motion in FK4. */
176  w = ( palEpj( palEpb2d( bepoch ) ) - 2000.0 )/PAL__PMF;
177  for( i = 0; i < 3; i++ ) {
178  v2[ i ] += w*v2[ i + 3 ];
179  }
180 
181 /* Revert to spherical coordinates. */
182  eraC2s( v2, &w, d2000 );
183  *r2000 = eraAnp( w );
184 }
double palEpj(double date)
Definition: palOne2One.c:1169
int i
Definition: db_dim_client.c:21
void eraS2c(double theta, double phi, double c[3])
Definition: s2c.c:3
double w
Definition: palObs.c:168
void eraC2s(double p[3], double *theta, double *phi)
Definition: c2s.c:3
#define PAL__PMF
Definition: palmac.h:110
double eraAnp(double a)
Definition: anp.c:3
double palEpb2d(double epb)
Definition: palOne2One.c:1129

+ Here is the call graph for this function:

+ Here is the caller graph for this function: