1 /* vupack.f -- translated by f2c (version 19980913).
2    You must link the resulting object file with the libraries:
3 	-lf2c -lm   (in that order)
4 */
5 
6 #include "f2c.h"
7 
8 /* $Procedure      VUPACK ( Unpack three scalar components from a vector ) */
vupack_(doublereal * v,doublereal * x,doublereal * y,doublereal * z__)9 /* Subroutine */ int vupack_(doublereal *v, doublereal *x, doublereal *y,
10 	doublereal *z__)
11 {
12 /* $ Abstract */
13 
14 /*      Unpack three scalar components from a vector. */
15 
16 /* $ Disclaimer */
17 
18 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
19 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
20 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
21 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
22 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
23 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
24 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
25 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
26 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
27 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
28 
29 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
30 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
31 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
32 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
33 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
34 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
35 
36 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
37 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
38 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
39 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
40 
41 /* $ Required_Reading */
42 
43 /*     None. */
44 
45 /* $ Keywords */
46 
47 /*      VECTOR */
48 
49 /* $ Declarations */
50 /* $ Brief_I/O */
51 
52 /*      VARIABLE  I/O  DESCRIPTION */
53 /*      --------  ---  -------------------------------------------------- */
54 /*      V          I   Input vector. */
55 /*      X, */
56 /*      Y, */
57 /*      Z          O   Scalar components of the vector. */
58 
59 /* $ Detailed_Input */
60 
61 /*      V           is a vector with components V(1) = X */
62 /*                                              V(2) = Y */
63 /*                                              V(3) = Z */
64 /* $ Detailed_Output */
65 
66 /*      X, */
67 /*      Y, */
68 /*      Z           are the scalar components of the vector. */
69 
70 /* $ Parameters */
71 
72 /*     None. */
73 
74 /* $ Particulars */
75 
76 /*      Basically, this is just shorthand notation for the common */
77 /*      sequence */
78 
79 /*            X = V(1) */
80 /*            Y = V(2) */
81 /*            Z = V(3) */
82 
83 /*      The routine is useful largely for two reasons. First, it */
84 /*      reduces the chance that the programmer will make a "cut and */
85 /*      paste" mistake, like */
86 
87 /*            X = V(1) */
88 /*            Y = V(1) */
89 /*            Z = V(1) */
90 
91 /*      Second, it makes conversions between equivalent units simpler, */
92 /*      and clearer. For instance, the sequence */
93 
94 /*            X = V(1) * RPD */
95 /*            Y = V(2) * RPD */
96 /*            Z = V(3) * RPD */
97 
98 /*      can be replaced by the (nearly) equivalent sequence */
99 
100 /*            CALL VSCL   ( RPD,  V, V ) */
101 /*            CALL VUPACK ( V, X, Y, Z ) */
102 
103 /* $ Examples */
104 
105 /*      See: Detailed_Description. */
106 
107 /* $ Restrictions */
108 
109 /*      None. */
110 
111 /* $ Exceptions */
112 
113 /*      Error free. */
114 
115 /* $ Files */
116 
117 /*      None. */
118 
119 /* $ Author_and_Institution */
120 
121 /*      I.M. Underwood  (JPL) */
122 
123 /* $ Literature_References */
124 
125 /*      None. */
126 
127 /* $ Version */
128 
129 /* -     SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */
130 
131 /*         Comment section for permuted index source lines was added */
132 /*         following the header. */
133 
134 /* -     SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */
135 
136 /* -& */
137 /* $ Index_Entries */
138 
139 /*     unpack three scalar components from a vector */
140 
141 /* -& */
142 
143 /*     Just shorthand, like it says above. */
144 
145     *x = v[0];
146     *y = v[1];
147     *z__ = v[2];
148     return 0;
149 } /* vupack_ */
150 
151