<?xml version="1.0" encoding="utf-8"?>
<?xml-model
    href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1J00.sch"
	  schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://pds.nasa.gov/pds4/proc/v1/PDS4_PROC_1J00_1300.sch"
      schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://pds.nasa.gov/pds4/mission/clps/v1/PDS4_CLPS_1J00_1100.sch"
    schematypens="http://purl.oclc.org/dsdl/schematron"?>

<Product_Observational
	xmlns="http://pds.nasa.gov/pds4/pds/v1"
    xmlns:proc="http://pds.nasa.gov/pds4/proc/v1"
    xmlns:clps="http://pds.nasa.gov/pds4/mission/clps/v1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1
                        https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1J00.xsd
                        http://pds.nasa.gov/pds4/proc/v1
                        https://pds.nasa.gov/pds4/proc/v1/PDS4_PROC_1J00_1300.xsd
                        http://pds.nasa.gov/pds4/mission/clps/v1
                        https://pds.nasa.gov/pds4/mission/clps/v1/PDS4_CLPS_1J00_1100.xsd
                        ">
  <Identification_Area>
    <logical_identifier>urn:nasa:pds:clps_to_2ab_nss:data_engineering_raw:nss_eng_raw_20240109_090819</logical_identifier>
    <version_id>1.0</version_id>
    <title>TO2-AB Raw NSS Engineering Data:nss_eng_raw_20240109_090819</title>
    <information_model_version>1.19.0.0</information_model_version>
    <product_class>Product_Observational</product_class>

  <Modification_History>
    <Modification_Detail>
      <modification_date>2024-07-19</modification_date>
      <version_id>1.0</version_id>
      <description>First release of TO-2AB NSS data.</description>
    </Modification_Detail>
  </Modification_History>
  </Identification_Area>

  <Observation_Area>
    <Time_Coordinates>
      <start_date_time>2024-01-09T09:08:18.961Z</start_date_time>
      <stop_date_time>2024-01-09T11:04:43.894Z</stop_date_time>
    </Time_Coordinates>

    <Investigation_Area>
      <name>CLPS Task Order 2AB</name>
      <type>Mission</type>
      <Internal_Reference>
        <lid_reference>urn:nasa:pds:context:investigation:mission.clps_to_2ab</lid_reference>
        <reference_type>data_to_investigation</reference_type>
      </Internal_Reference>
    </Investigation_Area>

    <Observing_System>
      <Observing_System_Component>
        <name>Peregrine Lunar Lander</name>
        <type>Host</type>
        <description>Astrobotic Peregrine Lunar Lander (TO2-AB)</description>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.clps_to_2ab_pll</lid_reference>
          <reference_type>is_instrument_host</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>CLPS Task Order 2AB Neutron Spectrometer System (NSS)</name>
        <type>Instrument</type>
        <description>Neutron Spectrometer System (NSS) on TO2-AB lander</description>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:clps_to_2ab_pll.nss</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
    </Observing_System>

    <Target_Identification>
      <name>Moon</name>
      <type>Satellite</type>
      <Internal_Reference>
        <lid_reference>urn:nasa:pds:context:target:satellite.earth.moon</lid_reference>
        <reference_type>data_to_target</reference_type>
      </Internal_Reference>
    </Target_Identification>

    <Mission_Area>
      <clps:CLPS_Parameters>
        <clps:CLPS_Delivery_Information>
          <clps:nasa_delivery_name>TO_2AB</clps:nasa_delivery_name>
          <clps:vendor>Astrobotic</clps:vendor>
          <clps:vendor_mission_name>Peregrine Mission 1</clps:vendor_mission_name>
          <clps:lunar_lander_name>Peregrine Lunar Lander</clps:lunar_lander_name>
          <clps:project_scientist>Paul Niles</clps:project_scientist>
        </clps:CLPS_Delivery_Information>
        <clps:CLPS_Observation_Information>
          <clps:release_number>0001</clps:release_number>
          <clps:mission_phase_name>CRUISE AND APPROACH</clps:mission_phase_name>
          <clps:producer_institution_name>Applied Physics Laboratory</clps:producer_institution_name>
        </clps:CLPS_Observation_Information>
      </clps:CLPS_Parameters>
    </Mission_Area>

    <Discipline_Area>
      <proc:Processing_Information>
        <Local_Internal_Reference>
          <local_identifier_reference>data_engineering_raw</local_identifier_reference>
          <local_reference_type>processing_information_to_data_object</local_reference_type>
        </Local_Internal_Reference>
        <proc:Process>
          <proc:Software>
            <proc:name>ASTROBOTIC_NSS_RAW_PIPELINE</proc:name>
            <proc:software_version_id>Version 1.0</proc:software_version_id>
          </proc:Software>
        </proc:Process>
      </proc:Processing_Information>
    </Discipline_Area>
  </Observation_Area>

  <Reference_List>
    <Internal_Reference>
      <lid_reference>urn:nasa:pds:clps_to_2ab_nss:document:clps_to_2ab_nss_ug</lid_reference>
      <reference_type>data_to_document</reference_type>
      <comment>CLPS TO_2AB NSS User Guide document which describes the data
         products in this collection.</comment>
    </Internal_Reference>
    <Internal_Reference>
      <lidvid_reference>urn:nasa:pds:clps_to_2ab_nss:data_science_cal:hv_table::1.0</lidvid_reference>
      <reference_type>data_to_calibration_product</reference_type>
      <comment>High-Voltage (HV) lookup table used in NSS calibration pipeline.</comment>
    </Internal_Reference>
    <Internal_Reference>
      <lidvid_reference>urn:nasa:pds:clps_to_2ab_nss:data_science_cal:thermistor_table::1.0</lidvid_reference>
      <reference_type>data_to_calibration_product</reference_type>
      <comment>Thermistor lookup table used in NSS calibration pipeline.</comment>
    </Internal_Reference>
  </Reference_List>

  <File_Area_Observational>
    <File>
      <file_name>nss_eng_raw_20240109_090819.csv</file_name>
      <comment>File containing raw NSS Engineering data with ASCII header</comment>
    </File>
    <Header>
      <offset unit="byte">0</offset>
      <object_length unit="byte">195</object_length>
      <parsing_standard_id>7-Bit ASCII Text</parsing_standard_id>
      <description>Column headings</description>
    </Header>
    <Table_Delimited>
      <local_identifier>data_engineering_raw</local_identifier>
      <offset unit="byte">195</offset>
      <parsing_standard_id>PDS DSV 1</parsing_standard_id>
      <description>
        Raw Engineering Data from NSS aboard Astrobotic Peregrine Mission-1 Lander
      </description>
      <records>6986</records>
      <record_delimiter>Carriage-Return Line-Feed</record_delimiter>
      <field_delimiter>Comma</field_delimiter>

      <Record_Delimited>
        <fields>11</fields>
        <groups>0</groups>

        <Field_Delimited>
          <name>datetime</name>
          <field_number>1</field_number>
          <data_type>ASCII_Date_Time_YMD</data_type>
          <description>
            UTC Date time when record was collected, YYYY-MM-DDTHH:mm:ss.fffZ format,  example : 2024-01-08T14:02:31.595Z
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>adc_reference_raw</name>
          <field_number>2</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Number that, when multiplied by 0.0129, results in the analog-to-digital converter reference voltage.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>fpga_core_raw</name>
          <field_number>3</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Number that, when multiplied by 0.0129, results in the Field-Programmable Gate Array core reference voltage.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>fpga_io_raw</name>
          <field_number>4</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Number that, when multiplied by 0.0259, results in the Field-Programmable Gate Array Input/Output reference voltage.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>fpga_version</name>
          <field_number>5</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            FPGA firmware version number.  Nominal is ‘1’.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>front_end_raw</name>
          <field_number>6</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Number that, when multiplied by 0.0775, results in the front-end electronics voltage.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>power_supply_raw</name>
          <field_number>7</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Number that, when multiplied by 0.0259, results in the low-voltage power supply voltage.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>sensor_module_pwr_onoff_status</name>
          <field_number>8</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Power state of sensor module. Derived from byte 68, bit 4.  0 is off, 1 is on.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>watch_dog_reset_indicator</name>
          <field_number>9</field_number>
          <data_type>ASCII_Integer</data_type>
          <description>
            Indicator of a watchdog reset of the instrument.  1 = reset has occurred.
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>command_counter</name>
          <field_number>10</field_number>
          <data_type>ASCII_Integer</data_type>
          <unit>Counts/bin</unit>
          <description>
            Number of commands received since last power-on (0 – 15 then roll-over).
          </description>
        </Field_Delimited>

        <Field_Delimited>
          <name>telemetry_frame_counter</name>
          <field_number>11</field_number>
          <data_type>ASCII_Integer</data_type>
          <unit>Counts/bin</unit>
          <description>
            Sequential number of telemetry frames transmitted over RS422 (0 – 63 then roll-over).
          </description>
        </Field_Delimited>

      </Record_Delimited>
    </Table_Delimited>
  </File_Area_Observational>
</Product_Observational>