      COMMON /EDRDREC/ B_IDREC,B_ISCLK,B_IERT,
     . B_ITLMFMT,B_IOBSCUR,B_IRES1,B_IVALID,
     1 B_ITLMIN,B_IDSN,B_ISNR,B_IRSL,B_ILRSF,
     . B_IRES2,B_ILRS,B_IENGR,B_IAACS,B_IHRS
      BYTE DATBUF(1024)
      EQUIVALENCE (DATBUF,B_IDREC)

C_TITLE  EDRDAT  NIMS EDR file data record description (EDRDAT.INC)

C_VARS  TYPE        VARIABLE      DESCRIPTION
      BYTE          B_IDREC(2)	! EDR data record number
      BYTE          B_ISCLK(4)	! Spacecraft clock: RIM (high order 3 bytes)
      BYTE          B_IERT(4)	! Earth Received Time: (Bits 0-6 year,
C							7-15 day, 16-31 minute)
      BYTE          B_ITLMFMT	! Telemetry format (defined in GLL 3-280)
      BYTE          B_IOBSCUR	! Obscuration status: 0 not obscured, 1 maybe,
C						      2 obscured, 3 unknown
      BYTE          B_IRES1(2)	! Reserved
      BYTE          B_IVALID(10)	! Valid data flags, one byte per packet,
C				   1 bit per MOD8 count -- 1 if valid, 0 if not
      BYTE          B_ITLMIN	! Flags: bits 0-4: record ID of FID in LRS hdr
C					 bits 5-7: input source (0 SFDU, 1 SDR,
C							2 IDR, 3 SFDU, 4 EDR)
      BYTE          B_IDSN	! DSN station number
      BYTE          B_ISNR(2)	! Symbol Signal-to-Noise Ratio, GCF of 1st block
      BYTE          B_IRSL(2)	! Receiver Signal Level, GCF of 1st block
      BYTE          B_ILRSF(2)	! LRS error flags (see EDR SIS for details)
      BYTE          B_IRES2(3)	! Reserved
      BYTE          B_ILRS(3)	! Low rate science items
      BYTE          B_IENGR(2)	! LRS engineering items (including temps)
      BYTE          B_IAACS(2,12)   ! LRS AACS items
      BYTE          B_IHRS(96,10)	! 10 packets of NIMS HRS, including
C				!  housekeeping, background and sensor
C				!  data, latter two as packed 10-bit items

C_DESCR Record structure of NIMS EDR file data record:  See NIMS EDR SIS.
C
C	Note that the RIM count is in the high-order 3 bytes of the
C	spacecraft clock item.  For ease of use, it should probably
C	be extracted into the 3 low-order bytes of a 4-byte longword,
C	with zero high-order byte.  Likewise, the minor frame count
C	byte can be inserted into its own 4-byte item.

C_HIST	12feb90  R. Mehlman  ORIGINAL VERSION (incomplete)
C	13nov90  RMX  Completed version
C	17sep91  RMX  Detailed complete version
C_END
