/*++++++++++++++
.IDENTIFICATION gsc2.h
.LANGUAGE       C
.AUTHOR         Francois Ochsenbein [CDS]
.ENVIRONMENT    USNO-A2.0 Catalogue
.KEYWORDS       CDS Catalogue Server
.VERSION  1.0   27-Jul-2001
.COMMENTS       Structures & Definitions concerning the USNO-A2 Catalog
---------------*/

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

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

typedef struct {
    float rho, theta, xy[2] ;
    int htm6, id ;
    double ra, de;		/* Radians */
    float ep;
    float e_ra, e_de ;
    float pmra, pmde, epm1, epm2 ;
    float Fmag, e_Fmag ;
    float Jmag, e_Jmag ;
    float Vmag, e_Vmag ;
    float Nmag, e_Nmag ;
    int class ;
    float a, e, pa ;
    int status ;
} GSC2rec ;

#define NULLxy	(-999999999)	/* Non-computed values for xy	*/

/*===========================================================================
		Prototypes Declarations
 *===========================================================================*/
 
int   gsc2_fopen  _ARG((char *filename)) ;
int   gsc2_open   _ARG((int htm_triangle)) ;	/* 0 = all sky, 2=S 1=N */
int   gsc2_close  _ARG((void));
int   gsc2_read   _ARG((GSC2rec *rec)) ;	/* Get next GSC2 record */
int   gsc2_get    _ARG((char *GSC2id, GSC2rec *rec)) ;

/* Edition: Option: 1 in sexa, 2=ID, 4=Epoch */
char *gsc2_head   _ARG((int opt)) ;
char *gsc2a       _ARG((GSC2rec *rec, int opt));

/* Search within limits, return number of tested records */
long  gsc2_circle _ARG((double o[2], double radius, int (*digest_routine)()));
long  gsc2_radec  _ARG((double ra[2], double de[2], int (*digest_routine)()));

#endif
