IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24758


Ignore:
Timestamp:
Jul 12, 2009, 10:48:52 AM (17 years ago)
Author:
eugene
Message:

RA & DEC based ranges should be in degrees not radians; convert in the query

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/scripts/generate

    r21044 r24758  
    308308        if ($value eq "*") { next; }
    309309        if ($format[$i] eq "%s") {
    310             print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n";
    311         } else {
    312             print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n";
    313             print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min');\n";
    314             print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max');\n";
    315         }
     310            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string', 1.0);\n";
     311            next;
     312        }
     313        if ($format[$i] eq "%C") {
     314            # convert the RA & DEC limits to radians for comparison
     315            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min', 0.017453);\n";
     316            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max', 0.017453);\n";
     317            next;
     318        }
     319        print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string', 1.0);\n";
     320        print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min', 1.0);\n";
     321        print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max', 1.0);\n";
    316322    }
    317323    print FILE "\$WHERE = check_ordering ('$GROUPS', \$WHERE);\n";
Note: See TracChangeset for help on using the changeset viewer.