IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2009, 10:49:08 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/raw/ipp.php

    r23419 r24759  
    412412}
    413413
    414 function check_restrict ($key, $where, $mode) {
     414function check_restrict ($key, $where, $mode, $scale) {
    415415  $htmlkey = preg_replace ('|\.|', '_', $key);
    416416  if ($mode == 'min') {
     
    431431  } else {
    432432    $where = "WHERE";
     433  }
     434
     435  if ($scale != 1.0) {
     436    $fvalue = $value * $scale;
     437  } else {
     438    $fvalue = $value;
    433439  }
    434440
     
    439445  if ($mode == 'min') {
    440446    // can we pass the '%' through the html?
    441     $where = $where . " $key >= '$value'";
     447    $where = $where . " $key >= '$fvalue'";
    442448  }
    443449  if ($mode == 'max') {
    444450    // can we pass the '%' through the html?
    445     $where = $where . " $key <= '$value'";
     451    $where = $where . " $key <= '$fvalue'";
    446452  }
    447453
     
    613619  if ($format == '%T') {
    614620    $format = '%s';
     621  }
     622  if ($format == '%C') {
     623    $format = '%10.6f';
    615624  }
    616625  if ($format == '%t') {
Note: See TracChangeset for help on using the changeset viewer.