Changeset 1463 for trunk/psLib/src/astronomy/psAstrometry.c
- Timestamp:
- Aug 10, 2004, 1:59:41 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psAstrometry.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r1440 r1463 1 2 1 /** @file psAstrometry.c 3 2 * … … 9 8 * @author George Gusciora, MHPCC 10 9 * 11 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-08- 09 23:34:57$10 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-10 23:59:41 $ 13 12 * 14 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 20 #include "psMemory.h" 22 21 23 static void grommitFree(psGrommit* grommit);24 22 static int checkValidChipCoords(double x, double y, psChip* tmpChip); 25 23 static int checkValidImageCoords(double x, double y, psImage* tmpImage); … … 49 47 } 50 48 49 /* 50 Several members of the psGrommit data structure have no direct counterpart 51 in the psExposure structure. How are we to determine them? 52 */ 51 53 psGrommit* psGrommitAlloc(const psExposure* exp) 52 54 { … … 79 81 } 80 82 81 void p _psGrommitFree(psGrommit* grommit)83 void psGrommitFree(psGrommit* grommit) 82 84 { 83 85 psFree(grommit); … … 94 96 } 95 97 98 /* 99 XXX: do this 100 */ 96 101 int checkValidChipCoords(double x, double y, psChip* tmpChip) 97 102 { … … 120 125 } 121 126 127 /* 128 XXX: do this 129 */ 122 130 int checkValidImageCoords(double x, double y, psImage* tmpImage) 123 131 { … … 142 150 psCell* psCellinChip(psCell* out, const psPlane* coord, const psChip* chip) 143 151 { 152 int i = 0; 144 153 psPlane* tmpCoord = NULL; 145 154 psArray* cells; … … 155 164 } 156 165 157 for (i nt i= 0; i < cells->n; i++) {166 for (i = 0; i < cells->n; i++) { 158 167 psCell* tmpCell = (psCell* ) cells->data[i]; 159 168 psArray* readouts = tmpCell->readouts; … … 210 219 // transformation, as well as a few psPlane structs. Can this be implemented 211 220 // better? 212 psSphere* psCoordCelltoSky(psSphere* out, const psPlane* in, const psCell* cell) 221 psSphere* psCoordCelltoSky(psSphere* out, 222 const psPlane* in, 223 const psCell* cell) 213 224 { 214 225 psPlane* tmp1 = NULL; … … 216 227 psFPA* parFPA = (cell->parent)->parent; 217 228 psGrommit* tmpGrommit = NULL; 229 float XXX1 = 0.0; 230 float XXX2 = 0.0; 231 218 232 219 233 tmp1 = psPlaneTransformApply(tmp1, cell->toFPA, in); 220 tmp2 = psPlaneTransformApply(tmp2, parFPA->toTangentPlane, tmp1); 234 // XXX: 235 // 236 tmp2 = psPlaneDistortApply(tmp2, parFPA->toTangentPlane, tmp1, XXX1, XXX2); 221 237 tmpGrommit = psGrommitAlloc(parFPA->exposure); 222 tmp3 = psCoordTPtoSky(out, tmp2, psGrommit);223 224 238 psFree(tmp1); 225 239 psFree(tmp2); 226 240 psFree(tmpGrommit); 227 241 228 return (psCoordTPtoSky(out, tmp2, psGrommit)); 229 242 return(psCoordTPtoSky(out, tmp2, tmpGrommit)); 230 243 } 231 244 … … 247 260 psPlane* psCoordSkytoTP(psPlane* out, const psSphere* in, const psGrommit* grommit) 248 261 { 249 extern void sla_AOPQK(RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB); 250 double AOB; 251 double ZOB; 252 double HOB; 253 double DOB; 254 double ROB; 255 256 if (out == NULL) { 257 out = (psPlane* ) psAlloc(sizeof(psPlane)); 258 } 259 260 sla_AOPQK(psSphere->r, psSphere->d, *grommit, &AOB, &ZOB, &HOB, &DOB, &ROB); 261 out->x = XXX; 262 out->y = XXX; 263 return (out); 264 } 265 262 /* 263 extern void sla_AOPQK(RAP, DAP, AOPRMS, AOB, ZOB, HOB, DOB, ROB); 264 double AOB; 265 double ZOB; 266 double HOB; 267 double DOB; 268 double ROB; 269 270 if (out == NULL) { 271 out = (psPlane* ) psAlloc(sizeof(psPlane)); 272 } 273 274 sla_AOPQK(psSphere->r, psSphere->d, *grommit, &AOB, &ZOB, &HOB, &DOB, &ROB); 275 out->x = XXX; 276 out->y = XXX; 277 return (out); 278 */ 279 return(NULL); 280 } 281 282 283 /* 284 XXX: What are the XXX1 and XXX2 args supposed to be? 285 */ 266 286 psPlane* psCoordTPtoFPA(psPlane* out, const psPlane* in, const psFPA* fpa) 267 287 { 268 return (psPlaneTransformApply(out, fpa->fromTangentPlane, in)); 288 float XXX1 = 0.0; 289 float XXX2 = 0.0; 290 291 return (psPlaneDistortApply(out, fpa->fromTangentPlane, in, XXX1, XXX2)); 269 292 } 270 293 … … 281 304 psPlane* psCoordSkytoCell(psPlane* out, const psSphere* in, const psCell* cell) 282 305 { 283 out = psCoordSkytoTP(out, in, tmpGrommit); 306 psGrommit* XXXGrommit = NULL; 307 psFPA *whichFPA = NULL; 308 psChip *whichChip = NULL; 309 psCell *whichCell = NULL; 310 311 out = psCoordSkytoTP(out, in, XXXGrommit); 284 312 out = psCoordTPtoFPA(out, out, whichFPA); 285 313 out = psCoordFPAtoChip(out, out, whichChip);
Note:
See TracChangeset
for help on using the changeset viewer.
