/* SetNod: A program which lets you set nod offset values. */ /* Robert R. Howell 02/11/92 23:57 LynxOS version */ #include #include #include #include #include #include "wirotypes.h" #include "track.h" #include "wiro.h" struct wiro_memory *tinfo, *get_tinfo(); main(int argc, char *argv[]) { double new_ha, new_dec; char s1[129]; tinfo = get_tinfo(); /* Attach shared memory */ if (argc <3) { printf("\n SETNOD HAvalue.vvv DECvalue.vvv sets the distance"); printf("\n to the B beam. The values are in arcseconds, and"); printf("\n W and N are positive. ); printf("\n The current values are %8.2lf %8.2lf", NOD_HA, NOD_DEC); exit(1); } new_ha = atol(argv[1]) / 3600.; new_dec = atol(argv[2]) / 3600.; if (fabs(new_ha) < 2.0001 && fabs(new_dec) < 2.0001) { NOD_HA = new_ha; NOD_DEC = new_dec; sprintf(s1, "setnod %s %s", argv[1], argv[2]); logf(s1); } else /* { */ /* printf("\nThe maximum value allowed is 2 degrees."); */ exit(1); } }