source: trunk/MagicSoft/slalib/pm.c@ 19935

Last change on this file since 19935 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaPm ( double r0, double d0, double pr, double pd,
4 double px, double rv, double ep0, double ep1,
5 double *r1, double *d1 )
6/*
7** - - - - - -
8** s l a P m
9** - - - - - -
10**
11** Apply corrections for proper motion to a star RA,Dec.
12**
13** (double precision)
14**
15** References:
16** 1984 Astronomical Almanac, pp B39-B41.
17** (also Lederle & Schwan, Astron. Astrophys. 134, 1-6, 1984)
18**
19** Given:
20** r0,d0 double RA,Dec at epoch ep0 (rad)
21** pr,pd double proper motions: RA,Dec changes per year of epoch
22** px double parallax (arcsec)
23** rv double radial velocity (km/sec, +ve if receding)
24** ep0 double start epoch in years (e.g Julian epoch)
25** ep1 double end epoch in years (same system as ep0)
26**
27** Returned:
28** *r1,*d1 double RA,Dec at epoch ep1 (rad)
29**
30** Notes:
31**
32** 1 The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt,
33** and are in the same coordinate system as R0,D0.
34**
35** 2 If the available proper motions are pre-FK5 they will be per
36** tropical year rather than per Julian year, and so the epochs
37** must both be Besselian rather than Julian. In such cases, a
38** scaling factor of 365.2422D0/365.25D0 should be applied to the
39** radial velocity before use.
40**
41** Called: slaDcs2c, slaDcc2s, slaDranrm
42**
43** Defined in slamac.h: DAS2R
44**
45** Last revision: 19 January 2000
46**
47** Copyright P.T.Wallace. All rights reserved.
48*/
49{
50/* Km/s to AU/year multiplied by arc seconds to radians */
51 static double vfr = ( 365.25 * 86400.0 / 149597870.0 ) * DAS2R;
52
53 int i;
54 double w, em[3], t, p[3];
55
56/* Spherical to Cartesian */
57 slaDcs2c ( r0, d0, p );
58
59/* Space motion (radians per year) */
60 w = vfr * rv * px;
61 em[0] = - pr * p[1] - pd * cos ( r0 ) * sin ( d0 ) + w * p[0];
62 em[1] = pr * p[0] - pd * sin ( r0 ) * sin ( d0 ) + w * p[1];
63 em[2] = pd * cos ( d0 ) + w * p[2];
64
65/* Apply the motion */
66 t = ep1 - ep0;
67 for ( i = 0; i < 3; i++ )
68 p[i] = p[i] + (t * em[i]);
69
70/* Cartesian to spherical */
71 slaDcc2s ( p, r1, d1 );
72 *r1 = slaDranrm ( *r1 );
73}
Note: See TracBrowser for help on using the repository browser.