Changeset 18712 for trunk/FACT++/pal/palMapqkz.c
- Timestamp:
- 01/06/17 11:51:27 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/pal/palMapqkz.c
r18347 r18712 25 25 * Star-independent mean-to-apparent parameters (see palMappa): 26 26 * (0-3) not used 27 * (4-6) not used27 * (4-6) heliocentric direction of the Earth (unit vector) 28 28 * (7) not used 29 29 * (8-10) abv: barycentric Earth velocity in units of c 30 * (11) sqrt(1-v **2) where v=modulus(abv)30 * (11) sqrt(1-v^2) where v=modulus(abv) 31 31 * (12-20) precession/nutation (3,3) matrix 32 32 * ra = double * (Returned) … … 50 50 * The corresponding function for the case of non-zero parallax 51 51 * and proper motion is palMapqk. 52 * 53 * The reference systems and timescales used are IAU 2006. 54 * 55 * Strictly speaking, the function is not valid for solar-system 56 * sources, though the error will usually be extremely small. 52 53 * Notes: 54 * - The reference systems and timescales used are IAU 2006. 55 * - The mean place rm, dm and the vectors amprms[1-3] and amprms[4-6] 56 * are referred to the mean equinox and equator of the epoch 57 * specified when generating the precession/nutation matrix 58 * amprms[12-20]. In the call to palMappa (q.v.) normally used 59 * to populate amprms, this epoch is the first argument (eq). 60 * - The vector amprms(4-6) is referred to the mean equinox and 61 * equator of epoch eq. 62 * - Strictly speaking, the routine is not valid for solar-system 63 * sources, though the error will usually be extremely small. 64 * However, to prevent gross errors in the case where the 65 * position of the Sun is specified, the gravitational 66 * deflection term is restrained within about 920 arcsec of the 67 * centre of the Sun's disc. The term has a maximum value of 68 * about 1.85 arcsec at this radius, and decreases to zero as 69 * the centre of the disc is approached. 57 70 58 71 * Authors: … … 100 113 /* Local Variables: */ 101 114 int i; 102 double ab1, abv[3], p[3], w, p1dv, p1dvp1, p2[3], p3[3]; 115 double ab1, abv[3], p[3], w, p1dv, p2[3], p3[3]; 116 double gr2e, pde, pdep1, ehn[3], p1[3]; 103 117 104 118 /* Unpack scalar and vector parameters. */ 105 119 ab1 = amprms[11]; 120 gr2e = amprms[7]; 106 121 for( i = 0; i < 3; i++ ) { 107 122 abv[i] = amprms[i+8]; 123 ehn[i] = amprms[i+4]; 108 124 } 109 125 … … 111 127 eraS2c( rm, dm, p ); 112 128 129 /* Light deflection (restrained within the Sun's disc) */ 130 pde = eraPdp( p, ehn ); 131 pdep1 = pde + 1.0; 132 w = gr2e / ( pdep1 > 1.0e-5 ? pdep1 : 1.0e-5 ); 133 for( i = 0; i < 3; i++) { 134 p1[i] = p[i] + w * ( ehn[i] - pde * p[i] ); 135 } 136 113 137 /* Aberration. */ 114 p1dv = eraPdp( p, abv ); 115 p1dvp1 = p1dv + 1.0; 138 p1dv = eraPdp( p1, abv ); 116 139 w = 1.0 + p1dv / ( ab1 + 1.0 ); 117 140 for( i = 0; i < 3; i++ ) { 118 p2[i] = ( ( ab1 * p [i] ) + ( w * abv[i] ) ) / p1dvp1;141 p2[i] = ( ( ab1 * p1[i] ) + ( w * abv[i] ) ); 119 142 } 120 143
Note:
See TracChangeset
for help on using the changeset viewer.