IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 16, 2020, 2:04:27 PM (6 years ago)
Author:
tdeboer
Message:

quick undo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/skyregion.c

    r41340 r41341  
    55 
    66  int N;
     7
     8  // alternate call form: skyregion -box Rcenter Dcenter radius
     9  if ((N = get_argument (argc, argv, "-box"))) {
     10    if ((N != 1) && (argc != 5)) {
     11      gprint (GP_ERR, "USAGE: skyregion -box (Rcenter) (Dcenter) (radius)\n");
     12      gprint (GP_ERR, "  Rcenter, Dcenter, radius in decimal degrees\n");
     13      return (FALSE);
     14    }
     15
     16    // argv[1] = -box
     17    double Rcenter = atof(argv[2]);
     18    double Dcenter = atof(argv[3]);
     19    double Radius  = atof(argv[4]);
     20
     21    double Rmin = Rcenter - Radius/cos(DEG_RAD*Dcenter);
     22    double Rmax = Rcenter + Radius/cos(DEG_RAD*Dcenter);
     23    double Dmin = Dcenter - Radius;
     24    double Dmax = Dcenter + Radius;
     25
     26    set_skyregion (Rmin, Rmax, Dmin, Dmax);
     27    return TRUE;
     28  }
     29 
    730
    831  // dvo_client should have 2 standard arguments: -hostID and -hostdir
     
    2649      gprint (GP_ERR, "current skyregion: %f - %f : %f - %f\n", Rmin, Rmax, Dmin, Dmax);
    2750      gprint (GP_ERR, "USAGE:  skyregion (min RA) (max RA) (min DEC) (max DEC)\n");
     51      gprint (GP_ERR, "        skyregion -box (RA) (DEC) (radius) [sets Rmin,Rmax & Dmin,Dmax]\n");
    2852      return FALSE;
    2953    }
Note: See TracChangeset for help on using the changeset viewer.