1 /* 2 3 -Procedure wnunid_c ( Union two DP windows ) 4 5 -Abstract 6 7 Place the union of two double precision windows into a third 8 window. 9 10 -Disclaimer 11 12 THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE 13 CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. 14 GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE 15 ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE 16 PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" 17 TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY 18 WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A 19 PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC 20 SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 21 SOFTWARE AND RELATED MATERIALS, HOWEVER USED. 22 23 IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA 24 BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT 25 LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, 26 INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, 27 REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE 28 REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. 29 30 RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF 31 THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY 32 CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE 33 ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. 34 35 -Required_Reading 36 37 WINDOWS 38 39 -Keywords 40 41 WINDOWS 42 43 */ 44 45 #include "SpiceUsr.h" 46 #include "SpiceZfc.h" 47 #include "SpiceZmc.h" 48 wnunid_c(SpiceCell * a,SpiceCell * b,SpiceCell * c)49 void wnunid_c ( SpiceCell * a, 50 SpiceCell * b, 51 SpiceCell * c ) 52 53 /* 54 55 -Brief_I/O 56 57 VARIABLE I/O DESCRIPTION 58 -------- --- -------------------------------------------------- 59 a, 60 b I Input windows. 61 c O Union of a and b. 62 63 -Detailed_Input 64 65 a, 66 b are CSPICE windows, each of which contains zero or more 67 intervals. 68 69 a and b must be declared as double precision 70 SpiceCells. 71 72 -Detailed_Output 73 74 c is the output CSPICE window, containing the union of 75 a and b---every point contained in a, or in b, 76 or in both. 77 78 c must be declared as a double precision SpiceCell. 79 80 c must be distinct from both a and b. 81 82 -Parameters 83 84 None. 85 86 -Exceptions 87 88 1) If any of the function arguments are SpiceCells of type 89 other than double precision, the error SPICE(TYPEMISMATCH) 90 is signaled. 91 92 2) If the union of the two windows results in an excess of 93 elements, the error SPICE(WINDOWEXCESS) is signaled. 94 95 -Files 96 97 None. 98 99 -Particulars 100 101 The union of two windows contains every point contained in the 102 first window, or the second window, or both. 103 104 -Examples 105 106 Let a contain the intervals 107 108 [ 1, 3 ] [ 7, 11 ] [ 23, 27 ] 109 110 and b contain the intervals 111 112 [ 2, 6 ] [ 8, 10 ] [ 16, 18 ] 113 114 Then the union of a and b contains the intervals 115 116 [ 1, 6 ] [ 7, 11 ] [ 16, 18 ] [ 23, 27 ] 117 118 -Restrictions 119 120 None. 121 122 -Literature_References 123 124 None. 125 126 -Author_and_Institution 127 128 N.J. Bachman (JPL) 129 H.A. Neilan (JPL) 130 B.V. Semenov (JPL) 131 W.L. Taber (JPL) 132 I.M. Underwood (JPL) 133 134 -Version 135 136 -CSPICE Version 1.0.1, 11-FEB-2013 (BVS) 137 138 Corrected typo in Brief I/O section. 139 140 -CSPICE Version 1.0.0, 29-JUL-2002 (NJB) (HAN) (WLT) (IMU) 141 142 -Index_Entries 143 144 union two d.p. windows 145 146 -& 147 */ 148 149 { /* Begin wnunid_c */ 150 151 152 153 /* 154 Participate in error tracing. 155 */ 156 if ( return_c() ) 157 { 158 return; 159 } 160 chkin_c ( "wnunid_c" ); 161 162 163 /* 164 Make sure cell data types are d.p. 165 */ 166 CELLTYPECHK3 ( CHK_STANDARD, "wnunid_c", SPICE_DP, a, b, c ); 167 168 169 /* 170 Initialize the cells if necessary. 171 */ 172 CELLINIT3 ( a, b, c ); 173 174 175 /* 176 Let the f2c'd routine do the work. 177 */ 178 wnunid_ ( (doublereal *) (a->base), 179 (doublereal *) (b->base), 180 (doublereal *) (c->base) ); 181 182 /* 183 Sync the output cell. 184 */ 185 if ( !failed_c() ) 186 { 187 zzsynccl_c ( F2C, c ); 188 } 189 190 191 chkout_c ( "wnunid_c" ); 192 193 } /* End wnunid_c */ 194