IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 7, 2004, 9:16:49 AM (22 years ago)
Author:
desonia
Message:

changes resulting of testing (bugs found).

File:
1 edited

Legend:

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

    r1981 r2001  
    88 *  @author George Gusciora, MHPCC
    99 *
    10  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-10-06 21:30:14 $
     10 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-10-07 19:16:46 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    186186}
    187187
     188static void exposureFree(psExposure* exp)
     189{
     190    if (exp != NULL) {
     191        psFree((void*)exp->time);
     192        psFree((void*)exp->observatory);
     193        psFree((void*)exp->cameraName);
     194        psFree((void*)exp->telescopeName);
     195    }
     196}
     197
    188198static void fixedPatternFree(psFixedPattern* fp)
    189199{
     
    256266
    257267
    258 psExposure* psExposureAlloc(double ra, double dec, double hourAngle,
    259                             double zenith, double azimuth, double localTime, float date,
    260                             float rotAngle, float temperature, float pressure, float humidity,
    261                             float exposureTime)
     268psExposure* psExposureAlloc(double ra,
     269                            double dec,
     270                            double hourAngle,
     271                            double zenithDistance,
     272                            double azimuth,
     273                            const psTime* time,
     274                            float rotAngle,
     275                            float temperature,
     276                            float pressure,
     277                            float humidity,
     278                            float exposureTime,
     279                            float wavelength,
     280                            const psObservatory* observatory)
    262281{
    263282    psExposure* exp = psAlloc(sizeof(psExposure));
     
    266285    *(double *)&exp->dec = dec;
    267286    *(double *)&exp->hourAngle = hourAngle;
    268     *(double *)&exp->zenith = zenith;
     287    *(double *)&exp->zenithDistance = zenithDistance;
    269288    *(double *)&exp->azimuth = azimuth;
    270     *(double *)&exp->localTime = localTime;
    271     *(float *)&exp->date = date;
    272289    *(float *)&exp->rotAngle = rotAngle;
    273290    *(float *)&exp->temperature = temperature;
     
    275292    *(float *)&exp->humidity = humidity;
    276293    *(float *)&exp->exposureTime = exposureTime;
     294    *(float *)&exp->wavelength = wavelength;
     295
     296    exp->time = psMemIncrRefCounter((void*)time);
     297    exp->observatory = psMemIncrRefCounter((void*)observatory);
     298
     299    // XXX: how is these value derived?
     300    *(double *)&exp->lst = psTimeToLST((psTime*)time,observatory->longitude);
     301    *(float *)&exp->positionAngle = 0.0f;
     302    *(float *)&exp->parallacticAngle = 0.0f;
     303    *(float *)&exp->airmass = 0.0f;
     304    *(float *)&exp->parallacticFactor = 0.0f;
     305    exp->cameraName = NULL;
     306    exp->telescopeName = NULL;
     307
     308    p_psMemSetDeallocator(exp,(psFreeFcn)exposureFree);
    277309
    278310    return exp;
     
    285317                                  double tlr)
    286318{
    287     psObservatory* obs = psAlloc(sizeof(obs));
    288 
    289     if (obs->name == NULL) {
     319    psObservatory* obs = psAlloc(sizeof(psObservatory));
     320
     321    if (name == NULL) {
    290322        obs->name = NULL;
    291323    } else {
Note: See TracChangeset for help on using the changeset viewer.