source: trunk/FACT++/erfa/src/s2p.c@ 19615

Last change on this file since 19615 was 18921, checked in by tbretz, 7 years ago
Updated to ERFA 1.4.0
File size: 3.6 KB
Line 
1#include "erfa.h"
2
3void eraS2p(double theta, double phi, double r, double p[3])
4/*
5** - - - - - - -
6** e r a S 2 p
7** - - - - - - -
8**
9** Convert spherical polar coordinates to p-vector.
10**
11** Given:
12** theta double longitude angle (radians)
13** phi double latitude angle (radians)
14** r double radial distance
15**
16** Returned:
17** p double[3] Cartesian coordinates
18**
19** Called:
20** eraS2c spherical coordinates to unit vector
21** eraSxp multiply p-vector by scalar
22**
23** Copyright (C) 2013-2017, NumFOCUS Foundation.
24** Derived, with permission, from the SOFA library. See notes at end of file.
25*/
26{
27 double u[3];
28
29
30 eraS2c(theta, phi, u);
31 eraSxp(r, u, p);
32
33 return;
34
35}
36/*----------------------------------------------------------------------
37**
38**
39** Copyright (C) 2013-2017, NumFOCUS Foundation.
40** All rights reserved.
41**
42** This library is derived, with permission, from the International
43** Astronomical Union's "Standards of Fundamental Astronomy" library,
44** available from http://www.iausofa.org.
45**
46** The ERFA version is intended to retain identical functionality to
47** the SOFA library, but made distinct through different function and
48** file names, as set out in the SOFA license conditions. The SOFA
49** original has a role as a reference standard for the IAU and IERS,
50** and consequently redistribution is permitted only in its unaltered
51** state. The ERFA version is not subject to this restriction and
52** therefore can be included in distributions which do not support the
53** concept of "read only" software.
54**
55** Although the intent is to replicate the SOFA API (other than
56** replacement of prefix names) and results (with the exception of
57** bugs; any that are discovered will be fixed), SOFA is not
58** responsible for any errors found in this version of the library.
59**
60** If you wish to acknowledge the SOFA heritage, please acknowledge
61** that you are using a library derived from SOFA, rather than SOFA
62** itself.
63**
64**
65** TERMS AND CONDITIONS
66**
67** Redistribution and use in source and binary forms, with or without
68** modification, are permitted provided that the following conditions
69** are met:
70**
71** 1 Redistributions of source code must retain the above copyright
72** notice, this list of conditions and the following disclaimer.
73**
74** 2 Redistributions in binary form must reproduce the above copyright
75** notice, this list of conditions and the following disclaimer in
76** the documentation and/or other materials provided with the
77** distribution.
78**
79** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
80** the International Astronomical Union nor the names of its
81** contributors may be used to endorse or promote products derived
82** from this software without specific prior written permission.
83**
84** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
87** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
88** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
89** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
90** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
91** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
92** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
93** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
94** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
95** POSSIBILITY OF SUCH DAMAGE.
96**
97*/
Note: See TracBrowser for help on using the repository browser.