Instrument Neutral Distributed Interface INDI 2.2.5
ctar.c
Go to the documentation of this file.
1#include "spk.h"
2#include <sofa.h>
3
4void spkCtar ( double rc, double dc, double pr, double pd, double px,
5 double rv, spkAST* ast, spkTAR* tar )
6/*
7** - - - - - - - -
8** s p k C t a r
9** - - - - - - - -
10**
11** Transform an epoch J2000.0 ICRS star catalog entry into an ICRS
12** astrometric target.
13**
14** Given:
15** rc double ICRS right ascension at J2000.0 (radians, Note 1)
16** dc double ICRS declination at J2000.0 (radians, Note 1)
17** pr double RA proper motion (radians/year, Note 2)
18** pd double Dec proper motion (radians/year)
19** px double parallax (arcsec, Note 3)
20** rv double radial velocity (km/s, +ve if receding)
21** ast spkAST* astrometry parameters
22**
23** Returned:
24** tar spkTAR* target, ICRS astrometric
25**
26** Notes:
27**
28** 1) Star data for an epoch other than J2000.0 (for example from the
29** Hipparcos catalog, which has an epoch of J1991.25) will require
30** preliminary treatment.
31**
32** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
33** In catalogs where the RA and Dec proper motions are given in
34** milliarcseconds per year, both will need scaling into radians
35** before the RA value is divided by cos(Dec). n.b. Some catalogs
36** quote proper motions per century rather than per year.
37**
38** 3) The parallax value is in arcseconds rather than radians as it is
39** a distance measure rather than an angle.
40**
41** Called:
42** iauPmpx proper motion and parallax
43** iauC2s p-vector to spherical
44**
45** This revision: 2021 September 3
46**
47** Author P.T.Wallace - see license notice at end.
48*/
49{
50 double p[3];
51
52
53/* Insert coordinate system into target structure. */
54 tar->sys = ICRS;
55
56/* Proper motion and parallax, giving BCRS coordinate direction. */
57 iauPmpx ( rc, dc, pr, pd, px, rv, ast->astrom.pmt, ast->astrom.eb,
58 p );
59
60/* Insert astrometric RA,Dec into target structure. */
61 iauC2s ( p, &tar->a, &tar->b );
62
63}
64
65/*----------------------------------------------------------------------
66**
67** Copyright (C) 2021 by P.T.Wallace
68**
69** Permission to use, copy, modify, and/or distribute this software for
70** any purpose with or without fee is hereby granted.
71**
72** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
73** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
74** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
75** AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
76** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
77** OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
78** NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
79** CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
80**
81**--------------------------------------------------------------------*/
void spkCtar(double rc, double dc, double pr, double pd, double px, double rv, spkAST *ast, spkTAR *tar)
Definition ctar.c:4
#define iauC2s
Definition sofa.h:43
@ ICRS
Definition spk.h:46
Definition spk.h:136
iauASTROM astrom
Definition spk.h:138
Definition spk.h:143
spkSYS sys
Definition spk.h:144
double a
Definition spk.h:145
double b
Definition spk.h:146