source: trunk/FACT++/sofa/src/pm.c@ 18375

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