Changeset 2001 for trunk/psLib/src/astronomy/psAstrometry.c
- Timestamp:
- Oct 7, 2004, 9:16:49 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psAstrometry.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r1981 r2001 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-10-0 6 21:30:14$10 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-10-07 19:16:46 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 186 186 } 187 187 188 static 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 188 198 static void fixedPatternFree(psFixedPattern* fp) 189 199 { … … 256 266 257 267 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) 268 psExposure* 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) 262 281 { 263 282 psExposure* exp = psAlloc(sizeof(psExposure)); … … 266 285 *(double *)&exp->dec = dec; 267 286 *(double *)&exp->hourAngle = hourAngle; 268 *(double *)&exp->zenith = zenith;287 *(double *)&exp->zenithDistance = zenithDistance; 269 288 *(double *)&exp->azimuth = azimuth; 270 *(double *)&exp->localTime = localTime;271 *(float *)&exp->date = date;272 289 *(float *)&exp->rotAngle = rotAngle; 273 290 *(float *)&exp->temperature = temperature; … … 275 292 *(float *)&exp->humidity = humidity; 276 293 *(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); 277 309 278 310 return exp; … … 285 317 double tlr) 286 318 { 287 psObservatory* obs = psAlloc(sizeof( obs));288 289 if ( obs->name == NULL) {319 psObservatory* obs = psAlloc(sizeof(psObservatory)); 320 321 if (name == NULL) { 290 322 obs->name = NULL; 291 323 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
