From e01ea4e73fc94155ab9055816af70012329de537 Mon Sep 17 00:00:00 2001
From: jay <jlaura@usgs.gov>
Date: Fri, 2 Nov 2018 08:37:57 -0700
Subject: [PATCH] unsupported pushed in

---
 include/usgscsm/UsgsAstroPlugin.h |  4 ----
 src/UsgsAstroFrameSensorModel.cpp | 28 ++++++++++++++++------------
 src/UsgsAstroPlugin.cpp           |  7 -------
 3 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/include/usgscsm/UsgsAstroPlugin.h b/include/usgscsm/UsgsAstroPlugin.h
index a3a3c76..8789106 100644
--- a/include/usgscsm/UsgsAstroPlugin.h
+++ b/include/usgscsm/UsgsAstroPlugin.h
@@ -55,11 +55,7 @@ private:
     static const std::string _MANUFACTURER_NAME;
     static const std::string _RELEASE_DATE;
     static const int         _N_SENSOR_MODELS;
-    static const int         _NUM_ISD_KEYWORDS;
     static const std::string _ISD_KEYWORD[];
-    static const int         _NUM_STATE_KEYWORDS;
-    static const std::string _STATE_KEYWORD[];
-    static const json MODEL_KEYWORDS;
 
     typedef csm::Model* (*sensorConstructor)(void);
     static std::map<std::string, sensorConstructor> MODELS;
diff --git a/src/UsgsAstroFrameSensorModel.cpp b/src/UsgsAstroFrameSensorModel.cpp
index e863556..1f9dc37 100644
--- a/src/UsgsAstroFrameSensorModel.cpp
+++ b/src/UsgsAstroFrameSensorModel.cpp
@@ -152,9 +152,17 @@ csm::ImageCoordCovar UsgsAstroFrameSensorModel::groundToImage(const csm::EcefCoo
                                    double *achievedPrecision,
                                    csm::WarningList *warnings) const {
 
-    throw csm::Error(csm::Error::UNSUPPORTED_FUNCTION,
-      "Unsupported function",
-      "UsgsAstroFrameSensorModel::groundToImage");
+    csm::EcefCoord gp;
+    gp.x = groundPt.x;
+    gp.y = groundPt.y;
+    gp.z = groundPt.z;
+
+    csm::ImageCoord ip = groundToImage(                                          
+      gp, desiredPrecision, achievedPrecision, warnings);                     
+   csm::ImageCoordCovar result(ip.line, ip.samp);                                    
+   // This is a partial, incorrect implementation to test if SocetGXP needs
+   // this method implemented in order to load the sensor.
+   return result;
 }
 
 
@@ -215,9 +223,9 @@ csm::EcefCoordCovar UsgsAstroFrameSensorModel::imageToGround(const csm::ImageCoo
                                   double heightVariance, double desiredPrecision,
                                   double *achievedPrecision,
                                   csm::WarningList *warnings) const {
-    throw csm::Error(csm::Error::UNSUPPORTED_FUNCTION,
-      "Unsupported function",
-      "UsgsAstroFrameSensorModel::imageToGround");
+    // This is an incomplete implementation to see if SocetGXP needs this method implemented.
+    csm::EcefCoordCovar result;
+    return result;
 }
 
 
@@ -585,9 +593,7 @@ std::string UsgsAstroFrameSensorModel::getCollectionIdentifier() const {
 
 
 std::string UsgsAstroFrameSensorModel::getTrajectoryIdentifier() const {
-  throw csm::Error(csm::Error::UNSUPPORTED_FUNCTION,
-                   "Unsupported function",
-                   "UsgsAstroFrameSensorModel::getTrajectoryIdentifier");
+  return "";
 }
 
 
@@ -602,9 +608,7 @@ std::string UsgsAstroFrameSensorModel::getSensorMode() const {
 
 
 std::string UsgsAstroFrameSensorModel::getReferenceDateAndTime() const {
-  throw csm::Error(csm::Error::UNSUPPORTED_FUNCTION,
-                   "Unsupported function",
-                   "UsgsAstroFrameSensorModel::getReferenceDateAndTime");
+  return "";
 }
 
 
diff --git a/src/UsgsAstroPlugin.cpp b/src/UsgsAstroPlugin.cpp
index fd22ba2..ed97710 100644
--- a/src/UsgsAstroPlugin.cpp
+++ b/src/UsgsAstroPlugin.cpp
@@ -30,7 +30,6 @@ const std::string UsgsAstroPlugin::_PLUGIN_NAME = "UsgsAstroPluginCSM";
 const std::string UsgsAstroPlugin::_MANUFACTURER_NAME = "UsgsAstrogeology";
 const std::string UsgsAstroPlugin::_RELEASE_DATE = "20170425";
 const int         UsgsAstroPlugin::_N_SENSOR_MODELS = 2;
-const int         UsgsAstroPlugin::_NUM_ISD_KEYWORDS = 21;
 
 const std::string UsgsAstroPlugin::_ISD_KEYWORD[] =
 {
@@ -58,12 +57,6 @@ const std::string UsgsAstroPlugin::_ISD_KEYWORD[] =
    "sun_position"
 };
 
-// const json UsgsAstroPlugin::MODEL_KEYWORDS = {
-//   {UsgsAstroFrameSensorModel::_SENSOR_MODEL_NAME, UsgsAstroFrameSensorModel::_STATE_KEYWORD},
-//   {UsgsAstroLsSensorModel::_SENSOR_MODEL_NAME, UsgsAstroLsSensorModel::_STATE_KEYWORD}
-// };
-
-
 // Static Instance of itself
 const UsgsAstroPlugin UsgsAstroPlugin::m_registeredPlugin;
 
-- 
GitLab