source: branches/FACT++_lidctrl_usb/pal/palRvlsrd.c@ 19934

Last change on this file since 19934 was 18347, checked in by tbretz, 9 years ago
File size: 3.6 KB
Line 
1/*
2*+
3* Name:
4* palRvlsrd
5
6* Purpose:
7* Velocity component in a given direction due to the Sun's motion
8* with respect to the dynamical Local Standard of Rest.
9
10* Language:
11* Starlink ANSI C
12
13* Type of Module:
14* Library routine
15
16* Invocation:
17* double palRvlsrd( double r2000, double d2000 )
18
19* Arguments:
20* r2000 = double (Given)
21* J2000.0 mean RA (radians)
22* d2000 = double (Given)
23* J2000.0 mean Dec (radians)
24
25* Returned Value:
26* Component of "peculiar" solar motion in direction R2000,D2000 (km/s).
27
28* Description:
29* This function returns the velocity component in a given direction
30* due to the Sun's motion with respect to the dynamical Local Standard
31* of Rest. The result is +ve when the Sun is receding from the given
32* point on the sky.
33
34* Notes:
35* - The Local Standard of Rest used here is the "dynamical" LSR,
36* a point in the vicinity of the Sun which is in a circular orbit
37* around the Galactic centre. The Sun's motion with respect to the
38* dynamical LSR is called the "peculiar" solar motion.
39* - There is another type of LSR, called a "kinematical" LSR. A
40* kinematical LSR is the mean standard of rest of specified star
41* catalogues or stellar populations, and several slightly different
42* kinematical LSRs are in use. The Sun's motion with respect to an
43* agreed kinematical LSR is known as the "standard" solar motion.
44* To obtain a radial velocity correction with respect to an adopted
45* kinematical LSR use the routine palRvlsrk.
46
47* Reference:
48* - Delhaye (1965), in "Stars and Stellar Systems", vol 5, p73.
49
50* Authors:
51* PTW: Pat Wallace (STFC)
52* DSB: David Berry (JAC, Hawaii)
53* {enter_new_authors_here}
54
55* History:
56* 2012-02-16 (DSB):
57* Initial version.
58* Adapted with permission from the Fortran SLALIB library.
59* {enter_further_changes_here}
60
61* Copyright:
62* Copyright (C) 1995 Rutherford Appleton Laboratory
63* Copyright (C) 2012 Science and Technology Facilities Council.
64* All Rights Reserved.
65
66* Licence:
67* This program is free software: you can redistribute it and/or
68* modify it under the terms of the GNU Lesser General Public
69* License as published by the Free Software Foundation, either
70* version 3 of the License, or (at your option) any later
71* version.
72*
73* This program is distributed in the hope that it will be useful,
74* but WITHOUT ANY WARRANTY; without even the implied warranty of
75* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76* GNU Lesser General Public License for more details.
77*
78* You should have received a copy of the GNU Lesser General
79* License along with this program. If not, see
80* <http://www.gnu.org/licenses/>.
81
82* Bugs:
83* {note_any_bugs_here}
84*-
85*/
86
87#include "pal.h"
88#include "pal1sofa.h"
89
90double palRvlsrd( double r2000, double d2000 ){
91
92/* Local Variables: */
93 double vb[ 3 ];
94
95/*
96* Peculiar solar motion from Delhaye 1965: in Galactic Cartesian
97* coordinates (+9,+12,+7) km/s. This corresponds to about 16.6 km/s
98* towards Galactic coordinates L2 = 53 deg, B2 = +25 deg, or RA,Dec
99* 17 49 58.7 +28 07 04 J2000.
100*
101* The solar motion is expressed here in the form of a J2000.0
102* equatorial Cartesian vector:
103*
104* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
105* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
106* VA(3) = Z = -SPEED*SIN(DEC)
107*/
108
109 double va[ 3 ] = { +0.63823, +14.58542, -7.80116 };
110
111/* Convert given J2000 RA,Dec to x,y,z. */
112 eraS2c( r2000, d2000, vb );
113
114/* Compute dot product with Solar motion vector. */
115 return eraPdp( va, vb );
116}
Note: See TracBrowser for help on using the repository browser.