IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2600


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
Files:
17 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
  • trunk/psLib/src/astronomy/Makefile

    r2521 r2600  
    66include ../Makefile.Globals
    77CFLAGS := $(CFLAGS_RELOC) -I. -I../sysUtils -I../collections -I../dataManip \
    8     -I.. -I../image -I../fileUtils -I/usr/include/libxml2 \
     8    -I.. -I../image -I../fileUtils -I/usr/local/include/libxml2 \
    99    -DTIME_CONFIG_FILE="\"$(TIME_CONFIG_FILE)\""
    1010
  • trunk/psLib/src/astronomy/psAstrometry.c

    r2430 r2600  
    66 *  @ingroup AstroImage
    77 *
    8  *  @author George Gusciora, MHPCC
     8 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-11-24 20:27:46 $
     10 *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-12-02 21:12:51 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/astronomy/psAstrometry.h

    r2430 r2600  
    66*  @ingroup AstroImage
    77*
    8 *  @author George Gusciora, MHPCC
     8*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-11-24 20:27:46 $
     10*  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2004-12-02 21:12:51 $
    1212*
    1313*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/astronomy/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/astronomy/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
  • trunk/psLib/src/dataIO/psFileUtilsErrors.h

    r2375 r2600  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-11-16 20:00:21 $
     9 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-12-02 21:12:52 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131//~Start #define PS_ERRORTEXT_$1 "$2"
    3232#define PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND "Failed to open file %s."
    33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %d."
    34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %d."
    35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %d "
     33#define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %lld."
     34#define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %lld."
     35#define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %lld "
    3636#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH "High index too big, %d."
    3737#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW "Low index too small, %d."
  • trunk/psLib/src/dataManip/psFunctions.h

    r2439 r2600  
    1010*
    1111*  @author Someone at IfA
    12 *  @author George Gusciora, MHPCC
     12*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-11-24 22:33:21 $
     14*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-12-02 21:12:51 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/fileUtils/psFileUtilsErrors.h

    r2375 r2600  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-11-16 20:00:21 $
     9 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-12-02 21:12:52 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131//~Start #define PS_ERRORTEXT_$1 "$2"
    3232#define PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND "Failed to open file %s."
    33 #define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %d."
    34 #define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %d."
    35 #define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %d "
     33#define PS_ERRORTEXT_psLookupTable_PARSE_VALUE "Unable to parse string, %s on line %lld."
     34#define PS_ERRORTEXT_psLookupTable_PARSE_TYPE "Unable to parse type, %s on line %lld."
     35#define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL "Unable to read lookup table item, %s on line %lld "
    3636#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH "High index too big, %d."
    3737#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW "Low index too small, %d."
  • trunk/psLib/src/image/psImageStats.h

    r2204 r2600  
    77*  polynomials to images.
    88*
    9 *  @author George Gusciora, MHPCC
     9*  @author GLG, MHPCC
    1010*
    11 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-27 00:57:31 $
     11*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-12-02 21:12:52 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/imageops/psImageStats.h

    r2204 r2600  
    77*  polynomials to images.
    88*
    9 *  @author George Gusciora, MHPCC
     9*  @author GLG, MHPCC
    1010*
    11 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-27 00:57:31 $
     11*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-12-02 21:12:52 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/math/psPolynomial.h

    r2439 r2600  
    1010*
    1111*  @author Someone at IfA
    12 *  @author George Gusciora, MHPCC
     12*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-11-24 22:33:21 $
     14*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-12-02 21:12:51 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/math/psSpline.h

    r2439 r2600  
    1010*
    1111*  @author Someone at IfA
    12 *  @author George Gusciora, MHPCC
     12*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2004-11-24 22:33:21 $
     14*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2004-12-02 21:12:51 $
    1616*
    1717*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/sys/psTrace.c

    r2426 r2600  
    77 *
    88 *  @author Robert Lupton, Princeton University
    9  *  @author George Gusciora, MHPCC
     9 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-11-24 20:12:28 $
     11 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-12-02 21:12:52 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/sysUtils/psSysUtilsErrors.h

    r2320 r2600  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-11-10 18:36:10 $
     9 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-12-02 21:12:52 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636#define PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY "Unknown logging keyword %c."
    3737#define PS_ERRORTEXT_psMemory_NULL_BLOCK "NULL memory block found."
    38 #define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %ld was freed but still being used."
    39 #define PS_ERRORTEXT_psMemory_UNDERFLOW "Memory block %ld is corrupted; buffer underflow detected."
    40 #define PS_ERRORTEXT_psMemory_OVERFLOW "Memory block %ld is corrupted; buffer overflow detected."
    41 #define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %ld, allocated at %s:%d, freed multiple times at %s:%d."
     38#define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %lld was freed but still being used."
     39#define PS_ERRORTEXT_psMemory_UNDERFLOW "Memory block %lld is corrupted; buffer underflow detected."
     40#define PS_ERRORTEXT_psMemory_OVERFLOW "Memory block %lld is corrupted; buffer overflow detected."
     41#define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %lld, allocated at %s:%d, freed multiple times at %s:%d."
    4242#define PS_ERRORTEXT_psString_NCHAR_NEGATIVE "Can not copy a negative number of characters (%d)."
    4343#define PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT "Sub-component %d of node %s in trace tree is NULL."
  • trunk/psLib/src/sysUtils/psTrace.c

    r2426 r2600  
    77 *
    88 *  @author Robert Lupton, Princeton University
    9  *  @author George Gusciora, MHPCC
     9 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-11-24 20:12:28 $
     11 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-12-02 21:12:52 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
Note: See TracChangeset for help on using the changeset viewer.