source: branches/FACT++_part_filenames/pal/palRvgalc.c@ 20020

Last change on this file since 20020 was 18347, checked in by tbretz, 9 years ago
File size: 3.0 KB
Line 
1/*
2*+
3* Name:
4* palRvgalc
5
6* Purpose:
7* Velocity component in a given direction due to the rotation
8* of the Galaxy.
9
10* Language:
11* Starlink ANSI C
12
13* Type of Module:
14* Library routine
15
16* Invocation:
17* double palRvgalc( 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 dynamical LSR motion in direction R2000,D2000 (km/s).
27
28* Description:
29* This function returns the Component of dynamical LSR motion in
30* the direction of R2000,D2000. The result is +ve when the dynamical
31* LSR is receding from the given point on the sky.
32*
33* Notes:
34* - The Local Standard of Rest used here is a point in the
35* vicinity of the Sun which is in a circular orbit around
36* the Galactic centre. Sometimes called the "dynamical" LSR,
37* it is not to be confused with a "kinematical" LSR, which
38* is the mean standard of rest of star catalogues or stellar
39* populations.
40*
41* Reference:
42* - The orbital speed of 220 km/s used here comes from Kerr &
43* Lynden-Bell (1986), MNRAS, 221, p1023.
44
45* Authors:
46* PTW: Pat Wallace (STFC)
47* DSB: David Berry (JAC, Hawaii)
48* {enter_new_authors_here}
49
50* History:
51* 2012-02-16 (DSB):
52* Initial version.
53* Adapted with permission from the Fortran SLALIB library.
54* {enter_further_changes_here}
55
56* Copyright:
57* Copyright (C) 1995 Rutherford Appleton Laboratory
58* Copyright (C) 2012 Science and Technology Facilities Council.
59* All Rights Reserved.
60
61* Licence:
62* This program is free software: you can redistribute it and/or
63* modify it under the terms of the GNU Lesser General Public
64* License as published by the Free Software Foundation, either
65* version 3 of the License, or (at your option) any later
66* version.
67*
68* This program is distributed in the hope that it will be useful,
69* but WITHOUT ANY WARRANTY; without even the implied warranty of
70* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71* GNU Lesser General Public License for more details.
72*
73* You should have received a copy of the GNU Lesser General
74* License along with this program. If not, see
75* <http://www.gnu.org/licenses/>.
76
77* Bugs:
78* {note_any_bugs_here}
79*-
80*/
81
82#include "pal.h"
83#include "pal1sofa.h"
84
85double palRvgalc( double r2000, double d2000 ){
86
87/* Local Variables: */
88 double vb[ 3 ];
89
90/*
91* LSR velocity due to Galactic rotation
92*
93* Speed = 220 km/s
94* Apex = L2,B2 90deg, 0deg
95* = RA,Dec 21 12 01.1 +48 19 47 J2000.0
96*
97* This is expressed in the form of a J2000.0 x,y,z vector:
98*
99* VA(1) = X = -SPEED*COS(RA)*COS(DEC)
100* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC)
101* VA(3) = Z = -SPEED*SIN(DEC)
102*/
103
104 double va[ 3 ] = { -108.70408, +97.86251, -164.33610 };
105
106/* Convert given J2000 RA,Dec to x,y,z. */
107 eraS2c( r2000, d2000, vb );
108
109/* Compute dot product with LSR motion vector. */
110 return eraPdp( va, vb );
111}
Note: See TracBrowser for help on using the repository browser.