      CHARACTER*3 FUNCTION CONST1875(RA,DEC)
!
!     GIVEN THE EPOCH 1875.0 RIGHT ASCENSION (HOURS) AND DECLINATION
!     (DEGREES) OF A POINT, RETURN THE OFFICIAL IAU ABBREVIATION
!     FOR THE NAME OF THE CONSTELLATION IN WHICH THE POINT LIES.
!
!     B. KNAPP, 1994-12-27, 2000-12-28, 2001-04-24 (i*4)
!
!     REFERENCE: NANCY G. ROMAN, "IDENTIFICATION OF A CONSTELLATION
!     FROM A POSITION", PUBL. ASTRON. SOC. PACIFIC 99:695-699 (JULY
!     1987).
!
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
      IMPLICIT NONE

!     INPUT:
      REAL*4 RA, DEC
 
!     DATA FOR CONSTELLATION BOUNDARIES:
      INTEGER*4 N_DATA, N_CONST
      PARAMETER (N_DATA=358,N_CONST=88)

      CHARACTER*3 NAME(N_CONST) /
     &'And','Ant','Aps','Aqr','Aql','Ara','Ari','Aur','Boo','Cae','Cam',
     &'Cnc','CVn','CMa','CMi','Cap','Car','Cas','Cen','Cep','Cet','Cha',
     &'Cir','Col','Com','CrA','CrB','Crv','Crt','Cru','Cyg','Del','Dor',
     &'Dra','Equ','Eri','For','Gem','Gru','Her','Hor','Hya','Hyi','Ind',
     &'Lac','Leo','LMi','Lep','Lib','Lup','Lyn','Lyr','Men','Mic','Mon',
     &'Mus','Nor','Oct','Oph','Ori','Pav','Peg','Per','Phe','Pic','Psc',
     &'PsA','Pup','Pyx','Ret','Sge','Sgr','Sco','Scl','Sct','Ser','Sex',
     &'Tau','Tel','Tri','TrA','Tuc','UMa','UMi','Vel','Vir','Vol','Vul'
     &/

      INTEGER*4 CONST(N_DATA) /
     &   84,   84,   84,   84,   20,   11,   20,   11,   84,   34,   20,
     &   11,   84,   20,   11,   34,   84,   18,   34,   34,   20,   84,
     &   20,   34,   34,   20,   11,   34,   20,   11,   83,   34,   20,
     &   20,   18,   34,   18,   18,   11,   20,   11,   83,   34,   11,
     &   20,   20,   18,   51,   83,   34,   20,   11,   18,   34,   63,
     &   34,   18,   63,   51,   18,   83,   18,   18,   40,   34,   31,
     &   63,   83,   18,   83,   51,   31,   31,   31,   83,   83,    9,
     &   40,   51,    1,   63,   52,   63,   31,   45,    8,   51,    1,
     &   45,   45,    1,   63,   83,   13,   51,   47,    1,    9,    1,
     &   13,    1,   13,   80,   63,    8,   52,   83,   31,    8,   47,
     &   13,    1,   80,    8,   38,   31,   31,   80,   27,    9,   27,
     &   52,   47,   52,   80,   66,   47,   88,   78,    1,   76,   38,
     &   88,   88,    1,   88,   38,   88,   88,    7,   71,   60,   38,
     &   71,   78,   40,   71,   78,   78,   25,   40,   25,   38,   40,
     &   62,   78,   38,   62,   38,   40,   32,   62,   46,   60,   38,
     &   12,   62,    7,   32,    9,   62,   12,   46,   59,    5,   32,
     &   15,   76,   40,   59,   62,   66,   76,   32,   35,   62,   62,
     &   62,   15,   78,   60,   15,   86,   59,   21,   78,   76,   60,
     &   60,   76,   76,    5,   66,   46,   86,   66,   66,   86,   59,
     &    5,    4,   59,   55,   36,   60,   42,   77,   86,   59,    5,
     &   36,    4,   76,   75,   42,   59,   42,   29,   59,   49,   28,
     &   86,   42,   21,   36,   29,   28,   49,   59,   21,   16,    4,
     &   21,   42,   36,   48,   16,   42,   42,   49,   73,   36,   59,
     &   72,   42,   14,   42,   42,   37,   69,   36,   72,   67,   74,
     &   37,    2,   74,   64,   37,   36,   74,   19,   50,   73,   10,
     &   24,   68,   36,   73,   26,   72,   54,   36,   10,   50,   64,
     &   36,   41,   10,   39,   68,   85,   36,   41,   64,   17,   85,
     &   41,   33,   64,   36,   65,   50,   85,   17,   19,   50,   57,
     &   33,   85,   19,    6,   79,   39,   41,   65,   17,   64,   36,
     &   64,   33,   57,   44,   65,   23,    6,   23,    6,   65,   17,
     &   19,   30,   19,   23,    6,   41,   70,   23,    6,   61,   82,
     &   33,   23,   81,   82,   43,   87,   17,   56,   61,   44,   82,
     &   82,   43,   22,    3,   53,   58/
     
      REAL*4 DECL(N_DATA) /
     & 5280, 5190, 5170, 5160, 5100, 4920, 4800, 4800, 4800, 4800, 4620,
     & 4620, 4500, 4500, 4410, 4410, 4200, 4080, 4020, 3990, 3960, 3960,
     & 3960, 3840, 3780, 3780, 3720, 3690, 3655, 3600, 3600, 3570, 3570,
     & 3545, 3510, 3480, 3450, 3420, 3420, 3375, 3360, 3330, 3330, 3300,
     & 3300, 3290, 3240, 3240, 3180, 3180, 3165, 3150, 3150, 3090, 3030,
     & 3030, 3000, 3000, 3000, 3000, 2910, 2880, 2880, 2850, 2850, 2850,
     & 2820, 2820, 2760, 2700, 2670, 2640, 2625, 2610, 2520, 2400, 2400,
     & 2400, 2385, 2205, 2205, 2190, 2160, 2160, 2160, 2130, 2130, 2100,
     & 2100, 2070, 2070, 2040, 2040, 2040, 2010, 2010, 1980, 1980, 1925,
     & 1920, 1880, 1845, 1840, 1840, 1800, 1800, 1740, 1740, 1710, 1710,
     & 1710, 1680, 1680, 1680, 1680, 1680, 1650, 1635, 1620, 1560, 1560,
     & 1560, 1530, 1530, 1500, 1425, 1410, 1410, 1370, 1320, 1320, 1290,
     & 1275, 1265, 1260, 1230, 1200, 1170, 1150, 1140, 1110, 1080, 1050,
     &  970,  960,  960,  945,  930,  930,  900,  860,  840,  810,  770,
     &  750,  750,  750,  750,  720,  720,  710,  710,  660,  600,  600,
     &  600,  600,  595,  510,  480,  450,  420,  420,  375,  375,  360,
     &  330,  270,  240,  180,  165,  120,  120,  120,  120,  120,  120,
     &  105,   90,    0,    0,    0,    0,    0, -105, -105, -195, -240,
     & -240, -240, -240, -240, -240, -360, -360, -420, -420, -480, -480,
     & -540, -540, -600, -660, -660, -660, -660, -660, -660, -700, -722,
     & -870, -900, -960, -960,-1020,-1095,-1140,-1140,-1155,-1200,-1320,
     &-1320,-1440,-1463,-1463,-1470,-1470,-1470,-1475,-1530,-1530,-1530,
     &-1530,-1590,-1635,-1635,-1680,-1750,-1770,-1770,-1770,-1800,-1800,
     &-1800,-1870,-1980,-1980,-2100,-2160,-2205,-2220,-2220,-2220,-2220,
     &-2375,-2385,-2400,-2400,-2400,-2400,-2400,-2520,-2520,-2520,-2580,
     &-2580,-2580,-2640,-2730,-2730,-2730,-2730,-2760,-2790,-2880,-2890,
     &-2940,-2940,-2940,-3000,-3045,-3045,-3060,-3060,-3090,-3150,-3180,
     &-3190,-3190,-3210,-3240,-3240,-3240,-3270,-3300,-3300,-3300,-3300,
     &-3390,-3390,-3390,-3420,-3420,-3420,-3450,-3450,-3480,-3510,-3510,
     &-3510,-3540,-3600,-3600,-3660,-3660,-3660,-3815,-3815,-3840,-3840,
     &-3840,-3840,-3840,-3900,-3900,-4050,-4050,-4050,-4050,-4050,-4050,
     &-4200,-4200,-4200,-4500,-4500,-4500,-4500,-4500,-4500,-4500,-4500,
     &-4560,-4950,-4950,-4950,-5100,-5400/
     
      REAL*4 RAL(N_DATA) /
     &    0,28800,75600,64800,    0,33000,    0,38400,63000,72600,    0,
     &41400,59520,72600,28680,33000,46800,11160,73500,40800,    0,50400,
     &84900,43200,48600,83400,21960,72000,73932,25200,28680,71160,72000,
     &82320,    0,69900, 6120, 8760,11160,80340,18000,50520,51900,11400,
     &79680,74160,    0,21960,43500,54900,79080,12000,82320,56700, 7350,
     &61200,    0, 4920,23400,84000,48600,    0,84900,65430,65640,68700,
     & 6000,30300,  600,43200,24480,78870,78750,69000,33000,36600,55560,
     &56700,33300,    0, 9060,69690,16200,78240,78750,23520,26520,    0,
     &79200,82140,82320, 9240,38820,43200,27900,33300, 2580,54660,84600,
     &44400,85500,50250, 8700, 9780,16200,65430,39600,70800,17100,35580,
     &47700,    0, 5070,21180,28380,75300,69330, 6900,58200,54300,54660,
     &66120,38700,67920, 6000, 2580,37800,76500,20520,  240,57300,21180,
     &71400,67920,  510,72900,28110,74040,69300,11820,67920,20520,22380,
     &68400,17880,57300,71400,16620,19200,46200,62100,42720,27000,60300,
     &    0,20160,25200,76020,22710,65700,75150,75780,41460,22470,24960,
     &28110,85800, 6000,72510,48600,81900,28530,33300,65700,67184,75000,
     &25200,65700,57900,65700,77280,    0,66900,73080,75000,76800,79200,
     &78000,25260,12900,16620,25920,52800,64200, 9540,11820,54300,16800,
     &21000,64200,65700,66900,81900,38700,41460,    0,85800,51300,57300,
     &72000,76800,61800,21000,17700,18300,29100,34500,42600,63300,67920,
     &17400,73920,61800,65700,30120,58560,30900,38700,58560,56400,45300,
     &46200,32700, 6000, 9540,39000,42600,51300,58560,    0,76800,78720,
     &85800,35100,16920,17400,72000,36900,45300,53700,56400,16500,60300,
     &63360,38100,22020,44100,39000,12600,30120,15360,64200,76800,82800,
     &10800,33720,    0,    0, 6000,13920,84000,51000,56400,57600,17400,
     &18000,28800,12300,59115,64200,69000,73200,10800,16200,55200,    0,
     & 9600,14700,15360,76800,21600,28800, 8700,13800,    0,21600,29400,
     &12600,13800,    0, 7800,16200,54180,30420,22200,42600,51000,54180,
     &14400,31800,39600,63000,64800,79200,11520,18000,23400,    0, 4800,
     &84000,15600,55200,73200,19800,54600,59115,53700,59700,21600,24600,
     &40500,42600,46200,48600,60300, 7800,11520,53100,60600,63000,79200,
     &16500,49200,53100,    0,12600,23700,32520,40500,64800,76800,84000,
     & 2700,    0,27600,49200,12600,    0/
     
      REAL*4 RAU(N_DATA) /
     &86400,52200,82800,75600,28800,38400,18000,52200,64800,75600,12630,
     &48900,63000,74400,33000,40800,59520,12300,74400,43200, 1200,56400,
     &86400,48600,51900,84900,25200,73500,74160,28680,30300,72000,73932,
     &83400, 8760,71160, 6870,11160,11400,82320,21960,51900,69900,12000,
     &80340,79080, 6120,23400,48600,56700,79680,18000,84000,61200, 9060,
     &65640, 4920, 6000,24480,86400,50520, 4020,86400,65640,68700,69000,
     & 7350,33000, 3120,43500,26520,79080,78870,69840,36600,38820,56700,
     &58800,34500, 9060, 9240,69840,16890,78750,79200,26520,27900, 7200,
     &82140,82320,84600, 9780,39600,44400,33300,35580, 5070,55560,85500,
     &47700,86400,50520, 9780,16200,17100,69690,43200,75300,21180,37800,
     &50250,  240, 6000,23520,28800,78240,70800, 8700,58800,54660,58200,
     &67920,39600,69330, 6900, 3060,38700,77100,21180,  510,57720,22380,
     &72900,69300, 3060,74040,28380,76500,71400,12120,68400,20760,22710,
     &71400,19200,57900,72900,17880,20160,48600,65700,46200,28110,62100,
     &  510,20760,27000,76800,24960,67920,75780,76020,42720,22710,25200,
     &28530,86400,11820,73080,54300,85800,33300,38700,67184,67920,75150,
     &25260,66330,60300,66330,78000, 7200,67920,75000,76800,77280,81900,
     &79200,25920,16620,16800,29100,54300,65700,11820,12900,58560,18300,
     &22470,64680,66900,67920,85800,41460,42600, 1200,86400,52800,58560,
     &73920,78720,64680,29100,18300,21000,30120,38700,46200,63600,72000,
     &17700,76800,65700,67920,30900,58950,32700,39000,58950,57300,46200,
     &51300,35100, 9540,13500,42600,45300,53700,60300, 6000,78720,85800,
     &86400,36900,17400,22020,76800,38100,53700,56400,57600,16920,63360,
     &64200,39000,26520,45300,44100,13500,33720,16500,69000,82800,84000,
     &12600,39600, 6000, 6000,10800,15360,86400,53700,57600,59115,18000,
     &23700,30120,13920,64200,69000,73200,76800,12300,17400,56400, 8400,
     &10800,15360,16200,79200,28800,29400, 9600,14700, 6600,22200,30420,
     &13800,14400, 5700, 8700,18000,55200,31800,23400,46200,54180,55200,
     &15600,39600,40500,64800,73200,84000,12600,19800,24600, 4800, 7800,
     &86400,16500,59115,76800,21600,55200,59700,54600,60300,24600,32520,
     &42600,46200,52320,49200,60600,11520,16500,53700,63000,64800,84000,
     &23700,53100,61200, 4800,16500,32520,40500,49200,76800,84000,86400,
     & 4800,12600,49200,64800,27600,86400/

      SAVE NAME, CONST, DECL, RAL

!     LOCAL VARIABLES
      INTEGER*4 JL, JM, JU, K
      REAL*4 RAS, DECM

!     CONVERT RA TO SECONDS AND DEC TO MINUTES
      RAS = 3600.*RA
      DECM = 60.*DEC

!     BINARY SEARCH FOR FIRST OCCURRENCE OF A DECLINATION LESS THAN
!     OR EQUAL TO DECM
      JL=1
      JU=N_DATA
      DO WHILE (JU-JL .GT. 1)
         JM = (JU+JL)/2
         IF (DECM .LT. DECL(JM)) THEN
             JL = JM
         ELSE
             JU = JM
         ENDIF
      ENDDO
      IF (DECM .LT. DECL(JL)) THEN
         K = JU
      ELSE
         K = JL
      ENDIF

!     LINEAR SEARCH FOR FIRST OCCURRENCE OF BRACKETING RIGHT
!     ASCENSIONS
      DO WHILE (K.LT.N_DATA .AND.
     &  .NOT. (RAL(K).LE.RAS .AND. RAS.LT.RAU(K)))
        K=K+1
      ENDDO

!     DID WE FIND IT?
      IF (DECM.GE.DECL(K) .AND. RAL(K).LE.RAS .AND. RAS.LT.RAU(K)) THEN
         CONST1875 = NAME(CONST(K))
      ELSE
         CONST1875 = '???'
      ENDIF
      RETURN
      END
