Commit 8d43ce33 authored by Kristin Berry's avatar Kristin Berry
Browse files

Initial work toward new ISD keywords

parent 590076c4
Loading
Loading
Loading
Loading
+153 −200
Original line number Diff line number Diff line
@@ -146,53 +146,6 @@ class UsgsAstroLsISD

   static const std::string mISD_KEYWORDS[];

   enum IsdKeywords
   {
      SENSOR_TYPE,
      TOTAL_LINES,
      TOTAL_SAMPLES,
      PLATFORM,
      ABERR,
      ATMREF,
      INT_TIME,
      STARTING_EPHEMERIS_TIME,
      CENTER_EPHEMERIS_TIME,
      DETECTOR_SAMPLE_SUMMING,
      STARTING_SAMPLE,
      IKCODE,
      FOCAL,
      ISIS_Z_DIRECTION,
      OPTICAL_DIST_COEF,
      ITRANSS,
      ITRANSL,
      DETECTOR_SAMPLE_ORIGIN,
      DETECTOR_LINE_ORIGIN,
      DETECTOR_LINE_OFFSET,
      MOUNTING_ANGLES,
      DT_EPHEM,
      T0_EPHEM,
      DT_QUAT,
      T0_QUAT,
      NUMBER_OF_EPHEM,
      NUMBER_OF_QUATERNIONS,
      EPHEM_PTS,
      EPHEM_RATES,
      QUATERNIONS,
      TRI_PARAMETERS,
      SEMI_MAJOR_AXIS,
      ECCENTRICITY,
      REFERENCE_HEIGHT,
      MIN_VALID_HT,
      MAX_VALID_HT,
      IMAGE_ID,
      SENSOR_ID,
      PLATFORM_ID,
      TRAJ_ID,
      COLL_ID,
      REF_DATE_TIME,
      NUM_ISD_KEYWORDS
   };

   protected:
   // Set to default values  
   void reset();

include/json/isd.json

0 → 100644
+265 −0
Original line number Diff line number Diff line
{ 
   "$schema": "http://json-schema.org/draft-07/schema#",
   "title": "Instrument Specification Definition",
   "description": "The Instrument Specification Definition for Astro CSM",
   "type": "object",

   "properties": {
       "BORESIGHT": {
	   "description": "Boresight (x,y,z) vector",
           "type": "array",
	    "items": {
                 "type": "number",
		 "description": "Component of the boresight vector",
		 "minItems": 3,
                 "maxItems": 3
            }
       },
       "DETECTOR_CENTER": {
           "description": "Center of the detector in pixel coordinates", 
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 2,
                 "maxItems": 2
            }
       },
       "CENTER_EPHEMERIS_TIME": {
           "description": "The center ephemeris time of the image", 
           "type": "number"
       },
       "STARTING_EPHEMERIS_TIME": {
           "description": "The starting ephemeris time of the image", 
           "type": "number"
       },
       "FOCAL_LENGTH": {
           "description": "The focal length of the camera in mm",
           "type": "number"
       },
       "FOCAL_LENGTH_EPSILON": {
           "description": "The uncertainty of the focal length of the camera in mm",
           "type": "number"
       },
       "IFOV": {
           "description": "Instantaneous field of view in degrees",
           "type": "number"
       },
       "IMAGE_LINES": {
           "description": "The number of lines in the image", 
           "type": "number"
       },
       "IMAGE_SAMPLES": {
           "description": "The the number of samples in the image",
           "type": "number"
       },
       "ITRANS_LINE": {
           "description": "Transformation matrix from pixels (line) to image plane (y mm)",
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 3,
                 "maxItems": 3
            }
       },
       "ITRANS_SAMPLE": {
           "description": "Transformation matrix from pixels (sample) to image plane (y mm)",
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 3,
                 "maxItems": 3
            }
       },
       "RADII": {
           "description": "The radius object FIXME this needs to be expanded to support up to 3 elts. either std carto a,b,c or equi, polar, etc",
           "type": "number"
       },
       "SEMI_MINOR_AXIS": {
           "description": "The target ellipsoid's minor axis in meters",
           "type": "number"
       },
       "OPTICAL_DISTORTION: {
           "description": "Information needed to convert from undistorted to distorted image plane",
           "type": "object"
	   "properties" : { 
	      "coefficients": { 
	         "type": "array" 
		   { "items": 
		     { "type": "number" } } 
		   },
	      "key" : { "type": "string", "description": "key into LUT to determine equation to use"}
	 },
	"required": ["coefficients", "equation_key"]
       }

       "STARTING_DETECTOR_SAMPLE": {
           "description": "The sample on the detector where the data starts",
           "type": "number",
       },
       "STARTING_DETECTOR_LINE": {
           "description": "The line on the detector where the data starts",
           "type": "number",
       },
       "TRANS_X": {
           "description": "Transformation x coefficients from image plane (mm) to pixel coordinates", 
           "type": "array",
	    "items": {
                 "type": "number",
            },
       },
       "TRANS_Y": {
           "description": "Transformation y coefficients from image plane (mm) to pixel coordinates",
           "type": "array",
	    "items": {
                 "type": "number",
            },
       },
       "SENSOR_LOCATION": {
           "description": "(X, Y, Z) location of sensor in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
       },
       "SENSOR_VELOCITY" : {
           "description": "(v_x, v_y, v_z) velocity of sensor in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
       "SUN_POSITION" : {
           "description": "(v_x, v_y, v_z) velocity of sun in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
       "SUN_VELOCITY" : {
           "description": "(v_x, v_y, v_z) velocity of sun in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
	// can we get rid of euler angles....
       "ORIENTATION": {
           "description": "Orientation of the sensor provided in Euler angles or quaternions",
           "type": "object"
	   "properties" : { 
	      "euler_angles" : { 
		 "type": "array"
		    "items": {
		       "type": "array"
			"items" : {
			  "type": "number",
			  "minItems": 3,
                          "maxItems": 3,
			},
		     }
		}
	      "quaternions" : { 
		"type": "array"
		    "items": {
		       "type": "array"
			"items" : {
			  "type": "number",
			  "minItems": 4,
                          "maxItems": 4,
			},
		     }
		}, 
	    },
       }
       "DETECTOR_LINE_RATE": {
           "description": "The line rates of the detector map with the associated start line and time", 
           "type": "array",
           "items": {
	    "type": "object",
	    "properties": {
	      "START_LINE": {
		"type": "number",
	        },	
              "LINE_START_TIME": {	
 	         "type": "number"
	      },
	      "EXPOSURE_TIME": {
		"type": "number"
	      }
	      "required": [ "EXPOSURE_TIME"]
	    }
       }
       "DETECTOR_SAMPLE_SUMMING": {
           "description": "The summing in the sample-direction",
           "type": "number"
       }
       "DETECTOR_LINE_SUMMING": {
           "description": "The summing in the line-direction",
           "type": "number"
       }
       "APPLY_LIGHT_TIME_CORRECTION": {
           "description": "A flag to indcate whether the light-time correction should be applied",
           "type": "bool"
       }
       "NUMBER_OF_EPHEM": {
           "description": "The number of emphemeris points", 
           "type": "number"
       }
       "NUMBER_OF_QUATERNIONS": {
           "description": "The number of quaternions",
           "type": "number"
       }
       "DT_EPHEM": {
           "description": "The time between each ephemeris point.",
           "type": "number"
       }
       "T0_EPHEM": {
           "description": "First ephemeris time - center ephemeris time",
           "type": "number"
       }
       "DT_QUAT": {
           "description": "Time spacing of quaternions.",
           "type": "number"
       }
       "T0_QUAT: {
           "description": "First quaternion time - center quaternion time."
           "type": "number"
       }
       "REFERENCE_HEIGHT": {
           "description": "Used for determining the intersection of the look vector with the ellipsoid",
           "type": "number"
       }
      "INTERPOLATION_METHOD": {
           "description": "The type of interpolation method to use.", 
           "type": "string"
       }

// can we make whatever creates the ISD deal with this? 

       "FOCAL_PLANE_Z_DIRECTION" : {
           "description" : "The z-direction of the focal plane",
	   "type": "number"
       }
   },
   "required": ["FOCAL_LENGTH", "BORESIGHT","CCD_CENTER","IMAGE_LINES","IMAGE_SAMPLES", "FOCAL_PLANE_Z_DIRECTION"...]"
}
+280 −0
Original line number Diff line number Diff line
{ 
   "$schema": "http://json-schema.org/draft-07/schema#",
   "title": "Instrument Specification Definition",
   "description": "The Instrument Specification Definition for Astro CSM",
   "type": "object",

   "properties": {
       "BORESIGHT": {
	   "description": "Boresight (x,y,z) vector",
           "type": "array",
	    "items": {
                 "type": "number",
		 "description": "Component of the boresight vector",
		 "minItems": 3,
                 "maxItems": 3
            }
       },
       "DETECTOR_CENTER": {
           "description": "Center of the detector in pixel coordinates", 
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 2,
                 "maxItems": 2
            }
       },
       "CENTER_EPHEMERIS_TIME": {
           "description": "The center ephemeris time of the image", 
           "type": "number"
       },
       "STARTING_EPHEMERIS_TIME": {
           "description": "The starting ephemeris time of the image", 
           "type": "number"
       },
       "FOCAL_LENGTH": {
           "description": "The focal length of the camera in mm",
           "type": "number"
       },
       "FOCAL_LENGTH_EPSILON": {
           "description": "The uncertainty of the focal length of the camera in mm",
           "type": "number"
       },
       "IFOV": {
           "description": "Instantaneous field of view in degrees",
           "type": "number"
       },
       "IMAGE_LINES": {
           "description": "The number of lines in the image", 
           "type": "number"
       },
       "IMAGE_SAMPLES": {
           "description": "The the number of samples in the image",
           "type": "number"
       },
       "ITRANS_LINE": {
           "description": "Transformation matrix from pixels (line) to image plane (y mm)",
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 3,
                 "maxItems": 3
            }
       },
       "ITRANS_SAMPLE": {
           "description": "Transformation matrix from pixels (sample) to image plane (y mm)",
           "type": "array",
	    "items": {
                 "type": "number",
		 "minItems": 3,
                 "maxItems": 3
            }
       },

// kill next 3 because they're not used....

       "INSTRUMENT_NAME": {
           "description": "Name of the instrument or sensor", 
           "type": "string",
       }
       "SPACECRAFT_NAME": {
           "description": "Name of the spacecraft",
           "type": "string",
       },
       "TARGET_NAME": {
           "description": "The name of the target body",
           "type": "string",
       },

// Radii object support up to 3 elements 
(std cartographic for A, B, C) 
(equatorial, polar, 
       "SEMI_MAJOR_AXIS": {
           "description": "The semi-major axis of the target in meters.",
           "type": "number",
       },
       "SEMI_MINOR_AXIS": {
           "description": "The target ellipsoid's minor axis in meters",
           "type": "number",
       },
       "OPTICAL_DISTORTION: {
           "description": "Information needed to convert from undistorted to distorted image plane",
           "type": "object",
	   "properties" : { 
	      "coefficients": { "type": "array" { "items": { "type": "number" } } },  # don't have this as part of the ISD
	      "equation_key" : { "type": "string", "description": "key into LUT to determine equation to use"  # this could be the IK code
	 },
	"required": ["coefficients", "equation_key"]
       }

       "STARTING_DETECTOR_SAMPLE": {
           "description": "The sample on the detector where the data starts",
           "type": "number",
       },
       "STARTING_DETECTOR_LINE": {
           "description": "The line on the detector where the data starts",
           "type": "number",
       },
       "TRANS_X": {
           "description": "Transformation x coefficients from image plane (mm) to pixel coordinates", 
           "type": "array",
	    "items": {
                 "type": "number",
            },
       },
       "TRANS_Y": {
           "description": "Transformation y coefficients from image plane (mm) to pixel coordinates",
           "type": "array",
	    "items": {
                 "type": "number",
            },
       },
       "SENSOR_LOCATION": {
           "description": "(X, Y, Z) location of sensor in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
       },
       "SENSOR_VELOCITY" : {
           "description": "(v_x, v_y, v_z) velocity of sensor in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
       "SUN_POSITION" : {
           "description": "(v_x, v_y, v_z) velocity of sun in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
       "SUN_VELOCITY" : {
           "description": "(v_x, v_y, v_z) velocity of sun in body-fixed frame.",
           "type": "array"
	    "items": {
               "type": "array"
	       "items" : {
                  "type": "number",
                  "minItems": 3,
                  "maxItems": 3,
		},
	     }
	}
	// can we get rid of euler angles....
       "ORIENTATION": {
           "description": "Orientation of the sensor provided in Euler angles or quaternions",
           "type": "object"
	   "properties" : { 
	      "euler_angles" : { 
		 "type": "array"
		    "items": {
		       "type": "array"
			"items" : {
			  "type": "number",
			  "minItems": 3,
                          "maxItems": 3,
			},
		     }
		}
	      "quaternions" : { 
		"type": "array"
		    "items": {
		       "type": "array"
			"items" : {
			  "type": "number",
			  "minItems": 4,
                          "maxItems": 4,
			},
		     }
		}, 
	    },
       }
       "DETECTOR_LINE_RATE": {
           "description": "The line rates of the detector map with the associated start line and time", 
           "type": "array",
           "items": {
	    "type": "object",
	    "properties": {
	      "START_LINE": {
		"type": "number",
	        },	
              "LINE_START_TIME": {	
 	         "type": "number"
	      },
	      "EXPOSURE_TIME": {
		"type": "number"
	      }
	      "required": [ "EXPOSURE_TIME"]
	    }
       }
       "DETECTOR_SAMPLE_SUMMING": {
           "description": "The summing in the sample-direction",
           "type": "number"
       }
       "DETECTOR_LINE_SUMMING": {
           "description": "The summing in the line-direction",
           "type": "number"
       }
       "APPLY_LIGHT_TIME_CORRECTION": {
           "description": "A flag to indcate whether the light-time correction should be applied",
           "type": "bool"
       }
       "NUMBER_OF_EPHEM": {
           "description": "The number of emphemeris points", 
           "type": "number"
       }
       "NUMBER_OF_QUATERNIONS": {
           "description": "The number of quaternions",
           "type": "number"
       }
       "DT_EPHEM": {
           "description": "The time between each ephemeris point.",
           "type": "number"
       }
       "T0_EPHEM": {
           "description": "First ephemeris time - center ephemeris time",
           "type": "number"
       }
       "DT_QUAT": {
           "description": "Time spacing of quaternions.",
           "type": "number"
       }
       "T0_QUAT: {
           "description": "First quaternion time - center quaternion time."
           "type": "number"
       }
       "REFERENCE_HEIGHT": {
           "description": "Used for determining the intersection of the look vector with the ellipsoid",
           "type": "number"
       }
      "INTERPOLATION_METHOD": {
           "description": "The type of interpolation method to use.", 
           "type": "string"
       }

// can we make whatever creates the ISD deal with this? 

       "FOCAL_PLANE_Z_DIRECTION" : {
           "description" : "The z-direction of the focal plane",
	   "type": "number"
       }
   },
   "required": ["FOCAL_LENGTH", "BORESIGHT","CCD_CENTER","IMAGE_LINES","IMAGE_SAMPLES", "FOCAL_PLANE_Z_DIRECTION"...]"
}
+521 −519
Original line number Diff line number Diff line
@@ -51,49 +51,51 @@ static const std::string RELEASE_DATE = "20171230";
static const int          N_SENSOR_MODELS   = 1;
const std::string  UsgsAstroLsPlugin::mISD_KEYWORDS[] =
{
   "SENSOR_TYPE",
   "TOTAL_LINES",
   "TOTAL_SAMPLES",
   "PLATFORM",
   "ABERR",
   "ATMREF",
   "INT_TIME",
   "STARTING_EPHEMERIS_TIME",
   "CENTER_EPHEMERIS_TIME",
   "DETECTOR_SAMPLE_SUMMING",
   "STARTING_SAMPLE",
   "IKCODE",
   "FOCAL",
   "ISIS_Z_DIRECTION",
   "OPTICAL_DIST_COEF",
   "ITRANSS",
   "ITRANSL",
   "DETECTOR_SAMPLE_ORIGIN",
   "DETECTOR_LINE_ORIGIN",
   "DETECTOR_LINE_OFFSET",
   "MOUNTING_ANGLES",
   "DT_EPHEM",
   "T0_EPHEM",
   "DT_QUAT",
   "T0_QUAT",
   "NUMBER_OF_EPHEM",
   "NUMBER_OF_QUATERNIONS",
   "EPHEM_PTS",
   "EPHEM_RATES",
   "QUATERNIONS",
   "TRI_PARAMETERS",
   "SEMI_MAJOR_AXIS",
   "ECCENTRICITY",
   // Everything below here is optional
   "REFERENCE_HEIGHT",
   "MIN_VALID_HT",
   "MAX_VALID_HT",
   "IMAGE_ID",
   "SENSOR_ID",
   "PLATFORM_ID",
   "TRAJ_ID",
   "COLL_ID",
   "REF_DATE_TIME"


// "SENSOR_TYPE",
// "TOTAL_LINES",
// "TOTAL_SAMPLES",
// "PLATFORM",
// "ABERR",
// "ATMREF",
// "INT_TIME",
// "STARTING_EPHEMERIS_TIME",
// "CENTER_EPHEMERIS_TIME",
// "DETECTOR_SAMPLE_SUMMING",
// "STARTING_SAMPLE",
// "IKCODE",
// "FOCAL",
// "ISIS_Z_DIRECTION",
// "OPTICAL_DIST_COEF",
// "ITRANSS",
// "ITRANSL",
// "DETECTOR_SAMPLE_ORIGIN",
// "DETECTOR_LINE_ORIGIN",
// "DETECTOR_LINE_OFFSET",
// "MOUNTING_ANGLES",
// "DT_EPHEM",
// "T0_EPHEM",
// "DT_QUAT",
// "T0_QUAT",
// "NUMBER_OF_EPHEM",
// "NUMBER_OF_QUATERNIONS",
// "EPHEM_PTS",
// "EPHEM_RATES",
// "QUATERNIONS",
// "TRI_PARAMETERS",
// "SEMI_MAJOR_AXIS",
// "ECCENTRICITY",
// // Everything below here is optional
// "REFERENCE_HEIGHT",
// "MIN_VALID_HT",
// "MAX_VALID_HT",
// "IMAGE_ID",
// "SENSOR_ID",
// "PLATFORM_ID",
// "TRAJ_ID",
// "COLL_ID",
// "REF_DATE_TIME"
};

const std::string  UsgsAstroLsPlugin::mSTATE_KEYWORDS[] =