Changeset 3000 for trunk/psLib/src/astronomy
- Timestamp:
- Jan 14, 2005, 1:27:56 PM (22 years ago)
- Location:
- trunk/psLib/src/astronomy
- Files:
-
- 2 edited
-
psAstrometry.c (modified) (2 diffs)
-
psCoord.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r2990 r3000 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.5 6$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-01-14 01:13:15 $10 * @version $Revision: 1.57 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-01-14 23:27:55 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 310 310 exp->observatory = psMemIncrRefCounter((psPtr)observatory); 311 311 312 // XXX: how is th esevalue derived?312 // XXX: how is this value derived? 313 313 *(double *)&exp->lst = psTimeToLST((psTime*)time,observatory->longitude); 314 314 *(float *)&exp->positionAngle = 0.0f; // XXX: need input, see Bug #207 -
trunk/psLib/src/astronomy/psCoord.c
r2983 r3000 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01-1 3 22:45:28$12 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-14 23:27:55 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 333 333 334 334 */ 335 336 335 // ******************************************** 337 336 // From the mathworks: http://mathworld.wolfram.com/GnomonicProjection.html … … 431 430 // delta_0 and phi_1 are the projection centers, not the point being projected. 432 431 // (delta_0, phi_1) == (projection->R, projection->D) 432 // XXX: figure out how to use the two-argument atan2() here. 433 433 // ******************************************** 434 434 psF32 row = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y)); 435 435 psF32 C = atan(row); 436 tmp->d = asin((cos(C) * sin(projection->D)) + ((coord->y * sin(C) * cos(projection->D)) / row)); 436 tmp->d = asin((cos(C) * sin(projection->D)) + 437 ((coord->y * sin(C) * cos(projection->D)) / row)); 437 438 psF32 tmpAtan = atan((coord->x * sin(C)) / 438 ((row * cos(projection->D) * cos(C)) - (coord->y * sin(projection->D) * sin(C)))); 439 ((row * cos(projection->D) * cos(C)) - 440 (coord->y * sin(projection->D) * sin(C)))); 439 441 tmp->r = projection->R + tmpAtan; 440 442
Note:
See TracChangeset
for help on using the changeset viewer.
