source: trunk/FACT++/sofa/src/pvdpv.c@ 18355

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 5.5 KB
Line 
1#include "sofa.h"
2
3void iauPvdpv(double a[2][3], double b[2][3], double adb[2])
4/*
5** - - - - - - - - -
6** i a u P v d p v
7** - - - - - - - - -
8**
9** Inner (=scalar=dot) product of two pv-vectors.
10**
11** This function is part of the International Astronomical Union's
12** SOFA (Standards Of Fundamental Astronomy) software collection.
13**
14** Status: vector/matrix support function.
15**
16** Given:
17** a double[2][3] first pv-vector
18** b double[2][3] second pv-vector
19**
20** Returned:
21** adb double[2] a . b (see note)
22**
23** Note:
24**
25** If the position and velocity components of the two pv-vectors are
26** ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of
27** numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the
28** dot-product of the two p-vectors and its derivative.
29**
30** Called:
31** iauPdp scalar product of two p-vectors
32**
33** This revision: 2013 June 18
34**
35** SOFA release 2015-02-09
36**
37** Copyright (C) 2015 IAU SOFA Board. See notes at end.
38*/
39{
40 double adbd, addb;
41
42/* a . b = constant part of result. */
43 adb[0] = iauPdp(a[0], b[0]);
44
45/* a . bdot */
46 adbd = iauPdp(a[0], b[1]);
47
48/* adot . b */
49 addb = iauPdp(a[1], b[0]);
50
51/* Velocity part of result. */
52 adb[1] = adbd + addb;
53
54 return;
55
56/*----------------------------------------------------------------------
57**
58** Copyright (C) 2015
59** Standards Of Fundamental Astronomy Board
60** of the International Astronomical Union.
61**
62** =====================
63** SOFA Software License
64** =====================
65**
66** NOTICE TO USER:
67**
68** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
69** CONDITIONS WHICH APPLY TO ITS USE.
70**
71** 1. The Software is owned by the IAU SOFA Board ("SOFA").
72**
73** 2. Permission is granted to anyone to use the SOFA software for any
74** purpose, including commercial applications, free of charge and
75** without payment of royalties, subject to the conditions and
76** restrictions listed below.
77**
78** 3. You (the user) may copy and distribute SOFA source code to others,
79** and use and adapt its code and algorithms in your own software,
80** on a world-wide, royalty-free basis. That portion of your
81** distribution that does not consist of intact and unchanged copies
82** of SOFA source code files is a "derived work" that must comply
83** with the following requirements:
84**
85** a) Your work shall be marked or carry a statement that it
86** (i) uses routines and computations derived by you from
87** software provided by SOFA under license to you; and
88** (ii) does not itself constitute software provided by and/or
89** endorsed by SOFA.
90**
91** b) The source code of your derived work must contain descriptions
92** of how the derived work is based upon, contains and/or differs
93** from the original SOFA software.
94**
95** c) The names of all routines in your derived work shall not
96** include the prefix "iau" or "sofa" or trivial modifications
97** thereof such as changes of case.
98**
99** d) The origin of the SOFA components of your derived work must
100** not be misrepresented; you must not claim that you wrote the
101** original software, nor file a patent application for SOFA
102** software or algorithms embedded in the SOFA software.
103**
104** e) These requirements must be reproduced intact in any source
105** distribution and shall apply to anyone to whom you have
106** granted a further right to modify the source code of your
107** derived work.
108**
109** Note that, as originally distributed, the SOFA software is
110** intended to be a definitive implementation of the IAU standards,
111** and consequently third-party modifications are discouraged. All
112** variations, no matter how minor, must be explicitly marked as
113** such, as explained above.
114**
115** 4. You shall not cause the SOFA software to be brought into
116** disrepute, either by misuse, or use for inappropriate tasks, or
117** by inappropriate modification.
118**
119** 5. The SOFA software is provided "as is" and SOFA makes no warranty
120** as to its use or performance. SOFA does not and cannot warrant
121** the performance or results which the user may obtain by using the
122** SOFA software. SOFA makes no warranties, express or implied, as
123** to non-infringement of third party rights, merchantability, or
124** fitness for any particular purpose. In no event will SOFA be
125** liable to the user for any consequential, incidental, or special
126** damages, including any lost profits or lost savings, even if a
127** SOFA representative has been advised of such damages, or for any
128** claim by any third party.
129**
130** 6. The provision of any version of the SOFA software under the terms
131** and conditions specified herein does not imply that future
132** versions will also be made available under the same terms and
133** conditions.
134*
135** In any published work or commercial product which uses the SOFA
136** software directly, acknowledgement (see www.iausofa.org) is
137** appreciated.
138**
139** Correspondence concerning SOFA software should be addressed as
140** follows:
141**
142** By email: sofa@ukho.gov.uk
143** By post: IAU SOFA Center
144** HM Nautical Almanac Office
145** UK Hydrographic Office
146** Admiralty Way, Taunton
147** Somerset, TA1 2DN
148** United Kingdom
149**
150**--------------------------------------------------------------------*/
151}
Note: See TracBrowser for help on using the repository browser.