Last change
on this file since 9488 was 731, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | void slaPvobs ( double p, double h, double stl, double pv[6] )
|
---|
4 | /*
|
---|
5 | ** - - - - - - - - -
|
---|
6 | ** s l a P v o b s
|
---|
7 | ** - - - - - - - - -
|
---|
8 | **
|
---|
9 | ** Position and velocity of an observing station.
|
---|
10 | **
|
---|
11 | ** (double precision)
|
---|
12 | **
|
---|
13 | ** Given:
|
---|
14 | ** p double latitude (geodetic, radians)
|
---|
15 | ** h double height above reference spheroid (geodetic, metres)
|
---|
16 | ** stl double local apparent sidereal time (radians)
|
---|
17 | **
|
---|
18 | ** Returned:
|
---|
19 | ** pv double[6] position/velocity 6-vector (au, au/s, true
|
---|
20 | ** equator and equinox of date)
|
---|
21 | **
|
---|
22 | ** IAU 1976 constants are used.
|
---|
23 | **
|
---|
24 | ** Called: slaGeoc
|
---|
25 | **
|
---|
26 | ** Last revision: 14 November 1994
|
---|
27 | **
|
---|
28 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #define SR 7.292115855306589e-5 /* Mean sidereal rate (at J2000)
|
---|
32 | in radians per (UT1) second */
|
---|
33 |
|
---|
34 | {
|
---|
35 | double r, z, s, c, v;
|
---|
36 |
|
---|
37 | /* Geodetic to geocentric conversion */
|
---|
38 | slaGeoc ( p, h, &r, &z );
|
---|
39 |
|
---|
40 | /* Functions of ST */
|
---|
41 | s = sin ( stl );
|
---|
42 | c = cos ( stl );
|
---|
43 |
|
---|
44 | /* Speed */
|
---|
45 | v = SR * r;
|
---|
46 |
|
---|
47 | /* Position */
|
---|
48 | pv[0] = r * c;
|
---|
49 | pv[1] = r * s;
|
---|
50 | pv[2] = z;
|
---|
51 |
|
---|
52 | /* Velocity */
|
---|
53 | pv[3] = - v * s;
|
---|
54 | pv[4] = v * c;
|
---|
55 | pv[5] = 0.0;
|
---|
56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.