source: trunk/MagicSoft/slalib/rvgalc.c

Last change on this file was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3float slaRvgalc ( float r2000, float d2000 )
4/*
5** - - - - - - - - - -
6** s l a R v g a l c
7** - - - - - - - - - -
8**
9** Velocity component in a given direction due to the rotation
10** of the Galaxy.
11**
12** (single precision)
13**
14** Given:
15** r2000,d2000 float J2000.0 mean RA,Dec (radians)
16**
17** Result:
18** Component of dynamical LSR motion in direction r2000,d2000 (km/s)
19**
20** Sign convention:
21** The result is +ve when the dynamical LSR is receding from the
22** given point on the sky.
23**
24** Called:
25** slaCs2c, slaVdv
26**
27** Note: The Local Standard of Rest used here is a point in the
28** vicinity of the Sun which is in a circular orbit around
29** the Galactic centre. Sometimes called the "dynamical" LSR,
30** it is not to be confused with a "kinematical" LSR, which
31** is the mean standard of rest of star catalogues or stellar
32** populations.
33**
34** Reference: The orbital speed of 220 km/s used here comes from
35** Kerr & Lynden-Bell (1986), MNRAS, 221, p1023.
36**
37** Last revision: 23 March 1994
38**
39** Copyright P.T.Wallace. All rights reserved.
40*/
41{
42/*
43**
44** LSR velocity due to Galactic rotation
45**
46** Speed = 220 km/s
47**
48** Apex = L2,B2 90deg, 0deg
49** = RA,Dec 21 12 01.1 +48 19 47 J2000.0
50**
51** This is expressed in the form of a J2000.0 x,y,z vector:
52**
53** va(1) = x = -speed*cos(ra)*cos(dec)
54** va(2) = y = -speed*sin(ra)*cos(dec)
55** va(3) = z = -speed*sin(dec)
56*/
57 static float va[3] = { -108.70408f, 97.86251f, -164.33610f };
58 float vb[3];
59
60/* Convert given J2000 RA,dec to x,y,z */
61 slaCs2c ( r2000, d2000, vb );
62
63/* Compute dot product with LSR motion vector */
64 return slaVdv ( va, vb );
65}
Note: See TracBrowser for help on using the repository browser.