Changeset 3000 for trunk/psLib/src/astronomy/psCoord.c
- Timestamp:
- Jan 14, 2005, 1:27:56 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psCoord.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
