C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_SET_DTILT    **
C**************************
C
C
CD-Doc:
C DTILt            SUBROUTINE LDM_SET_DTILT (VALUE, IERR, ERRSTR)
CD-end
      SUBROUTINE LDM_SET_DTILT (VALUE, IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set value of real parameter DTILT
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      REAL VALUE
      INTEGER IERR
      CHARACTER*(*) ERRSTR

C  VALUE     (R)   Value for the detector tilt degrees (any value)
C  IERR      (W)   Error flag =0 OK
C  ERRSTR    (W)   Error description string if error found
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      INCLUDE 'ldm_derived.finc'
      INCLUDE 'ldm_lrl.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      REAL*8 COSD, SIND
      EXTERNAL COSD, SIND
      IERR = 0
      ERRSTR = ' '
      DTILT = VALUE
      IS_DTILT = 1
      CH_DTILT = CH_MASK
      ND_DTILT = -1000
      COS_DTILT = COSD(DTILT)
      SIN_DTILT = SIND(DTILT)
      CALL LDM_CLR_GEN (-1, -1, 2)
      RETURN
      END
