line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
*+ |
3
|
|
|
|
|
|
|
* Name: |
4
|
|
|
|
|
|
|
* palRvlg |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
* Purpose: |
7
|
|
|
|
|
|
|
* Velocity component in a given direction due to Galactic rotation |
8
|
|
|
|
|
|
|
* and motion of the local group. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
* Language: |
11
|
|
|
|
|
|
|
* Starlink ANSI C |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
* Type of Module: |
14
|
|
|
|
|
|
|
* Library routine |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
* Invocation: |
17
|
|
|
|
|
|
|
* double palRvlg( 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 SOLAR motion in direction R2000,D2000 (km/s). |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
* Description: |
29
|
|
|
|
|
|
|
* This function returns the velocity component in a given |
30
|
|
|
|
|
|
|
* direction due to the combination of the rotation of the |
31
|
|
|
|
|
|
|
* Galaxy and the motion of the Galaxy relative to the mean |
32
|
|
|
|
|
|
|
* motion of the local group. The result is +ve when the Sun |
33
|
|
|
|
|
|
|
* is receding from the given point on the sky. |
34
|
|
|
|
|
|
|
* |
35
|
|
|
|
|
|
|
* Reference: |
36
|
|
|
|
|
|
|
* - IAU Trans 1976, 168, p201. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
* Authors: |
39
|
|
|
|
|
|
|
* PTW: Pat Wallace (STFC) |
40
|
|
|
|
|
|
|
* DSB: David Berry (JAC, Hawaii) |
41
|
|
|
|
|
|
|
* {enter_new_authors_here} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
* History: |
44
|
|
|
|
|
|
|
* 2012-02-16 (DSB): |
45
|
|
|
|
|
|
|
* Initial version. |
46
|
|
|
|
|
|
|
* Adapted with permission from the Fortran SLALIB library. |
47
|
|
|
|
|
|
|
* {enter_further_changes_here} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
* Copyright: |
50
|
|
|
|
|
|
|
* Copyright (C) 1995 Rutherford Appleton Laboratory |
51
|
|
|
|
|
|
|
* Copyright (C) 2012 Science and Technology Facilities Council. |
52
|
|
|
|
|
|
|
* All Rights Reserved. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
* Licence: |
55
|
|
|
|
|
|
|
* This program is free software: you can redistribute it and/or |
56
|
|
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public |
57
|
|
|
|
|
|
|
* License as published by the Free Software Foundation, either |
58
|
|
|
|
|
|
|
* version 3 of the License, or (at your option) any later |
59
|
|
|
|
|
|
|
* version. |
60
|
|
|
|
|
|
|
* |
61
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful, |
62
|
|
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
63
|
|
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
64
|
|
|
|
|
|
|
* GNU Lesser General Public License for more details. |
65
|
|
|
|
|
|
|
* |
66
|
|
|
|
|
|
|
* You should have received a copy of the GNU Lesser General |
67
|
|
|
|
|
|
|
* License along with this program. If not, see |
68
|
|
|
|
|
|
|
* . |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
* Bugs: |
71
|
|
|
|
|
|
|
* {note_any_bugs_here} |
72
|
|
|
|
|
|
|
*- |
73
|
|
|
|
|
|
|
*/ |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#include "pal.h" |
76
|
|
|
|
|
|
|
#include "pal1sofa.h" |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
double palRvlg( double r2000, double d2000 ){ |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
/* Local Variables: */ |
81
|
|
|
|
|
|
|
double vb[ 3 ]; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
/* |
84
|
|
|
|
|
|
|
* |
85
|
|
|
|
|
|
|
* Solar velocity due to Galactic rotation and translation |
86
|
|
|
|
|
|
|
* |
87
|
|
|
|
|
|
|
* Speed = 300 km/s |
88
|
|
|
|
|
|
|
* |
89
|
|
|
|
|
|
|
* Apex = L2,B2 90deg, 0deg |
90
|
|
|
|
|
|
|
* = RA,Dec 21 12 01.1 +48 19 47 J2000.0 |
91
|
|
|
|
|
|
|
* |
92
|
|
|
|
|
|
|
* This is expressed in the form of a J2000.0 x,y,z vector: |
93
|
|
|
|
|
|
|
* |
94
|
|
|
|
|
|
|
* VA(1) = X = -SPEED*COS(RA)*COS(DEC) |
95
|
|
|
|
|
|
|
* VA(2) = Y = -SPEED*SIN(RA)*COS(DEC) |
96
|
|
|
|
|
|
|
* VA(3) = Z = -SPEED*SIN(DEC) |
97
|
|
|
|
|
|
|
*/ |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
double va[ 3 ] = { -148.23284, +133.44888, -224.09467 }; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
/* Convert given J2000 RA,Dec to x,y,z. */ |
102
|
0
|
|
|
|
|
|
eraS2c( r2000, d2000, vb ); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
/* Compute dot product with Solar motion vector. */ |
105
|
0
|
|
|
|
|
|
return eraPdp( va, vb ); |
106
|
|
|
|
|
|
|
} |