IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2600 for trunk/psLib/src/astro


Ignore:
Timestamp:
Dec 2, 2004, 11:12:52 AM (22 years ago)
Author:
gusciora
Message:

Renamed members of the psSphereTransform struct.

Location:
trunk/psLib/src/astro
Files:
2 edited

Legend:

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

    r2583 r2600  
    88*  @ingroup CoordinateTransform
    99*
    10 *  @author George Gusciora, MHPCC
     10*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-12-01 19:56:05 $
     12*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-12-02 21:12:51 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    164164This function prototype has been modified since the SDRS.
    165165 *****************************************************************************/
    166 psSphereTransform* psSphereTransformAlloc(double NPlat,
    167         double Xo,
    168         double xo)
     166psSphereTransform* psSphereTransformAlloc(double alphaP,
     167        double deltaP,
     168        double phiP)
    169169{
    170170    psSphereTransform* tmp = (psSphereTransform* ) psAlloc(sizeof(psSphereTransform));
    171171
    172     tmp->sinPhi = sin(NPlat);
    173     tmp->cosPhi = cos(NPlat);
    174     tmp->Xo = Xo;
    175     tmp->xo = xo;
     172    tmp->cosDeltaP = cos(deltaP);
     173    tmp->sinDeltaP = cos(deltaP);
     174    tmp->alphaP = alphaP;
     175    tmp->phiP = phiP;
    176176
    177177    return (tmp);
     
    207207    x = coord->r;
    208208    y = coord->d;
    209     dx = x - transform->xo;
    210     sinY = cos(y) * sin(dx) * transform->sinPhi + sin(y) * transform->cosPhi;
     209    dx = x - transform->phiP;
     210    sinY = cos(y) * sin(dx) * transform->sinDeltaP + sin(y) * transform->cosDeltaP;
    211211    cosY = sqrt(1.0 - sinY * sinY);
    212     sinX = (cos(y) * sin(dx) * transform->cosPhi - sin(y) * transform->sinPhi) / cos(y);
     212    sinX = (cos(y) * sin(dx) * transform->cosDeltaP - sin(y) * transform->sinDeltaP) / cos(y);
    213213    cosX = cos(y) * cos(dx) / cos(y);
    214214
    215     out->r = atan2(sinX, cosX) + transform->Xo;
     215    out->r = atan2(sinX, cosX) + transform->alphaP;
    216216    out->d = atan2(sinY, cosY);
    217217
     
    227227    double T = year / 100.0;
    228228    double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T;
    229     double Xo = 0.0;
    230     double xo = 0.0;
     229    double alphaP = 0.0;
     230    double phiP = 0.0;
    231231
    232232    psFree(tmTime);
    233     return (psSphereTransformAlloc(phi, Xo, xo));
     233    return (psSphereTransformAlloc(phi, alphaP, phiP));
    234234}
    235235
     
    242242    double T = year / 100.0;
    243243    double phi = +23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T;
    244     double Xo = 0.0;
    245     double xo = 0.0;
     244    double alphaP = 0.0;
     245    double phiP = 0.0;
    246246
    247247    psFree(tmTime);
    248     return (psSphereTransformAlloc(phi, Xo, xo));
     248    return (psSphereTransformAlloc(phi, alphaP, phiP));
    249249}
    250250
     
    536536                          const psTime *toTime)
    537537{
    538     psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0;
    539     psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0;
    540     psF64 = (toMJD - fromMJD) / 36525.0;
    541 
    542 
    543 
     538    /*
     539        psF64 fromMJD = fromTime->sec/86400.0 + fromTime->usec/86400000000.0 + 40587.0;
     540        psF64 toMJD = toTime->sec/86400.0 + toTime->usec/86400000000.0 + 40587.0;
     541        psF64 = (toMJD - fromMJD) / 36525.0;
     542    */
    544543    return(NULL);
    545544}
  • trunk/psLib/src/astro/psCoord.h

    r2425 r2600  
    88*  @ingroup CoordinateTransform
    99*
    10 *  @author George Gusciora, MHPCC
    11 *
    12 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-11-24 19:48:17 $
     10*  @author GLG, MHPCC
     11*
     12*  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-12-02 21:12:51 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    107107typedef struct
    108108{
    109     double sinPhi;              ///< sin of North Pole lattitude
    110     double cosPhi;              ///< cos of North Pole lattitude
    111     double Xo;                  ///< First PT of Ares lon
    112     double xo;                  ///< First PT of Ares equiv lon
     109    double cosDeltaP;                 ///< Cosine of target pole latitude in the source system
     110    double sinDeltaP;                 ///< Sine of target pole latitude in the source system
     111    double alphaP;                    ///< Longitude of the target system pole in the source system
     112    double phiP;                      ///< Longitude of the ascending node in the target system
    113113}
    114114psSphereTransform;
     
    216216 *  @return psSphereTransform*         newly allocated struct
    217217 */
     218
    218219psSphereTransform* psSphereTransformAlloc(
    219     double NPlat,                      ///< north pole latitude
    220     double Xo,                         ///< First PT of Ares lon
    221     double xo                          ///< First PT of Ares equiv lon
     220    double alphaP,                      ///< north pole latitude
     221    double deltaP,                      ///< north pole longitude?
     222    double phiP                         ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
    222223);
    223224
Note: See TracChangeset for help on using the changeset viewer.