diff --git a/Modules/ThirdParty/OssimPlugins/include/ossim/ossimSarSensorModel.h b/Modules/ThirdParty/OssimPlugins/include/ossim/ossimSarSensorModel.h index 95899b213f30a1574e34106603927a74ff52e9d7..d76968ecf1929a8f8034e016c8b13fa2d2ff3bfb 100644 --- a/Modules/ThirdParty/OssimPlugins/include/ossim/ossimSarSensorModel.h +++ b/Modules/ThirdParty/OssimPlugins/include/ossim/ossimSarSensorModel.h @@ -421,6 +421,9 @@ protected: double theRangeTimeOffset; // Offset in seconds, computed static const double C; + + static const unsigned int thePluginVersion; // version of the SarSensorModel plugin + private: /** Disabled assignment operator. */ ossimSarSensorModel& operator=(ossimSarSensorModel const& rhs); diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSarSensorModel.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSarSensorModel.cpp index e8e5a6ef827ff7d19e5500aeab9fad46ebb7e0f2..c8a9db4ed5c8a751c6822f4ec9c6660da6f3c6b5 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSarSensorModel.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSarSensorModel.cpp @@ -46,7 +46,6 @@ using ossimplugins::time::seconds; namespace {// Anonymous namespace const bool k_verbose = false; // global verbose constant; TODO: use an option - const unsigned int k_version = 2; // Sometimes, we don't need to compare the actual distance, its square value is // more than enough. @@ -108,6 +107,8 @@ namespace ossimplugins const double ossimSarSensorModel::C = 299792458; + const unsigned int ossimSarSensorModel::thePluginVersion = 2; + ossimSarSensorModel::ProductType::ProductType(string_view const& s) { using ossimplugins::begin; @@ -1252,7 +1253,7 @@ namespace ossimplugins kwl.removeKeysThatMatch(GCP_PREFIX+"*"); add(kwl, theGCPRecords); - add(kwl, HEADER_PREFIX, "version", k_version); + add(kwl, HEADER_PREFIX, "version", thePluginVersion); return ossimSensorModel::saveState(kwl, prefix); } @@ -1302,7 +1303,7 @@ namespace ossimplugins try { unsigned int version; get(kwl, HEADER_PREFIX, "version", version); - if (version < k_version) { + if (version < thePluginVersion) { throw std::runtime_error("Geom file generated with previous version of ossim plugins"); } } catch (...) { diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp index ccd6e68e4bed1527e09e8dbd744b92e472489611..716e7ad48addc2545c2c5855abbd1afc1c7651c8 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp @@ -683,6 +683,8 @@ namespace ossimplugins addMandatory(theProductKwl, HEADER_PREFIX, "first_line_time", adsHeader, "startTime"); addMandatory(theProductKwl, HEADER_PREFIX, "last_line_time", adsHeader, "stopTime"); + add(theProductKwl, HEADER_PREFIX, "version", thePluginVersion); + //RK maybe use this->getManifestPrefix() add(theProductKwl, SUPPORT_DATA_PREFIX, "mds1_tx_rx_polar", polarisation);