/******************************************************************************* * E.S.O. - VLT project * * "@(#) $Id: AP.C,v 2.43 2004/06/17 23:04:27 vltsccm Exp $" * * who when what * -------- -------- ---------------------------------------------- * hummel 02/03/98 created * aaguayo 04/12/02 removed warning (APR2003) */ /************************************************************************ * NAME * AP - Automatic Positioning main C++ * * SYNOPSIS # AP filname * * DESCRIPTION * - creates an instance of TARG_set * - loads an target list from an external file * - creates an instance of AP_mask * - moves and rotates the the AP_mask in order * - to find a best-fit mask position. * - saves results in a target acquisition file * * FILES * AP.C AP.h * * ENVIRONMENT * * COMMANDS * * RETURN VALUES * * CAUTIONS * * EXAMPLES * * SEE ALSO * TARG, TARG_set, AP_mask * * BUGS * *------------------------------------------------------------------------ */ #define _POSIX_SOURCE 1 #define MAX_TARG 8 // Uncomment this if you are using the VLT environment // #include "vltPort.h" #include #include #include #include #include #include #include #include "AP_pixel.h" #include "AP_mask.h" #include "AP_targ.h" #include "AP_list.h" using namespace std; static char *rcsId="@(#) $Id: AP.C,v 2.43 2004/06/17 23:04:27 vltsccm Exp $"; static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId); int main(int argc, char *argv[]) { int i; i=argc; int debug=0; if (debug) { AP_pixel p; p.test(); AP_mask m; m.test(); // test functions of class TARG, defined in AP_targ.C cout << "test all functions of class TARG, defined in AP_targ.C" << endl; cout << "------------------------------------------------------" << endl; // name alp del pixX pixY mag prio TARG one("GSC086546546543", 10.0, -70.2, 100, 200, 23.4, 1); cout << "TARG constructed ok\n"; one.print(); cout << "TARG printed ok \n"; cout << one.get_nam() << "/" << one.get_RA() << "/" << one.get_DEC() << "/" << one.get_px() << "/" << one.get_py() << "/" << one.get_MAG() << "/" << one.get_PRI() << endl; cout << "TARG get methods ok \n"; one.set_RA(30.00); one.set_DEC(-30.0); one.set_px(50.3); one.set_py(1456.99); one.set_MAG(30.0); one.set_PRI(0); one.set_nam("SHORT_NAME"); cout << "TARG set methods ok \n"; one.print(); cout << "TARG print method ok \n"; one.set_RA(29.00); one.set_DEC(-30.0); one.set_MAG(8.5); one.set_px(1250.3); one.set_py(0.333); one.set_PRI(1); one.set_nam("NN"); cout << "TARG set methods ok \n"; one.print(); cout << "TARG print method ok \n"; } // create one instance of class TARG_set, defined in AP_list.C TARG_set k; /* cout << " declared ok\n"; for (i=0; i