IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

removed SLALIB functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.