IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 14, 2005, 1:27:56 PM (22 years ago)
Author:
gusciora
Message:

Replace ADD projections with mathworks formulas.

File:
1 edited

Legend:

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

    r2983 r3000  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-01-13 22:45:28 $
     12*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-01-14 23:27:55 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    333333         
    334334        */
    335 
    336335        // ********************************************
    337336        // From the mathworks: http://mathworld.wolfram.com/GnomonicProjection.html
     
    431430        // delta_0 and phi_1 are the projection centers, not the point being projected.
    432431        // (delta_0, phi_1) == (projection->R, projection->D)
     432        // XXX: figure out how to use the two-argument atan2() here.
    433433        // ********************************************
    434434        psF32 row = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y));
    435435        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));
    437438        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))));
    439441        tmp->r = projection->R + tmpAtan;
    440442
Note: See TracChangeset for help on using the changeset viewer.