<?xml version="1.0"?>
<cd:Record format="binary" name="MIP_NL__0P_MDSR" last-modified="2010-08-26" xmlns:cd="http://www.stcorp.nl/coda/definition/2008/07">
  <cd:Field name="dsr_time">
    <cd:Time timeformat="binary_envisat_datetime">
      <cd:Description>ISP Sensing Time</cd:Description>
    </cd:Time>
  </cd:Field>
  <cd:Field name="gsrt">
    <cd:Time timeformat="binary_envisat_datetime">
      <cd:Description>Ground Station Reference Time of reception</cd:Description>
    </cd:Time>
  </cd:Field>
  <cd:Field name="isp_length">
    <cd:Integer>
      <cd:Description>Length of the ISP = length of the source packet - 7 bytes</cd:Description>
      <cd:Unit>bytes</cd:Unit>
      <cd:BitSize>16</cd:BitSize>
      <cd:NativeType>uint16</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="crc_errs">
    <cd:Integer>
      <cd:Description>Number of VCDUs in the ISP which contain a CRC error</cd:Description>
      <cd:BitSize>16</cd:BitSize>
      <cd:NativeType>uint16</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="rs_errs">
    <cd:Integer>
      <cd:Description>Number of VCDUs in the ISP for which a Reed-Solomon error correction was performed</cd:Description>
      <cd:BitSize>16</cd:BitSize>
      <cd:NativeType>uint16</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="spare_1">
    <cd:Array>
      <cd:Description>Spare (set to zero)</cd:Description>
      <cd:Dimension>2</cd:Dimension>
      <cd:Integer>
        <cd:BitSize>8</cd:BitSize>
        <cd:NativeType>uint8</cd:NativeType>
      </cd:Integer>
    </cd:Array>
    <cd:Hidden/>
  </cd:Field>
  <cd:Field name="packet_header">
    <cd:NamedType id="CCSDS_packet_header"/>
  </cd:Field>
  <cd:Field name="datafield_header_length">
    <cd:Integer>
      <cd:Description>Data Field Header Length</cd:Description>
      <cd:BitSize>16</cd:BitSize>
      <cd:NativeType>uint16</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="icu_mode_id">
    <cd:Integer>
      <cd:Description>ICU Mode ID</cd:Description>
      <cd:BitSize>8</cd:BitSize>
      <cd:NativeType>uint8</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="instr_mode_spare_0">
    <cd:Raw>
      <cd:Description>spare</cd:Description>
      <cd:BitSize>3</cd:BitSize>
    </cd:Raw>
    <cd:Hidden/>
  </cd:Field>
  <cd:Field name="rate">
    <cd:Integer>
      <cd:Description>Packet Version Number</cd:Description>
      <cd:BitSize>1</cd:BitSize>
      <cd:NativeType>uint8</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="mode_activity">
    <cd:Integer>
      <cd:Description>Instrument Mode/Activity</cd:Description>
      <cd:BitSize>4</cd:BitSize>
      <cd:NativeType>uint8</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="icu">
    <cd:Integer>
      <cd:Description>Estimated value for the ICU On-Board Time when the current measurement began.</cd:Description>
      <cd:BitSize>32</cd:BitSize>
      <cd:NativeType>uint32</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="packet_type_id">
    <cd:Integer>
      <cd:Description>Packet Type ID. 0 = no auxiliary data included ; 1 = auxiliary data included, first set in sequence; 2 = auxiliary data included, second set in sequence.</cd:Description>
      <cd:BitSize>4</cd:BitSize>
      <cd:NativeType>uint8</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="igm_id">
    <cd:Integer>
      <cd:Description>Counter generated by the SPE which is incremented by one for each new IGM at the SPE.</cd:Description>
      <cd:BitSize>16</cd:BitSize>
      <cd:NativeType>uint16</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="num_blocks">
    <cd:Integer>
      <cd:Description>Number of blocks in packet</cd:Description>
      <cd:BitSize>4</cd:BitSize>
      <cd:NativeType>uint8</cd:NativeType>
    </cd:Integer>
  </cd:Field>
  <cd:Field name="packet_type_igm_num_blocks_spare_0">
    <cd:Raw>
      <cd:Description>spare</cd:Description>
      <cd:BitSize>8</cd:BitSize>
    </cd:Raw>
    <cd:Hidden/>
  </cd:Field>
  <cd:Field name="block_info">
    <cd:Array>
      <cd:Description>Block Info</cd:Description>
      <cd:Dimension>4</cd:Dimension>
      <cd:Record>
        <cd:Field name="block_source_id">
          <cd:Integer>
            <cd:Description>Source ID for block.</cd:Description>
            <cd:BitSize>5</cd:BitSize>
            <cd:NativeType>uint8</cd:NativeType>
          </cd:Integer>
        </cd:Field>
        <cd:Field name="block_seq_nr">
          <cd:Integer>
            <cd:Description>Block sequence number for block.</cd:Description>
            <cd:BitSize>11</cd:BitSize>
            <cd:NativeType>uint16</cd:NativeType>
          </cd:Integer>
        </cd:Field>
        <cd:Field name="block_num_samples">
          <cd:Integer>
            <cd:Description>Number of samples for block</cd:Description>
            <cd:BitSize>11</cd:BitSize>
            <cd:NativeType>uint16</cd:NativeType>
          </cd:Integer>
        </cd:Field>
        <cd:Field name="block_bits_per_sample">
          <cd:Integer>
            <cd:Description>Bits per sample for this block</cd:Description>
            <cd:BitSize>5</cd:BitSize>
            <cd:NativeType>uint8</cd:NativeType>
          </cd:Integer>
        </cd:Field>
      </cd:Record>
    </cd:Array>
  </cd:Field>
  <cd:Field name="aux_fields">
    <cd:Array>
      <cd:Description>Auxiliary Header Fields</cd:Description>
      <cd:Dimension><![CDATA[if(int(../packet_type_id) != 0, 1, 0)]]></cd:Dimension>
      <cd:NamedType id="MIP_NL__0P_aux_data_packet"/>
    </cd:Array>
  </cd:Field>
  <cd:Field name="source_packet">
    <cd:Array>
      <cd:Description>Downlinked source packet</cd:Description>
      <cd:Dimension><![CDATA[if(int(../packet_type_id) != 0, int(../isp_length) - 1427, int(../isp_length) - 27)]]></cd:Dimension>
      <cd:Integer>
        <cd:BitSize>8</cd:BitSize>
        <cd:NativeType>uint8</cd:NativeType>
      </cd:Integer>
    </cd:Array>
  </cd:Field>
</cd:Record>
