<?xml version="1.0"?>
<cd:ProductDefinition xmlns:cd="http://www.stcorp.nl/coda/definition/2008/07" xmlns:ct="http://www.stcorp.nl/coda/test/2008/10" id="BBR_NOM_0_" format="binary" last-modified="2021-11-18">
  <cd:Array>
    <cd:Dimension><![CDATA[$num_dsr]]></cd:Dimension>
    <cd:Record format="binary">
      <cd:Description>Annotated Instrument Source Packet</cd:Description>
      <cd:Field name="ISP_annotation_header">
        <cd:NamedType id="ISP_annotation_header"/>
      </cd:Field>
      <cd:Field name="ISP">
        <cd:Record format="binary">
          <cd:Description>Instrument Source Packet</cd:Description>
          <cd:Field name="packet_header">
            <cd:NamedType id="ISP_packet_header"/>
          </cd:Field>
          <cd:Field name="data_header">
            <cd:NamedType id="ISP_data_field_header"/>
          </cd:Field>
          <cd:Field name="private_header">
            <cd:Record format="binary">
              <cd:Field name="SC_state_vector_quality">
                <cd:Integer>
                  <cd:Description>S/C State Vector Quality</cd:Description>
                  <cd:BitSize>32</cd:BitSize>
                  <cd:NativeType>uint32</cd:NativeType>
                </cd:Integer>
              </cd:Field>
              <cd:Field name="ISP_format_version">
                <cd:Integer>
                  <cd:Description>ISP Format Version</cd:Description>
                  <cd:BitSize>16</cd:BitSize>
                  <cd:NativeType>uint16</cd:NativeType>
                </cd:Integer>
              </cd:Field>
              <cd:Field name="delimiter_0">
                <cd:Integer>
                  <cd:Description>Fixed Field Delimiter</cd:Description>
                  <cd:BitSize>16</cd:BitSize>
                  <cd:NativeType>uint16</cd:NativeType>
                </cd:Integer>
                <cd:Hidden/>
              </cd:Field>
            </cd:Record>
          </cd:Field>
          <cd:Field name="data">
            <cd:Union format="binary">
              <cd:FieldExpression><![CDATA[with(k = int(../../data_header/service_type), if(k==230, if(int(../../data_header/service_subtype)==1, 0, if(int(../data_header/service_subtype)==65, 1, -1)), -1))]]></cd:FieldExpression>
              <cd:Field name="processed_data">
                <cd:Record format="binary">
                  <cd:Field name="view_parameters">
                    <cd:Array>
                      <cd:Description>View parameters for each acquisition</cd:Description>
                      <cd:Dimension>8</cd:Dimension>
                      <cd:NamedType id="ISP_BBR_view_parameters"/>
                    </cd:Array>
                  </cd:Field>
                  <cd:Field name="delimiter_1">
                    <cd:Integer>
                      <cd:Description>Fixed Field Delimiter</cd:Description>
                      <cd:BitSize>16</cd:BitSize>
                      <cd:NativeType>uint16</cd:NativeType>
                    </cd:Integer>
                    <cd:Hidden/>
                  </cd:Field>
                  <cd:Field name="view_processed">
                    <cd:Array>
                      <cd:Description>View Processed Science and HK for each acquisition</cd:Description>
                      <cd:Dimension>8</cd:Dimension>
                      <cd:Record format="binary">
                        <cd:Field name="aft_voltage">
                          <cd:NamedType id="asymptotic_detector_voltage"/>
                        </cd:Field>
                        <cd:Field name="nadir_voltage">
                          <cd:NamedType id="asymptotic_detector_voltage"/>
                        </cd:Field>
                        <cd:Field name="fore_voltage">
                          <cd:NamedType id="asymptotic_detector_voltage"/>
                        </cd:Field>
                        <cd:Field name="mpd_aft_output">
                          <cd:NamedType id="RGB16"/>
                        </cd:Field>
                        <cd:Field name="mpd_nadir_output">
                          <cd:NamedType id="RGB16"/>
                        </cd:Field>
                        <cd:Field name="mpd_fore_output">
                          <cd:NamedType id="RGB16"/>
                        </cd:Field>
                        <cd:Field name="spare">
                          <cd:NamedType id="RGB16"/>
                        </cd:Field>
                      </cd:Record>
                    </cd:Array>
                  </cd:Field>
                  <cd:Field name="OU">
                    <cd:NamedType id="ISP_BBR_OU"/>
                  </cd:Field>
                  <cd:Field name="ICU">
                    <cd:NamedType id="ISP_BBR_ICU"/>
                  </cd:Field>
                  <cd:Field name="HK">
                    <cd:NamedType id="ISP_BBR_HK"/>
                  </cd:Field>
                </cd:Record>
              </cd:Field>
              <cd:Field name="raw_data">
                <cd:Record format="binary">
                  <cd:Field name="view_parameters">
                    <cd:NamedType id="ISP_BBR_view_parameters"/>
                  </cd:Field>
                  <cd:Field name="delimiter_1">
                    <cd:Integer>
                      <cd:Description>Fixed Field Delimiter</cd:Description>
                      <cd:BitSize>16</cd:BitSize>
                      <cd:NativeType>uint16</cd:NativeType>
                    </cd:Integer>
                    <cd:Hidden/>
                  </cd:Field>
                  <cd:Field name="detector_voltage">
                    <cd:Array>
                      <cd:Dimension>78</cd:Dimension>
                      <cd:Array>
                        <cd:Dimension>32</cd:Dimension>
                        <cd:Integer>
                          <cd:Description>Raw subsampled detector voltage</cd:Description>
                          <cd:BitSize>12</cd:BitSize>
                          <cd:NativeType>uint16</cd:NativeType>
                        </cd:Integer>
                      </cd:Array>
                    </cd:Array>
                  </cd:Field>
                  <cd:Field name="view_processed">
                    <cd:Record format="binary">
                     <cd:Field name="aft_voltage">
                        <cd:NamedType id="asymptotic_detector_voltage"/>
                      </cd:Field>
                      <cd:Field name="nadir_voltage">
                        <cd:NamedType id="asymptotic_detector_voltage"/>
                      </cd:Field>
                      <cd:Field name="fore_voltage">
                        <cd:NamedType id="asymptotic_detector_voltage"/>
                      </cd:Field>
                      <cd:Field name="mpd_aft_output">
                        <cd:NamedType id="RGB16"/>
                      </cd:Field>
                      <cd:Field name="mpd_nadir_output">
                        <cd:NamedType id="RGB16"/>
                      </cd:Field>
                      <cd:Field name="mpd_fore_output">
                        <cd:NamedType id="RGB16"/>
                      </cd:Field>
                      <cd:Field name="spare">
                        <cd:NamedType id="RGB16"/>
                      </cd:Field>
                    </cd:Record>
                  </cd:Field>
                  <cd:Field name="OU">
                    <cd:NamedType id="ISP_BBR_OU"/>
                  </cd:Field>
                  <cd:Field name="ICU">
                    <cd:NamedType id="ISP_BBR_ICU"/>
                  </cd:Field>
                  <cd:Field name="HK">
                    <cd:NamedType id="ISP_BBR_HK"/>
                  </cd:Field>
                </cd:Record>
              </cd:Field>
            </cd:Union>
          </cd:Field>
          <cd:Field name="CRC">
            <cd:Integer>
              <cd:Description>Packet Error Control (CRC)</cd:Description>
              <cd:BitSize>16</cd:BitSize>
              <cd:NativeType>uint16</cd:NativeType>
            </cd:Integer>
          </cd:Field>
        </cd:Record>
      </cd:Field>
    </cd:Record>
  </cd:Array>
  <cd:ProductVariable name="num_dsr">
    <cd:Init><![CDATA[$num_dsr = unboundindex(/, byteoffset(.) >= filesize())]]></cd:Init>
  </cd:ProductVariable>
</cd:ProductDefinition>
