source: trunk/FACT++/pal/palEpv.c@ 18907

Last change on this file since 18907 was 18347, checked in by tbretz, 9 years ago
File size: 2.5 KB
Line 
1/*
2*+
3* Name:
4* palEpv
5
6* Purpose:
7* Earth position and velocity with respect to the BCRS
8
9* Language:
10* Starlink ANSI C
11
12* Type of Module:
13* Library routine
14
15* Invocation:
16* void palEpv( double date, double ph[3], double vh[3],
17* double pb[3], double vb[3] );
18
19* Arguments:
20* date = double (Given)
21* Date, TDB Modified Julian Date (JD-2400000.5)
22* ph = double [3] (Returned)
23* Heliocentric Earth position (AU)
24* vh = double [3] (Returned)
25* Heliocentric Earth velocity (AU/day)
26* pb = double [3] (Returned)
27* Barycentric Earth position (AU)
28* vb = double [3] (Returned)
29* Barycentric Earth velocity (AU/day)
30
31* Description:
32* Earth position and velocity, heliocentric and barycentric, with
33* respect to the Barycentric Celestial Reference System.
34
35* Authors:
36* TIMJ: Tim Jenness (JAC, Hawaii)
37* {enter_new_authors_here}
38
39* Notes:
40* - See eraEpv00 for details on accuracy
41* - Note that the status argument from eraEpv00 is ignored
42
43* History:
44* 2012-03-12 (TIMJ):
45* Initial version
46* Adapted with permission from the Fortran SLALIB library
47* but now mainly calls SOFA routines.
48* {enter_further_changes_here}
49
50* Copyright:
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 General Public License as
57* published by the Free Software Foundation; either version 3 of
58* the License, or (at your option) any later version.
59*
60* This program is distributed in the hope that it will be
61* useful, but WITHOUT ANY WARRANTY; without even the implied
62* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
63* PURPOSE. See the GNU General Public License for more details.
64*
65* You should have received a copy of the GNU General Public License
66* along with this program; if not, write to the Free Software
67* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
68* MA 02110-1301, USA.
69
70* Bugs:
71* {note_any_bugs_here}
72*-
73*/
74
75#include "palmac.h"
76#include "pal.h"
77#include "pal1sofa.h"
78
79void palEpv( double date, double ph[3], double vh[3],
80 double pb[3], double vb[3] ) {
81
82 int i;
83 double pvh[2][3];
84 double pvb[2][3];
85
86 eraEpv00( PAL__MJD0, date, pvh, pvb );
87
88 /* Copy into output arrays */
89 for (i=0; i<3; i++) {
90 ph[i] = pvh[0][i];
91 vh[i] = pvh[1][i];
92 pb[i] = pvb[0][i];
93 vb[i] = pvb[1][i];
94 }
95
96}
Note: See TracBrowser for help on using the repository browser.