Changeset 25027 for branches/pap/psModules/src/astrom/pmAstrometryObjects.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psModules
- Property svn:mergeinfo deleted
-
branches/pap/psModules/src/astrom/pmAstrometryObjects.c
r21422 r25027 83 83 { 84 84 psArray *matches = psArrayAllocEmpty(x1->n); 85 psVector *found1 = psVectorAlloc(x1->n, PS_TYPE_S8); 86 psVector *found2 = psVectorAlloc(x2->n, PS_TYPE_S8); 85 87 86 88 const double RADIUS_SQR = PS_SQR(RADIUS); 87 89 double dX, dY, dR; 90 91 psVectorInit (found1, 0); 92 psVectorInit (found2, 0); 88 93 89 94 int jStart; … … 100 105 } 101 106 107 if (found1->data.S8[i]) { 108 i++; 109 continue; 110 } 111 if (found2->data.S8[j]) { 112 j++; 113 continue; 114 } 115 102 116 jStart = j; 103 while ( fabs(dX) < RADIUS && j < x2->n) {117 while ((fabs(dX) < RADIUS) && (j < x2->n)) { 104 118 105 119 dX = x1->data.F64[i] - x2->data.F64[j]; … … 111 125 continue; 112 126 } 127 if (found2->data.S8[j]) { 128 j++; 129 continue; 130 } 113 131 114 132 // got a match; add to output list … … 117 135 psFree (match); 118 136 137 found1->data.S8[i] = 1; 138 found2->data.S8[j] = 1; 139 119 140 j++; 120 141 } … … 122 143 i++; 123 144 } 145 psFree (found1); 146 psFree (found2); 147 124 148 return (matches); 125 149 } … … 420 444 obj->sky = psSphereAlloc(); 421 445 obj->Mag = 0; 446 obj->Color= 0; 422 447 obj->dMag = 0; 423 448 … … 447 472 *obj->sky = *old->sky; 448 473 obj->Mag = old->Mag; 474 obj->Color = old->Color; 449 475 obj->dMag = old->dMag; 450 476
Note:
See TracChangeset
for help on using the changeset viewer.
