IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 18, 2005, 3:11:03 PM (20 years ago)
Author:
gusciora
Message:

Coded the cell->toSky Quick routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometry.c

    r5552 r5553  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-11-19 00:55:18 $
     10*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-11-19 01:11:03 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    559559
    560560// XXX: This has not been tested.
    561 // XXX: How do we get sphere coods from the cell->toSky plane transform?
     561// XXX: Verify the plane coords to sphere coord code.
    562562psSphere* pmCoordCellToSkyQuick(
    563563    psSphere* outSphere,
     
    568568    PS_ASSERT_PTR_NON_NULL(cell, NULL);
    569569    PS_ASSERT_PTR_NON_NULL(cell->toSky, NULL);
    570 
    571     //    return(psPlaneTransformApply(outSphere, cell->toSky, cellCoord));
    572     psLogMsg(__func__, PS_LOG_WARN,
    573              "WARNING: psCoordCellToSkyQuick(): This function is not fully specified in the SDRS.  Returning NULL.\n");
     570    psPlane outPlane;
     571    psPlaneTransformApply(&outPlane, cell->toSky, cellCoord);
     572    psSphere *out = outSphere;
     573    if (out == NULL) {
     574        out = psSphereAlloc();
     575    }
     576    out->r = outPlane.y;
     577    out->d = outPlane.x;
     578
    574579    return(NULL);
     580}
     581
     582/*****************************************************************************
     583XXX: What about units for the (x,y) coords?
     584 
     585XXX: This has not been tested.
     586 
     587XXX: Verify the plane coords to sphere coord code.
     588 *****************************************************************************/
     589psPlane* pmCoordSkyToCellQuick(
     590    psPlane* cellCoord,
     591    const psSphere* skyCoord,
     592    const pmCell* cell)
     593{
     594    PS_ASSERT_PTR_NON_NULL(skyCoord, NULL);
     595    PS_ASSERT_PTR_NON_NULL(cell, NULL);
     596    PS_ASSERT_PTR_NON_NULL(cell->toSky, NULL);
     597    psPlane skyPlane;
     598    skyPlane.y = skyCoord->r;
     599    skyPlane.x = skyCoord->d;
     600
     601    return(psPlaneTransformApply(cellCoord, cell->toSky, &skyPlane));
    575602}
    576603
     
    656683}
    657684
    658 
    659 /*****************************************************************************
    660 XXX: What about units for the (x,y) coords?
    661  
    662 XXX: This has not been tested.
    663  
    664 XXX: How do we get sphere coods from the cell->toSky plane transform?
    665  *****************************************************************************/
    666 psPlane* pmCoordSkyToCellQuick(
    667     psPlane* cellCoord,
    668     const psSphere* skyCoord,
    669     const pmCell* cell)
    670 {
    671     PS_ASSERT_PTR_NON_NULL(skyCoord, NULL);
    672     PS_ASSERT_PTR_NON_NULL(cell, NULL);
    673     PS_ASSERT_PTR_NON_NULL(cell->toSky, NULL);
    674 
    675     //    return(p_psProject(cellCoord, skyCoord, cell->toSky));
    676     psLogMsg(__func__, PS_LOG_WARN,
    677              "WARNING: psCoordCellToSkyQuick(): This function is not fully specified in the SDRS.  Returning NULL.\n");
    678     return(NULL);
    679 }
    680 //This code will
Note: See TracChangeset for help on using the changeset viewer.