IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2009, 12:51:29 PM (17 years ago)
Author:
Paul Price
Message:

Adding limit on great circle distance, using Haversine formula

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/difftool.c

    r23633 r23634  
    12741274                   "ABS(TIME_TO_SEC(TIMEDIFF(inputRawExp.dateobs, templateRawExp.dateobs)))", "<=");
    12751275    PXOPT_COPY_F32(config->args, selectWhere, "-rotdiff", "ABS(inputRawExp.posang - templateRawExp.posang)", "<=");
     1276    // Haversine formula for great circle distance
     1277    PXOPT_COPY_F32(config->args, selectWhere, "-distance",
     1278                   "DEGREES(2*ASIN(SQRT(POW(SIN(inputRawExp.decl - templateRawExp.decl),2) + COS(inputRawExp.decl)*COS(templateRawExp.decl)*POW(SIN(inputRawExp.ra - templateRawExp.ra),2))))", "<=");
    12761279
    12771280    // Restrictions for inserting skycells
Note: See TracChangeset for help on using the changeset viewer.