	/* some global variables */

#ifndef VERBOSE
#undef VERBOSE					/* print out LOTS of information */
#endif

#define MAX_TARGETS      5000	/* max number of possible targets which can */
                   	      		/*   considered for a single night */
#define NAME_LEN          80	/* max length of object name */

#define SLOP_TIME         30.0	/* time interval between exposures due to */
                              	/* chip readout, telescope slew, etc. */

    /* a macro for getting the Modified Julian Date from a JD */
#define MJD(jd)     ((jd) - 2440000)

	/* the object structure */

struct s_object {
	char name[NAME_LEN];	/* object name */
	double ra;				/* object RA */
	double dec;				/* object Dec */
	double exp_time;		/* desired length of exposure (seconds) */
	double lst_start;		/* LST of start of requested observing window */
	double lst_end;			/* LST of end of requested observing window */
	int vis_flag;			/* 1 visible once tonight, 2 twice, 0 never */
	double jd_start[2];		/* JD of beg. of observing windows tonight */
	double jd_end[2];		/* JD of end of windows */
	int win_used[2];		/* 1 means this obs. window used, 0 not used */
	struct s_object *next;	/* pointer to next object */
};

	/* the group structure - the observing time fields are analogous to
	   those in the object strucure above, but apply to the group of 
	   objects altogether. */

struct s_group {
	char reqid[NAME_LEN];	/* the group's file name (minus extension) */
	int priority;		/* priority of target: SMALL number -> HIGH priority */
	int daystart;		/* starting date (# days since 1990) */
	int dayend;			/* ending date (# days since 1990) */
	int num_obs;		/* number of observations to go for this group */
	double exp_time;	/* total exposure time for the group */
	double utstart;		/* if >= 0, the UT the observation MUST take place */
	double probability;	/* probability that observation, if scheduled, */
	                   	/*    should be made (0.0 never, 1.0 always) */
	double moon_max;	/* max phase of moon allowable (0.0 new, 1.0 full) */
	int vis_flag;		/* 1 visible once tonight, 2 twice, 0 never */
	double jd_start[2];	/* JD of beg. of observing windows tonight */
	double jd_end[2];	/* JD of end of windows */
	int win_used[2];		/* 1 means this obs. window used, 0 not used */
	int done_yet;		/* 1 already done tonight, 0 still not done */
	struct s_object *object;	/* pointer to list of objects in group */
};
