IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2004, 3:34:09 PM (22 years ago)
Author:
desonia
Message:

adjusted the psTime functions to conform to SDRS and made psGrommitAlloc
set all the inputs to slaAoppa function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psAstrometry.c

    r2001 r2048  
    88 *  @author George Gusciora, MHPCC
    99 *
    10  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-10-07 19:16:46 $
     10 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-10-12 01:34:09 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    455455psGrommit* psGrommitAlloc(const psExposure* exp)
    456456{
     457    double* AOPRMS = psAlloc(sizeof(double)*14);
     458
    457459    if (exp == NULL) {
    458460        psAbort(__func__, "the 'exp' parameter is NULL\n");
    459461    }
    460462
    461     double date = TBD;  // XXX: "mjd" in psExposure will become a psTime
    462     // from which it will be possible to get UTC.
    463     double dut = 0.0;
    464     double elongm = TBD; // XXX
    465     double phim = TBD;   // XXX
    466     double hm = TBD;     // XXX
    467     double xp = 0.0;
    468     double yp = 0.0;
     463    double date = psTimeToMJD(exp->time);
     464    double dut = psTimeGetUT1Delta(exp->time);
     465    double elongm = exp->observatory->longitude;
     466    double phim = exp->observatory->latitude;
     467    double hm = exp->observatory->height;
     468
     469    psSphere* polarMotion = psTimeGetPoleCoords(exp->time);
     470    double xp = polarMotion->r;
     471    double yp = polarMotion->d;
     472    psFree(polarMotion);
     473
    469474    double tdk = exp->temperature;
    470475    double pmb = exp->pressure;
    471476    double rh = exp->humidity;
    472477    double wl = exp->wavelength;
    473     double tlr = TBD;    // XXX
    474     double *AOPRMS = NULL;
     478    double tlr = exp->observatory->tlr;
    475479
    476480    slaAoppa(date, dut, elongm, phim, hm, xp, yp,
     
    493497    *(double *)&grommit->siderealTime = AOPRMS[13];
    494498
     499    psFree(AOPRMS);
     500
    495501    return (grommit);
    496502}
Note: See TracChangeset for help on using the changeset viewer.