Changeset 1491
- Timestamp:
- Aug 11, 2004, 1:53:54 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
astro/psCoord.c (modified) (2 diffs)
-
astronomy/psAstrometry.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r1475 r1491 1 2 1 /** @file psCoord.c 3 2 * … … 11 10 * @author George Gusciora, MHPCC 12 11 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-11 2 0:07:44 $12 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-11 23:53:54 $ 15 14 * 16 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/src/astronomy/psAstrometry.c
r1487 r1491 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-11 23: 25:18$10 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-11 23:53:42 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 313 313 314 314 /***************************************************************************** 315 XXX: not done 315 XXX: After I deproject the tangent plane to a sphere, do I have to do a 316 spherical transformation to get it to the sky? 316 317 *****************************************************************************/ 317 318 psSphere* psCoordCellToSkyQuick(psSphere* outSphere, … … 319 320 const psCell* cell) 320 321 { 321 psPlane* tmp1 = NULL; 322 psPlane *tpCoord = NULL; 323 psChip *chip = cell->parent; 324 psFPA *FPA = chip->parent; 325 psProjectionType oldProjectionType; 322 326 323 327 if (outSphere == NULL) { … … 325 329 } 326 330 327 tmp1 = psPlaneTransformApply(tmp1, cell->toSky, cellCoord); 328 329 // XXX: Do something to convert the linear coords in tmp1 to spherical 330 // coords in outSphere. 331 332 psFree(tmp1); 331 // Determine the tangent plane coordinates. 332 tpCoord = psPlaneTransformApply(tpCoord, cell->toTP, cellCoord); 333 334 // Save the old projection type and set the new projection type to TAN. 335 oldProjectionType = FPA->projection->type; 336 FPA->projection->type = PS_PROJ_TAN; 337 338 // Deproject the tangent plane coordinates a sphere. 339 outSphere = psDeproject(tpCoord, FPA->projection); 340 341 // Restore old projection type. Free memory. 342 FPA->projection->type = oldProjectionType; 343 psFree(tpCoord); 333 344 334 345 return (outSphere); … … 430 441 431 442 /***************************************************************************** 432 XXX: It is unclear how to perform this transformation.443 XXX: hmmm 433 444 *****************************************************************************/ 434 445 psPlane* psCoordSkyToCellQuick(psPlane* cellCoord, … … 436 447 const psCell* cell) 437 448 { 449 psPlane *tpCoord = NULL; 450 psChip *whichChip = cell->parent; 451 psFPA *whichFPA = whichChip->parent; 452 psProjectionType oldProjectionType; 453 psPlaneTransform *TPtoCell = NULL; 454 455 // Save the old projection type and set the new projection type to TAN. 456 oldProjectionType = whichFPA->projection->type; 457 whichFPA->projection->type = PS_PROJ_TAN; 458 438 459 if (cellCoord == NULL) { 439 460 cellCoord = (psPlane* ) psAlloc(sizeof(psPlane)); 440 461 } 441 462 463 tpCoord = psProject(skyCoord, whichFPA->projection); 464 465 // XXX: generate an error if cell->toTP is not linear. 466 467 // XXX: Invert cell->toTP, store in TPtoCell. 468 cellCoord = psPlaneTransformApply(cellCoord, TPtoCell, tpCoord); 469 470 // Restore old projection type. Free memory. 471 whichFPA->projection->type = oldProjectionType; 472 psFree(tpCoord); 442 473 return (cellCoord); 443 474 }
Note:
See TracChangeset
for help on using the changeset viewer.
