/*++++++++++++++
.IDENTIFICATION ucac.h
.LANGUAGE       C
.AUTHOR         Francois Ochsenbein [CDS]
.ENVIRONMENT    USNO-A2.0 Catalogue
.KEYWORDS       CDS Catalogue Server
.VERSION  1.0   01-Mar-1997
.VERSION  2.0   20-Oct-1998: USNO-A2.0
.COMMENTS       Structures & Definitions concerning the USNO-A2 Catalog
---------------*/

#ifndef UCAC_DEF
#define UCAC_DEF	0
#ifndef _ARG
#ifdef __STDC__
#define _ARG(A)	A    /* ANSI */
#else
#define _ARG(A)	()  /* non-ANSI */
#define const
#endif
#endif

/*===========================================================================
		Structures 
 *===========================================================================*/

typedef struct {
    short zone ;		/* Original zone number	(0.5dg)	*/
    unsigned char no, nc ;	/* # Observations, Catalogs	*/
    long id, ra, sd ;		/* RA and South Polar Dist, mas	*/
    short sra, ssd;		/* Sigmas on ra and sd, mas	*/
    long epoch ;		/* Epoch in myr (0.001 yr)	*/
    short mag ;			/* UCAC1  magnitude		*/
    short unused ;		/* For future magnitude...	*/
    int pmra, pmsd, pmtot ;	/* Proper motions, 0.1mas/yr	*/
    short spmra, spmsd ;	/* Sigmas on pm's, 0.1mas/yr	*/
    long rho, theta ;		/* Distance from center (mas)	*/
    long xy[2] ;		/* Values of proj. x,y  (mas)	*/
} UCACrec ;
#define NULLxy	(-999999999)	/* Non-computed values for xy	*/

/*===========================================================================
		Prototypes Declarations
 *===========================================================================*/
 
int   ucac_init   _ARG((char *UCACroot)) ;
char *ucac66      _ARG((UCACrec *pr)) ;		/* Edition as original */
char *ucac2a      _ARG((UCACrec *pr, int opt)) ;
		/* Option: 1 in sexa, 2=ID, 4=Epoch */
char *ucac_head   _ARG((int opt)) ;
long  ucac_seek   _ARG((long ra, long sd)) ; 	/* Position in mas */
long  ucac_search _ARG((long ra[2], long sd[2], int (*digest_routine)())) ;
int   ucac_set    _ARG((long id)) ;
int   ucac_zopen  _ARG((int zone)) ;
int   ucac_get    _ARG((long id, UCACrec *rec)) ;
int   ucac_read   _ARG((UCACrec *rec)) ;
int   ucac_stop   _ARG((int stopping_flag)) ;	/* 0=not, 1=eoZ, 2=eoChunk */
#endif
