<?xml version="1.0" encoding="UTF-8"?>
  <!-- PDS4 XML/Schema for Name Space Id:msn  Version:1.3.0.0 - Wed Oct 14 02:55:21 UTC 2020 -->
  <!-- Generated from the PDS4 Information Model Version 1.15.0.0 - System Build 11a -->
  <!-- *** This PDS4 product schema is an operational deliverable. *** -->
  <!--                                                                           -->
  <!--               Dictionary Stack                                            -->
  <!-- 1.15.0.0 - pds: - Common Dictionary                                       -->
  <!-- 1.3.0.0 - msn: - Mission Information Commons                              -->
  <!--   file:/home/runner/work/ldd-msn/ldd-msn/src/PDS4_MSN_IngestLDD.xml       -->
  <!--                                                                           -->
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://pds.nasa.gov/pds4/msn/v1"
    xmlns:msn="http://pds.nasa.gov/pds4/msn/v1"
    xmlns:pds="http://pds.nasa.gov/pds4/pds/v1"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.3.0.0">
 
    <xs:import namespace="http://pds.nasa.gov/pds4/pds/v1" schemaLocation="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1F00.xsd"/>
 
  <xs:annotation>
    <xs:documentation>

      ## CHANGE LOG ##
      1.0.0.0
      - Initial version
      
      1.1.0.0
      - Upgraded to v1B00 of the IM.
      - Re-classified this dictionary as a Discipline Dictionary, instead of Mission Dictionary.
      - Renamed Orbital_Mission_Information to Orbital_Mission, Surface_Mission_Information to Surface_Mission
      
      1.2.0.0
      - Upgraded to v1D00 of the IM.
      - Add instrument_clock_start and allow helicopter use case.
      - Add instrument_start_time. This is instrument_clock_start converted to UTC.
      - Updated the definition for start_sol_number to allow a primary sol to be 
        defined for mosaic products inplace of the actual starting sol value.
       
      1.3.0.0
      - Upgraded to v1E00 of the IM
      - Add year_number, year_number_reference attributes to Surface_Mission
      - Added Observation_Context class and attrbitues active_flight_computer, active_flight_imu under Mission_Information

    
    </xs:documentation>
  </xs:annotation>
 
  <xs:element name="Mission_Information" type="msn:Mission_Information"> </xs:element>

  <xs:complexType name="Mission_Information">
    <xs:annotation>
      <xs:documentation>The Mission_Information class provides
        information about a mission.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="mission_phase_name" nillable="true" type="msn:mission_phase_name" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="mission_phase_identifier" nillable="true" type="msn:mission_phase_identifier" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="release_number" nillable="true" type="msn:release_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="product_type_name" nillable="true" type="msn:product_type_name" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_start" nillable="true" type="msn:spacecraft_clock_start" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_stop" nillable="true" type="msn:spacecraft_clock_stop" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_partition" type="msn:spacecraft_clock_partition" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_clock_start" nillable="true" type="msn:instrument_clock_start" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_start_time" nillable="true" type="msn:instrument_start_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Orbital_Mission" type="msn:Orbital_Mission" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Surface_Mission" type="msn:Surface_Mission" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Observation_Context" type="msn:Observation_Context" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test=")"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Observation_Context">
    <xs:annotation>
      <xs:documentation>Describes the vehicle context at the time the
        observation was taken.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="active_flight_computer" nillable="true" type="msn:active_flight_computer" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="active_flight_imu" nillable="true" type="msn:active_flight_imu" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Orbital_Mission">
    <xs:annotation>
      <xs:documentation>The Orbital_Mission class provides information
        about an orbital mission.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="start_orbit_number" nillable="true" type="msn:start_orbit_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_orbit_number" nillable="true" type="msn:stop_orbit_number" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Surface_Mission">
    <xs:annotation>
      <xs:documentation>The Surface_Mission class provides information
        about a surface mission.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="start_sol_number" nillable="true" type="msn:start_sol_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_sol_number" nillable="true" type="msn:stop_sol_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_local_mean_solar_time" type="msn:start_local_mean_solar_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_local_mean_solar_time" type="msn:stop_local_mean_solar_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_local_mean_solar_time_sol" type="msn:start_local_mean_solar_time_sol" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_local_mean_solar_time_sol" type="msn:stop_local_mean_solar_time_sol" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_local_true_solar_time" type="msn:start_local_true_solar_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_local_true_solar_time" type="msn:stop_local_true_solar_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_local_true_solar_time_sol" type="msn:start_local_true_solar_time_sol" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_local_true_solar_time_sol" type="msn:stop_local_true_solar_time_sol" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="solar_longitude" type="msn:solar_longitude" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="year_number" type="msn:year_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="year_number_reference" type="msn:year_number_reference" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

    <xs:annotation>
      <xs:documentation>This section contains the simpleTypes that provide more constraints
        than those at the base data type level. The simpleTypes defined here build on the base data
        types. This is another component of the common dictionary and therefore falls within the
        common namespace.
      </xs:documentation>
    </xs:annotation>

  <xs:complexType name="active_flight_computer">
    <xs:annotation>
      <xs:documentation>Identifies which of potentially several flight
        computers were used for this observation.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="active_flight_imu">
    <xs:annotation>
      <xs:documentation>Identifies which of potentially several inertial
        measurement units (IMUs) were used for this
        observation.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="instrument_clock_start">
    <xs:annotation>
      <xs:documentation>The value of the clock returned by the
        instrument at the beginning of the observation. This may differ
        from the spacecraft clock due to several factors such as clock
        drift, or differences in definition of start time (for example,
        spacecraft clock might be when an image was commanded, but
        instrument clock might be after autoexpoure or autofocus
        processes), or differences in the time epoch between the
        instrument and the main spacecraft. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="instrument_start_time">
    <xs:annotation>
      <xs:documentation>This is instrument_clock_start converted to
        UTC</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Date_Time_YMD_UTC">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="mission_phase_identifier">
    <xs:annotation>
      <xs:documentation>The mission_phase_identifier attribute provides
        an identifier for a mission phase.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="mission_phase_name">
    <xs:annotation>
      <xs:documentation>The mission_phase_name identifies a time period
        within the mission.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Preserved">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="product_type_name">
    <xs:annotation>
      <xs:documentation>The product_type_name identifies a group of data
        products within a collection that have some property in common,
        such as processing level, resolution, or instrument-specific
        setting. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="release_number">
    <xs:annotation>
      <xs:documentation>Release_number is the number of a scheduled
        release of data from the provider to PDS. The first data release
        is typically Release 1. The release_number for a given product
        is always the first release in which it appears, and does not
        change if the product is revised later.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Integer">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="solar_longitude_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="360"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="solar_longitude">
    <xs:annotation>
      <xs:documentation>solar_longitude is the solar longitude, as
        defined in the main PDS4 data dictionary.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="msn:solar_longitude_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Angle" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="spacecraft_clock_partition">
    <xs:annotation>
      <xs:documentation>The spacecraft_clock_partition provides the
        clock partition active for the spacecraft_clock
        attribute.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="spacecraft_clock_start">
    <xs:annotation>
      <xs:documentation>The spacecraft_clock_start is the value of the
        spacecraft clock at the beginning of the
        observation.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="spacecraft_clock_stop">
    <xs:annotation>
      <xs:documentation>The spacecraft_clock_stop is the value of the
        spacecraft clock at the end of the observation.
        spacecraft_clock_stop should only be used if there's also a
        spacecraft_clock_start value.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="start_local_mean_solar_time">
    <xs:annotation>
      <xs:documentation>start_local_mean_solar_time is the local mean
        solar time, as defined in the main PDS4 data
        dictionary.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="8"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_local_mean_solar_time_sol">
    <xs:annotation>
      <xs:documentation>The start_local_mean_solar_time_sol element
        specifies the number of solar days elapsed since a reference day
        (e.g. the day on which a landing vehicle set down) for local
        mean solar time (LMST). Days are measured in rotations of the
        planet in question from midnight to midnight. The reference day
        is '0', as Landing day is Sol 0. If before Landing day, then
        value will be less than or equal to '0'and can be
        negative.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_local_true_solar_time">
    <xs:annotation>
      <xs:documentation>start_local_true_solar_time is the local true
        solar time, as defined in the main PDS4 data
        dictionary.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="8"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_local_true_solar_time_sol">
    <xs:annotation>
      <xs:documentation>The start_local_true_solar_time_sol element
        specifies the number of solar days elapsed since a reference day
        (e.g. the day on which a landing vehicle set down) for local
        true solar time (LTST). Days are measured in rotations of the
        planet in question from midnight to midnight. The reference day
        is '0', as Landing day is Sol 0. If before Landing day, then
        value will be less than or equal to '0'and can be
        negative.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="start_orbit_number">
    <xs:annotation>
      <xs:documentation>The start_orbit_number attribute provides the
        first in a series of numbers that represent a set of orbital
        revolutions of one body around another.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="start_sol_number">
    <xs:annotation>
      <xs:documentation>The start_sol_number is the number of the Mars
        day on which an observation began. Landing day is Sol 0. For
        multi-sol observations, such as mosaics, if start_sol_number is
        given but stop_sol_number is not, the start_sol_number may
        instead be interpreted as the primary, or most important, sol
        for this observation.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Integer">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="stop_local_mean_solar_time">
    <xs:annotation>
      <xs:documentation>stop_local_mean_solar_time is the local mean
        solar time, as defined in the main PDS4 data
        dictionary.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="8"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="stop_local_mean_solar_time_sol">
    <xs:annotation>
      <xs:documentation>The stop_local_mean_solar_time_sol element
        specifies the number of solar days elapsed since a reference day
        (e.g. the day on which a landing vehicle set down) for local
        mean solar time (LMST). Days are measured in rotations of the
        planet in question from midnight to midnight. The reference day
        is '0', as Landing day is Sol 0. If before Landing day, then
        value will be less than or equal to '0'and can be negative. The
        stop_local_mean_solar_time_sol should only be used if there's
        also a start_local_mean_solar_time_sol.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="stop_local_true_solar_time">
    <xs:annotation>
      <xs:documentation>stop_local_true_solar_time is the local true
        solar time, as defined in the main PDS4 data
        dictionary.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="8"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="stop_local_true_solar_time_sol">
    <xs:annotation>
      <xs:documentation>The stop_local_true_solar_time_sol element
        specifies the number of solar days elapsed since a reference day
        (e.g. the day on which a landing vehicle set down) for local
        true solar time (LTST). Days are measured in rotations of the
        planet in question from midnight to midnight. The reference day
        is '0', as Landing day is Sol 0. If before Landing day, then
        value will be less than or equal to '0'and can be negative. The
        stop_local_true_solar_time_sol should only be used if there is
        also a start_local_true_solar_time_sol.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="stop_orbit_number">
    <xs:annotation>
      <xs:documentation>The stop_orbit_number attribute provides the
        last in a series of numbers that represent s set of orbital
        revolutions of one body around another.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="stop_sol_number">
    <xs:annotation>
      <xs:documentation>The stop_sol_number is the number of the Mars
        day on which an observation ended. Landing day is Sol 0. The
        stop_sol_number should only be used if there's also a
        start_sol_number.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Integer">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="year_number">
    <xs:annotation>
      <xs:documentation>Identifies the year of the observation, using
        the definition for year specified in
        year_number_reference.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="year_number_reference">
    <xs:annotation>
      <xs:documentation>Identifies the system used to measure
        year_number. Current values include: Mars Year: Mars year as
        defined by Piqueaux et al (2015), extending Clancy et al (2000).
        Mars Year 1 started on April 11, 1955 at Ls (areocentric solar
        longitude) = 0, with subsequent years starting at Ls=0.
        Reference:
        https://doi.org/10.1016/j.icarus.2014.12.014</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>
</xs:schema>
