<?xml version="1.0" encoding="UTF-8"?>
  <!-- PDS4 XML/Schema for Name Space Id:img_surface  Version:1.2.6.0 - Mon Nov 01 16:38:16 UTC 2021 -->
  <!-- Generated from the PDS4 Information Model Version 1.17.0.0 - System Build 12.0 -->
  <!-- *** This PDS4 product schema is an operational deliverable. *** -->
  <!--                                                                           -->
  <!--               Dictionary Stack                                            -->
  <!-- 1.17.0.0 - pds: - Common Dictionary                                       -->
  <!-- 1.9.3.0 - geom: - Geometry Dictionary Full                                -->
  <!--   file:/home/runner/work/ldd-img_surface/ldd-img_surface/src/dependencies -->
  <!-- 1.9.3.0 - geom: - Geometry Dictionary Full                                -->
  <!--   file:/home/runner/work/ldd-img_surface/ldd-img_surface/src/dependencies -->
  <!-- 1.2.6.0 - img_surface: - Surface Imaging                                  -->
  <!--   file:/home/runner/work/ldd-img_surface/ldd-img_surface/src/PDS4_IMG_SUR -->
  <!--                                                                           -->
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://pds.nasa.gov/pds4/img_surface/v1"
    xmlns:img_surface="http://pds.nasa.gov/pds4/img_surface/v1"
    xmlns:pds="http://pds.nasa.gov/pds4/pds/v1"
    xmlns:geom="http://pds.nasa.gov/pds4/geom/v1"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.2.6.0">
 
    <xs:import namespace="http://pds.nasa.gov/pds4/pds/v1" schemaLocation="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1H00.xsd"/>
    <xs:import namespace="http://pds.nasa.gov/pds4/geom/v1" schemaLocation="https://pds.nasa.gov/pds4/geom/v1/PDS4_GEOM_1H00_1930.xsd"/>
 
  <xs:annotation>
    <xs:documentation>

      ## CHANGE LOG ##
      1.0.0.0
      - Initial version
      
      1.1.0.0
      - Upgraded to v1B10 of the IM.
      - Re-classified this dictionary as a Discipline Dictionary, instead of Mission Dictionary.
      - Renamed Surface_Imaging_Parameters to Surface_Imaging, Error_Model_Information to Error_Model, 
        Geometry_Projection_Parameters to Geometry_Projection, and Pointing_Correction_Parameters to Pointing_Correction.
      - Added new attribute to Instrument_Information: ops_instrument_key
      
      1.1.1.0
      - Removed Pointing_Correction and its child attributes/classes (moved to IMG)
      
      1.2.0.0 T.Hare
      - updated to PDS IM v 1E00 and GEOM 1E00_1800
      - updated ops_instrument_key to be unbounded and updated definition.
      - added Commanded_Parameters using existing classes as children added to bottom of Surface_Imaging class
      - added image_id_2 attribute to Image_Identifiers
      - added start_image_id, observation_number, parameter_table_number to Image_Identifiers
      - added camera_model_serial_number attribute to Instrument_Information class 
      
      1.2.1.0 T.Hare
      - added correlation_average_scale, correlation_overlap_percentage, correlation_pixel_count attrinutes to
        Stereo_Product_Parameters Class
      - added Reachability Class and attributes and classes including these children:
        Reach_Instruments and Reach_Instrument classes and their attributes

      1.2.2.0 T.Hare
      - build with GEOM v1900, grabbing the depenancies using:
          git submodule add https://github.com/pds-data-dictionaries/ldd-geom
      - add 3 new reference_types for external under rules
      - update instrument_type to allow nil and added enumerations to meet "_type" attribute rules

      1.2.4.0 T.Hare
      - fix: added Reachability class as a child of img_surface:Surface_Imaging
      - updated to Reachability to new loaction in class
      
      1.2.5.0 T.Hare
      - added Trapezoid to geometry_projection_type (for cameras like Mars 2020 PIXL MCC)
      
      1.2.6.0 T. Hare
      - added tracking_id

    
    </xs:documentation>
  </xs:annotation>
 
  <xs:element name="Surface_Imaging" type="img_surface:Surface_Imaging"> </xs:element>

  <xs:complexType name="Commanded_Parameters">
    <xs:annotation>
      <xs:documentation>The Commanded_Parameters class contains
        attributes used to identify or describe the commands sent to a
        spacecraft to perform one or more actions resulting in the
        acquisition of the current data product. These are distinct from
        similar values in the root Surface_Imaging class which indicate
        the state of the image as acquired</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Instrument_Information" type="img_surface:Instrument_Information" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Image_Identifiers" type="img_surface:Image_Identifiers" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Configuration">
    <xs:annotation>
      <xs:documentation>Defines a single configuration for this
        reachability assessment.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="device_config" type="img_surface:device_config" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_bit" type="img_surface:start_bit" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stop_bit" type="img_surface:stop_bit" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="img_surface:device_config = ('ARM_SI_ED_WD', 'ARM_SI_ED_WU', 'ARM_SI_EU_WD', 'ARM_SI_EU_WU', 'ARM_SO_ED_WD', 'ARM_SO_ED_WU', 'ARM_SO_EU_WD', 'ARM_SO_EU_WU')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Configurations">
    <xs:annotation>
      <xs:documentation>Specifies the configurations of the device used
        for reachability assessment. The specific values will be
        device-dependent but could include e.g. shoulder in/out, elbow
        up/down, wrist up/down.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="band" type="img_surface:band" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Configuration" type="img_surface:Configuration" minOccurs="0" maxOccurs="unbounded"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Derived_Product_Parameters">
    <xs:annotation>
      <xs:documentation>The Derived_Product_Parameters class contains
        attributes used to identify and describe processing performed on
        products in order to produce a higher level
        product.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="derived_image_type_name" type="img_surface:derived_image_type_name" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="horizon_mask_elevation" type="img_surface:horizon_mask_elevation" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Placement_Target_Instrument" type="img_surface:Placement_Target_Instrument" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Vector_Range_Origin" type="img_surface:Vector_Range_Origin" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element ref="geom:Coordinate_Space_Reference" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Error_Model">
    <xs:annotation>
      <xs:documentation>The Error_Model class specifies the name of the
        error model used, a reference to the algorithm descriptions, and
        the parameters needed for that algorithm. The specific set of
        values is determined by each individual
        missions.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="error_model_name" type="img_surface:error_model_name" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element name="Error_Model_Parameter" type="img_surface:Error_Model_Parameter" minOccurs="1" maxOccurs="unbounded"> </xs:element>
      <xs:element ref="pds:Internal_Reference" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Error_Model_Parameter">
    <xs:annotation>
      <xs:documentation>The Error_Model_Parameter class specifies name
        and value for a parameter defined by the error model described
        by the parent class.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="pds:name" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element name="value" type="pds:value" minOccurs="1" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Error_Pixel">
    <xs:annotation>
      <xs:documentation> The Error_Pixel class specifies the line and
        sample in the image where an error occurred.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="line" type="img_surface:line" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element name="sample" type="img_surface:sample" minOccurs="1" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Geometry_Projection">
    <xs:annotation>
      <xs:documentation>The Geometry_Projection describes the geometric
        projection or warping the image has undergone. It is not the
        intent of this class to describe map projections, but rather
        image warps such as linearization (stereo epipolar alignment),
        geometric sensor correction, or rubber-sheeting. If present, a
        linearization partner image can be referenced using either an
        Internal_Reference or External_Reference.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="linearization_mode" type="img_surface:linearization_mode" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="linearization_mode_fov" type="img_surface:linearization_mode_fov" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="geometry_projection_type" type="img_surface:geometry_projection_type" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:element ref="pds:Internal_Reference"> </xs:element>
        <xs:element ref="pds:External_Reference"> </xs:element>
      </xs:choice>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="img_surface:linearization_mode = ('Actual', 'Nominal', 'None')"/> -->
    <!-- <xs:assert test="img_surface:linearization_mode_fov = ('Linear', 'Max', 'Min', 'None')"/> -->
    <!-- <xs:assert test="img_surface:geometry_projection_type = ('Linearized', 'Raw', 'Trapezoid')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Image_Identifiers">
    <xs:annotation>
      <xs:documentation>The Image_Identifiers class contains items that
        help to identify the image or guide how processing should be
        done to the image.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="image_id" type="img_surface:image_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="image_id_2" type="img_surface:image_id_2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="mosaic_id" type="img_surface:mosaic_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="mesh_id" type="img_surface:mesh_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stereo_match_id" type="img_surface:stereo_match_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_image_id" type="img_surface:start_image_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="tracking_id" type="img_surface:tracking_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="observation_number" type="img_surface:observation_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="parameter_table_number" type="img_surface:parameter_table_number" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Instrument_Information">
    <xs:annotation>
      <xs:documentation>The Instrument_Information class specifies
        information about the configuration of the instrument as it
        acquired this observation.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="image_type" type="img_surface:image_type" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="image_acquire_mode" type="img_surface:image_acquire_mode" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_type" nillable="true" type="img_surface:instrument_type" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_mode_id" type="img_surface:instrument_mode_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_serial_number" type="img_surface:instrument_serial_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="instrument_version_number" type="img_surface:instrument_version_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="ops_instrument_key" type="img_surface:ops_instrument_key" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="camera_model_serial_number" type="img_surface:camera_model_serial_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="camera_product_id" type="img_surface:camera_product_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="camera_product_id_count" type="img_surface:camera_product_id_count" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="img_surface:instrument_type = ('IMAGING CAMERA', 'IMAGING SPECTROMETER', 'RADIOMETER', 'SPECTROMETER')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Placement_Target_Instrument">
    <xs:annotation>
      <xs:documentation>Indicates the instrument that is referred to by
        the product. This is not the same as the instrument that
        acquired the product. For example, on InSight instrument
        placement products, it defines which instrument is being
        placed.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="pds:name" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element ref="pds:Internal_Reference" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Reach_Instrument">
    <xs:annotation>
      <xs:documentation>Defines a single instrument for this
        reachability assessment. For products where each instrument is
        associated with a band in the output, the "band" attribute
        specifies which band it is. For products where instruments are
        involved in the computation but not represented individually in
        the output, the band should be omitted.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="instrument_id" type="img_surface:instrument_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="band" type="img_surface:band" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="img_surface:instrument_id = ('APXS', 'DRILL', 'DRT', 'FCS', 'GDRT', 'MAHLI', 'PIXL', 'SCOOP_TIP', 'SHERLOC', 'SHERLOC_WATSON')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Reach_Instruments">
    <xs:annotation>
      <xs:documentation>Lists the instruments involved in this
        reachability assesment.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Reach_Instrument" type="img_surface:Reach_Instrument" minOccurs="0" maxOccurs="unbounded"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Reachability">
    <xs:annotation>
      <xs:documentation>This class describes Reachability products,
        which define whether and how a moving device (such as an arm)
        can contact, view, or otherwise interact with the world at each
        pixel of an image.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="device_id" type="img_surface:device_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Reach_Instruments" type="img_surface:Reach_Instruments" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Configurations" type="img_surface:Configurations" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="img_surface:device_id = ('ARM')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="Stereo_Product_Parameters">
    <xs:annotation>
      <xs:documentation>The Stereo_Product_Parameters class describes
        the conditions under which stereo analysis was performed. This
        includes items such as the stereo baseline (separation between
        the cameras) and what partner image(s) were used for stereo
        analysis. If present, stereo partner images can be referenced
        using either an Internal_Reference or
        External_Reference.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="correlation_average_scale" type="img_surface:correlation_average_scale" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="correlation_overlap_percentage" type="img_surface:correlation_overlap_percentage" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="correlation_pixel_count" type="img_surface:correlation_pixel_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="stereo_baseline_length" type="img_surface:stereo_baseline_length" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="pds:Internal_Reference"> </xs:element>
        <xs:element ref="pds:External_Reference"> </xs:element>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Surface_Imaging">
    <xs:annotation>
      <xs:documentation>Attributes specific to imaging instruments on
        surface missions.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Image_Identifiers" type="img_surface:Image_Identifiers" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Instrument_Information" type="img_surface:Instrument_Information" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Derived_Product_Parameters" type="img_surface:Derived_Product_Parameters" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="Error_Model" type="img_surface:Error_Model" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Geometry_Projection" type="img_surface:Geometry_Projection" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Reachability" type="img_surface:Reachability" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Stereo_Product_Parameters" type="img_surface:Stereo_Product_Parameters" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element ref="geom:Coordinate_Space_Reference" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="Error_Pixel" type="img_surface:Error_Pixel" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="Commanded_Parameters" type="img_surface:Commanded_Parameters" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Vector_Range_Origin">
    <xs:annotation>
      <xs:documentation>The Vector_Range_Origin class specifies the 3-D
        space from which the Range values are measured in a Range RDR.
        This will normally be the same as the C point of the camera. It
        is expressed in the coordinate system specified by the
        Coordinate_Space_Reference class.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="x_position" type="img_surface:x_position" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element name="y_position" type="img_surface:y_position" minOccurs="1" maxOccurs="1"> </xs:element>
      <xs:element name="z_position" type="img_surface:z_position" minOccurs="1" 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:simpleType name="band">
    <xs:annotation>
      <xs:documentation>Specifies the band number (1-based) of the band
        in which the data for the specified instrument
        resides.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="camera_model_serial_number">
    <xs:annotation>
      <xs:documentation>Specifies the manufacturer's serial number for
        the camera for which the camera model was derived. This should
        match instrument_serial_number in most cases; generally speaking
        a mismatch should only occur during
        testing/development.</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:simpleType name="camera_product_id">
    <xs:annotation>
      <xs:documentation>The camera_product_id attribute specifies a
        numeric identifier assigned by the instrument to this specific
        observation.</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:simpleType name="camera_product_id_count">
    <xs:annotation>
      <xs:documentation>The camera_product_id_count attribute specifies
        the number of times a specific camera_product_id has been
        used.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="correlation_average_scale">
    <xs:annotation>
      <xs:documentation>Contains the "average" scale factor for the
        correlation. In other words, given the reference image, scale it
        by this amount to match the target image. This scale factor is
        not precisely defined; it is determined in different ways by
        different correlation programs. The intent is to provide a
        "hint" for users of the correlation without requiring a full set
        of transform coefficients.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="correlation_overlap_percentage">
    <xs:annotation>
      <xs:documentation>Contains the percentage of the reference image
        that could overlap, geometrically speaking, with the target
        image. It does not indicate the actual correlation percentage,
        but rather what might correlate ideally. This can be used to
        distinguish, for example, nearly perfect correlation in a small
        overlapping area vs. very poor correlation over the entire image
        - both of which could have the same correlation_pixel_count).
        This percentage is not precisely defined; it is an approximation
        intended to facilitate culling of results.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="100"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="correlation_pixel_count">
    <xs:annotation>
      <xs:documentation>Contains a count of the number of pixels that
        successfully correlated in the image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="derived_image_type_name">
    <xs:annotation>
      <xs:documentation>The derived_image_type_name attribute specifies
        how to interpret the pixel values in a derived image (or
        colloquially, the type of the derived image itself). Valid
        values vary per mission depending on the products
        produced.</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:simpleType name="device_config">
    <xs:annotation>
      <xs:documentation>Names a specific configuration of the device.
        Current MSL and Mars2020 valids: "ARM_SO_EU_WU", "ARM_SO_EU_WD",
        "ARM_SO_ED_WU", "ARM_SO_ED_WD", "ARM_SI_EU_WU", "ARM_SI_EU_WD",
        "ARM_SI_ED_WU", "ARM_SI_ED_WD" </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:simpleType name="device_id">
    <xs:annotation>
      <xs:documentation>Identifies the device that this Reachability
        applies to. Current MSL and Mars2020 valids: "ARM"
        </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:simpleType name="error_model_name">
    <xs:annotation>
      <xs:documentation>The error_model_name attribute specifies the
        method or algorithm used to create the error estimate. Each
        mission will define their own set of possible values. Algorithms
        will be added over time. The initial value is
        MIPL_CONST_DISPARITY_PROJECTED_V1, which means an arbitrary
        constant disparity error is assumed (in ERROR_MODEL_PARMS),
        which is projected through the camera models to approximate an
        error ellipse, which is then projected to the XYZ or
        range/crossrange axes depending on the file type.
        </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:simpleType name="geometry_projection_type">
    <xs:annotation>
      <xs:documentation>The geometry_projection_type attribute specifies
        how pixels in a file have been reprojected to correct for camera
        distortion, linearization, or rubber-sheeting (it is not the
        intent of this field to capture map projections). "Raw"
        indicates no projection has been done.</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:simpleType name="horizon_mask_elevation_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="horizon_mask_elevation">
    <xs:annotation>
      <xs:documentation>The horizon_mask_elevation attribute specifies
        the elevation (in degrees) used as the horizontal cutoff in a
        mask file that prevents the horizon and sky features in the
        image from being processed. If this attribute is not present in
        the product label, no horizon mask was used.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="img_surface:horizon_mask_elevation_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Angle" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="image_acquire_mode">
    <xs:annotation>
<xs:documentation>_TBD</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:simpleType name="image_id">
    <xs:annotation>
      <xs:documentation>The image_id is an arbitrary string identifier
        that is associated with this image. The specific interpretation
        of it is mission-dependent, and it need not be unique to this
        image. For example, missions may use it as an image counter, a
        round-trip token indicating how to process the image, or a
        FSW-assigned value identifying the image.</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:simpleType name="image_id_2">
    <xs:annotation>
      <xs:documentation>The image_id_2 allows a second image_id for
        missions with two, same use cases.</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:simpleType name="image_type">
    <xs:annotation>
      <xs:documentation>The image_type attribute specifies the type of
        image acquired. The intent is to distinguish between different
        kinds of image-related data that may differ in how they are
        interpreted. Some types are not standard images, but they are
        stored in an image structure. Examples include Regular,
        Thumbnail, Reference Pixels, Histogram, Row Sum, and Column
        Sum.</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:simpleType name="instrument_id">
    <xs:annotation>
      <xs:documentation>Identifies the instrument used in reachability
        assessment. Mars2020 valids:
        "DRILL","GDRT","SHERLOC_WATSON","SHERLOC","PIXL", "FCS". MSL
        valids: "DRILL","DRT","MAHLI","APXS","SCOOP_TIP"
        </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:simpleType name="instrument_mode_id">
    <xs:annotation>
      <xs:documentation> The instrument_mode_id attribute provides an
        instrument-dependent designation of operating mode. This may be
        simply a number, letter or code, or a word such as 'normal',
        'full resolution', 'near encounter', or 'fixed grating'. These
        types may vary by mission so the permissible values should be
        set by the mission dictionaries.</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:simpleType name="instrument_serial_number">
    <xs:annotation>
      <xs:documentation>The instrument serial number element provides
        the manufacturer's serial number assigned to an instrument. This
        number may be used to uniquely identify a particular instrument
        for tracing its components or determining its calibration
        history, for example.</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:complexType name="instrument_type">
    <xs:annotation>
      <xs:documentation>The instrument_type attribute specifies the type
        of an instrument, for example IMAGING CAMERA, SPECTROMETER,
        IMAGING SPECTROMETER, or RADIOMETER</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="instrument_version_number">
    <xs:annotation>
      <xs:documentation> The instrument_version_number element
        identifies the specific model of an instrument used to obtain
        data. For example, this keyword could be used to distinguish
        between an engineering model of a camera used to acquire test
        data, and a flight model of a camera used to acquire science
        data during a mission.</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:simpleType name="line">
    <xs:annotation>
      <xs:documentation>The line attribute specifies the line number in
        the image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="1"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="linearization_mode">
    <xs:annotation>
      <xs:documentation> The linearization_mode attribute specifies what
        kind of stereo partner was used to linearize the image (the
        process requires two camera models). </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:simpleType name="linearization_mode_fov">
    <xs:annotation>
      <xs:documentation> The linearization_mode_fov attribute specifies
        how the linearized camera model's field of view (FOV) as
        constructed (corresponding to the "cahv_fov" parameter in MIPL
        software). </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:simpleType name="mesh_id">
    <xs:annotation>
      <xs:documentation>The mesh_id attribute specifies which terrain
        mesh this image should be automatically included in. This does
        not constrain which mesh(es) the image may be included in
        outside a pipeline environment.</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:simpleType name="mosaic_id">
    <xs:annotation>
      <xs:documentation>The mosaic_id attribute specifies which mosaic
        this image should be automatically included in. This does not
        constrain which mosaic(s) the image may be included in outside a
        pipeline environment.</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:simpleType name="observation_number">
    <xs:annotation>
      <xs:documentation>Identifies which observation of many this data
        product pertains to.</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:simpleType name="ops_instrument_key">
    <xs:annotation>
      <xs:documentation>The ops_instrument_key attribute specifies the
        identifier or key for the instrument that was used during
        operations to look up instrument parameters or calibration. The
        key in Commanded_Parameters may differ from the primary
        ops_instrument_key in that the command may apply to a stereo
        camera as a pair (e.g. MCAMZ_BOTH) rather than a specific left
        or right eye.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Preserved">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="parameter_table_number">
    <xs:annotation>
      <xs:documentation>Specifies which table of parameters to use.
        Tables are necessarily defined in a mission- and
        instrument-specific manner.</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:simpleType name="sample">
    <xs:annotation>
      <xs:documentation>The sample attribute specifies the sample number
        in the image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="1"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_bit">
    <xs:annotation>
      <xs:documentation>For Configurations that are bit-packed into a
        word, specifies the starting bit for this configuration. Bits
        are numbered starting at 0 for the least-significant
        bit.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_image_id">
    <xs:annotation>
      <xs:documentation>Specifies the starting image ID for some
        operation.</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:simpleType name="stereo_baseline_length_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="stereo_baseline_length">
    <xs:annotation>
      <xs:documentation> The stereo_baseline_length attribute specifies
        the separation between the two cameras used for processing of
        the stereo image. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="img_surface:stereo_baseline_length_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Length" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="stereo_match_id">
    <xs:annotation>
      <xs:documentation> The stereo_match_id attribute specifies which
        other image this image matches with for stereo processing. If
        used for a mission, the two images making up a stereo pair
        should share the same stereo_match_id value. </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:simpleType name="stop_bit">
    <xs:annotation>
      <xs:documentation>For Configurations that are bit-packed into a
        word, specifies the ending bit for this configuration. Bits are
        numbered starting at 0 for the least-significant bit. If
        present, stop_bit must be equal to or less than start_bit. If
        absent, start_bit identifies a single bit.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_NonNegative_Integer">
    	<xs:pattern value='[0-9]+'/>
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="18446744073709551615"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="tracking_id">
    <xs:annotation>
      <xs:documentation>tracking_id is an arbitrary string identifier
        associated with the image. The specific interpretation of it is
        mission-dependent, and it need not be unique to this image, but
        it is intended to help track the image and relate it back to
        commanding.</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:simpleType name="x_position_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="x_position">
    <xs:annotation>
      <xs:documentation>The x component of a Cartesian position
        vector.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="img_surface:x_position_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Length" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="y_position_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="y_position">
    <xs:annotation>
      <xs:documentation>The y component of a Cartesian position
        vector.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="img_surface:y_position_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Length" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="z_position_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="z_position">
    <xs:annotation>
      <xs:documentation>The z component of a Cartesian position
        vector.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="img_surface:z_position_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Length" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:schema>
