Commit 80a1152a authored by Guillaume Pasero's avatar Guillaume Pasero

TEST: fix warning loading S1 product

parent fb9ff48a
......@@ -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);
......
......@@ -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 (...) {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment