IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2931


Ignore:
Timestamp:
Jan 7, 2005, 1:52:15 PM (22 years ago)
Author:
gusciora
Message:

Fixed a bug.

Location:
trunk/psLib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r2778 r2931  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-12-21 20:42:07 $
     12*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-01-07 23:52:15 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131/******************************************************************************/
    3232
    33 #define PS_COT(X) (1.0 / atan(X))
    34 #define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
    35 #define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
    36 #define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
    37 #define RAD_TO_DEG(RADIANS) ((RADIANS) * 180 / M_PI)
    38 #define RAD_TO_MIN(RADIANS) ((RADIANS) * 180 * 60.0 / M_PI)
    39 #define RAD_TO_SEC(RADIANS) ((RADIANS) * 180 * 60.0 * 60.0 / M_PI)
     33// None
    4034
    4135/******************************************************************************/
     
    181175
    182176    tmp->cosDeltaP = cos(deltaP);
    183     tmp->sinDeltaP = cos(deltaP);
     177    tmp->sinDeltaP = sin(deltaP);
    184178    tmp->alphaP = alphaP;
    185179    tmp->phiP = phiP;
     
    317311        tmpF64 = 1.0 / tmpF64;
    318312        tmp->x = 2.0 * tmpF64 * cos(coord->r) * sin(0.5 * coord->d);
     313        tmp->y = sin(coord->r) * tmpF64;
    319314
    320315    } else if (projection->type == PS_PROJ_PAR) {
     
    553548psSpherePrecess(coords, fromTime, toTime):
    554549 
    555 XXX: What algorithm should be used?
    556 XXX: Verify that this is correct.
    557550XXX: Use static memory for tmpST.
    558551 *****************************************************************************/
  • trunk/psLib/src/astronomy/psAstrometry.c

    r2855 r2931  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-12-30 20:18:36 $
     10 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-01-07 23:52:15 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    120120    double F = transform->y->coeff[0][1];
    121121
     122    // XXX: Use the constructor here.
    122123    psPlaneTransform *out = psAlloc(sizeof(psPlaneTransform));
    123124
  • trunk/psLib/src/astronomy/psCoord.c

    r2778 r2931  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-12-21 20:42:07 $
     12*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-01-07 23:52:15 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131/******************************************************************************/
    3232
    33 #define PS_COT(X) (1.0 / atan(X))
    34 #define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
    35 #define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
    36 #define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
    37 #define RAD_TO_DEG(RADIANS) ((RADIANS) * 180 / M_PI)
    38 #define RAD_TO_MIN(RADIANS) ((RADIANS) * 180 * 60.0 / M_PI)
    39 #define RAD_TO_SEC(RADIANS) ((RADIANS) * 180 * 60.0 * 60.0 / M_PI)
     33// None
    4034
    4135/******************************************************************************/
     
    181175
    182176    tmp->cosDeltaP = cos(deltaP);
    183     tmp->sinDeltaP = cos(deltaP);
     177    tmp->sinDeltaP = sin(deltaP);
    184178    tmp->alphaP = alphaP;
    185179    tmp->phiP = phiP;
     
    317311        tmpF64 = 1.0 / tmpF64;
    318312        tmp->x = 2.0 * tmpF64 * cos(coord->r) * sin(0.5 * coord->d);
     313        tmp->y = sin(coord->r) * tmpF64;
    319314
    320315    } else if (projection->type == PS_PROJ_PAR) {
     
    553548psSpherePrecess(coords, fromTime, toTime):
    554549 
    555 XXX: What algorithm should be used?
    556 XXX: Verify that this is correct.
    557550XXX: Use static memory for tmpST.
    558551 *****************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.