IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4143


Ignore:
Timestamp:
Jun 7, 2005, 2:26:01 PM (21 years ago)
Author:
desonia
Message:

removed SLALIB functions.

Location:
trunk/psLib
Files:
19 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/Makefile.am

    r3938 r4143  
    1515        psTime.c \
    1616        psCoord.c \
    17         psAstrometry.c \
    18         aoppa.f aopqk.f oapqk.f airmas.f eqeqx.f geoc.f refco.f aoppat.f \
    19         dranrm.f dcs2c.f refz.f refro.f dcc2s.f gmst.f atms.f atmt.f nutc.f drange.f
     17        psAstrometry.c
    2018
    2119BUILT_SOURCES = psAstronomyErrors.h
     
    3129        psCoord.h \
    3230        psAstrometry.h \
    33         psPhotometry.h \
    34         slalib.h
     31        psPhotometry.h
    3532
  • trunk/psLib/src/astronomy/psAstrometry.c

    r4051 r4143  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-05-31 21:47:46 $
     10 *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-08 00:26:01 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2929#include "psTrace.h"
    3030#include "psLogMsg.h"
    31 
    32 #include "slalib.h"
    3331
    3432/*****************************************************************************
     
    233231    *(float *)&exp->positionAngle = 0.0f; // XXX: need input, see Bug #207
    234232    *(float *)&exp->parallacticAngle = 0.0f; // XXX: need input, see Bug #207
    235     *(float *)&exp->airmass = slaAirmas(zenithDistance);
     233    *(float *)&exp->airmass = 0.0f; // XXX: needs calculation!  = slaAirmas(zenithDistance);
    236234    *(float *)&exp->parallacticFactor = 0.0f;
    237235    exp->cameraName = NULL;
     
    408406    PS_ASSERT_PTR_NON_NULL(exp, NULL);
    409407
    410     double date = psTimeToMJD(exp->time);
    411     double dut = psTimeGetUT1Delta(exp->time,PS_IERS_A);
    412     double elongm = exp->observatory->longitude;
    413     double phim = exp->observatory->latitude;
    414     double hm = exp->observatory->height;
    415 
    416408    psSphere* polarMotion = p_psTimeGetPoleCoords(exp->time);
    417     double xp = polarMotion->r;
    418     double yp = polarMotion->d;
     409
     410    psGrommit* grommit = (psGrommit* ) psAlloc(sizeof(psGrommit));
     411
     412    *(double*)&grommit->latitude = exp->observatory->latitude;
     413    *(double*)&grommit->longitude = exp->observatory->longitude;
     414    *(double*)&grommit->height = exp->observatory->height;
     415    *(double*)&grommit->abberationMag = 0.0; // XXX: need to figure out what to set here.
     416    *(double*)&grommit->temperature = exp->temperature;
     417    *(double*)&grommit->pressure = exp->pressure;
     418    *(double*)&grommit->humidity = exp->humidity;
     419    *(double*)&grommit->wavelength = exp->wavelength;
     420    *(double*)&grommit->lapseRate = exp->observatory->tlr;
     421    *(double*)&grommit->refractA = polarMotion->r; // XXX: need to figure out what to set here too.
     422    *(double*)&grommit->refractB = polarMotion->d; // XXX: need to figure out what to set here too.
     423    *(double*)&grommit->siderealTime = psTimeToMJD(exp->time); // XXX: this is probably not correct
     424
    419425    psFree(polarMotion);
    420 
    421     double tdk = exp->temperature;
    422     double pmb = exp->pressure;
    423     double rh = exp->humidity;
    424     double wl = exp->wavelength;
    425     double tlr = exp->observatory->tlr;
    426 
    427     psGrommit* grommit = (psGrommit* ) psAlloc(sizeof(psGrommit));
    428 
    429     slaAoppa(date, dut, elongm, phim, hm, xp, yp,
    430              tdk, pmb, rh, wl, tlr, (double*)grommit);
    431426
    432427    return (grommit);
     
    579574    PS_ASSERT_PTR_NON_NULL(grommit, NULL);
    580575
    581     double AOB = 0.0;
    582     double ZOB = 0.0;
    583     double HOB = 0.0;
    584576    if (outSphere == NULL) {
    585577        outSphere = (psSphere* ) psAlloc(sizeof(psSphere));
    586578    }
    587579
    588     slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit,
    589              &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d);
     580    // XXX: this was done by a SLALIB call -- needs to be reimplemented
     581    psWarning("Warning!  psCoordTPToSky functionality is no longer implemented");
     582    /* slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit,
     583             &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d); */
    590584
    591585    return (outSphere);
     
    693687    PS_ASSERT_PTR_NON_NULL(grommit, NULL);
    694688
    695     char* type = "RA";
     689    // char* type = "RA";
    696690
    697691    if (tpCoord == NULL) {
     
    699693    }
    700694
    701     slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y);
     695    // XXX: this was done by a SLALIB call -- needs to be reimplemented
     696    psWarning("Warning!  psCoordSkyToTP functionality is no longer implemented");
     697    /* slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y); */
    702698
    703699    return(tpCoord);
  • trunk/psLib/src/astronomy/psAstrometry.h

    r3598 r4143  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-03-31 23:01:46 $
     10*  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-08 00:26:01 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4444typedef struct
    4545{
    46     const double latitude;             ///< geodetic latitude (radians)
    47     const double sinLat;               ///< sine of geodetic latitude
    48     const double cosLat;               ///< cosine of geodetic latitude
    49     const double abberationMag;        ///< magnitude of diurnal aberration vector
    50     const double height;               ///< height (HM)
    51     const double temperature;          ///< ambient temperature (TDK)
    52     const double pressure;             ///< pressure (PMB)
    53     const double humidity;             ///< relative humidity (RH)
    54     const double wavelength;           ///< wavelength (WL)
    55     const double lapseRate;            ///< lapse rate (TLR)
    56     const double refractA;             ///< refraction constant A (radians)
    57     const double refractB;             ///< refraction constant B (radians)
    58     const double longitudeOffset;      ///< longitude + ... (radians)
    59     const double siderealTime;         ///< local apparent sidereal time (radians)
     46    const double latitude;           ///< geodetic latitude (radians)
     47    const double longitude;          ///< longitude + ... (radians)
     48    const double height;             ///< height (HM)
     49    const double abberationMag;      ///< magnitude of diurnal aberration vector
     50    const double temperature;        ///< ambient temperature (TDK)
     51    const double pressure;           ///< pressure (PMB)
     52    const double humidity;           ///< relative humidity (RH)
     53    const double wavelength;         ///< wavelength (WL)
     54    const double lapseRate;          ///< lapse rate (TLR)
     55    const double refractA, refractB; ///< refraction constants A and B (radians)
     56    const double siderealTime;       ///< local apparent sidereal time (radians)
    6057}
    6158psGrommit;
  • trunk/psLib/test/astronomy/tst_psAstrometry01.c

    r3993 r4143  
    55*  @author GLG, MHPCC
    66*
    7 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-05-20 00:44:12 $
     7*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-06-08 00:26:01 $
    99*
    1010* XXX: Must test
     
    381381
    382382    printf("grom->latitude is %.2f\n", grom->latitude);
    383     printf("grom->sinLat is %.2f\n", grom->sinLat);
    384     printf("grom->cosLat is %.2f\n", grom->cosLat);
     383    printf("grom->longitude is %.2f\n", grom->longitude);
     384    printf("grom->height is %.2f\n", grom->height);
    385385    printf("grom->abberationMag is %.2f\n", grom->abberationMag);
    386     printf("grom->height is %.2f\n", grom->height);
    387386    printf("grom->temperature is %.2f\n", grom->temperature);
    388387    printf("grom->pressure is %.2f\n", grom->pressure);
     
    392391    printf("grom->refractA is %.2f\n", grom->refractA);
    393392    printf("grom->refractB is %.2f\n", grom->refractB);
    394     printf("grom->longitudeOffset is %.2f\n", grom->longitudeOffset);
     393
    395394    // printf("grom->siderealTime is %.2f\n", grom->siderealTime);
    396395
Note: See TracChangeset for help on using the changeset viewer.