Commit 2e4c87da authored by Guillaume Pasero's avatar Guillaume Pasero

Merge branch 'CosmoSpotLight' into 'develop'

New mode (SpotLight) for Cosmo sensor model

See merge request !508
parents 7fd82ff2 7a1550d5
Pipeline #2197 passed with stage
in 14 minutes and 4 seconds
......@@ -64,7 +64,7 @@ public:
: private equality_comparable<ProductType>
, private less_than_comparable<ProductType>
{
enum Type { SLC, GRD, MGD, GEC, EEC, SCS_B, MAX__, UNDEFINED__, FIRST__=0 };
enum Type { SLC, GRD, MGD, GEC, EEC, SCS_B, SCS_U, MAX__, UNDEFINED__, FIRST__=0 };
explicit ProductType(unsigned char value)
: m_value(Type(value))
......
......@@ -268,7 +268,7 @@ namespace ossimplugins
}
}
int nbRasterCount = dataset->GetRasterCount();
int nbRasterCout = dataset->GetRasterCount();
// Metadata for each Band
for (int iBand = 0; iBand < dataset->GetRasterCount(); iBand++)
......@@ -310,13 +310,14 @@ namespace ossimplugins
return false;
}
if( (metadataDataSet["Product_Type"] != "SCS_B"))
if( (metadataDataSet["Product_Type"] != "SCS_B") && metadataDataSet["Product_Type"] != "SCS_U")
{
ossimNotify(ossimNotifyLevel_WARN)
<< "Not an expected product type (only SCS_B expected)" << "'\n" ;
<< "Not an expected product type (only SCS_B and SCS_U expected)" << "'\n" ;
return false;
}
////////////////// Add General Parameters ////////////////
add(theProductKwl, "sensor", "CSK");
add(theProductKwl, "sample_type", "COMPLEX");
......@@ -352,8 +353,10 @@ namespace ossimplugins
add(theProductKwl, SUPPORT_DATA_PREFIX, "azimuth_spacing",
std::stod(metadataBands[0]["S01_SBI_Line_Spacing"]));
add(theProductKwl, SUPPORT_DATA_PREFIX, "range_sampling_rate",
std::stod(metadataDataSet["S01_Sampling_Rate"]));
double samplingRate = 1./std::stod(metadataBands[0]["S01_SBI_Column_Time_Interval"]);
add(theProductKwl, SUPPORT_DATA_PREFIX, "range_sampling_rate", samplingRate);
add(theProductKwl, SUPPORT_DATA_PREFIX, "radar_frequency", std::stod(metadataDataSet["Radar_Frequency"]));
add(theProductKwl, SUPPORT_DATA_PREFIX, "slant_range_to_first_pixel",
std::stod(metadataBands[0]["S01_SBI_Zero_Doppler_Range_First_Time"]));
......@@ -483,7 +486,6 @@ namespace ossimplugins
//////////////// Add GCPs one for the moment ////////////////
// Get the borders
std::string geoCoor_TL = metadataBands[0]["S01_SBI_Top_Left_Geodetic_Coordinates"];
std::vector<std::string> vGeoCoor_TL;
......@@ -500,6 +502,7 @@ namespace ossimplugins
std::string geoCoor_BR = metadataBands[0]["S01_SBI_Bottom_Right_Geodetic_Coordinates"];
std::vector<std::string> vGeoCoor_BR;
otb::Utils::ConvertStringToVector(geoCoor_BR, vGeoCoor_BR, "S01_SBI_Bottom_Right_Geodetic_Coordinates", " ");
// Mean
std::vector<double> vGeoCoor_Mean;
......@@ -523,6 +526,7 @@ namespace ossimplugins
// Inverse model for the middle point
loadState(theProductKwl); // Load the kwl to make the inverse projection
ossimEcefPoint sensorPos;
ossimEcefVector sensorVel;
const bool s1 = this->worldToAzimuthRangeTime(gptPt,estimatedAzimuthTime,estimatedRangeTime,sensorPos,
......
......@@ -98,7 +98,7 @@ namespace {// Anonymous namespace
ossimTrace traceDebug ("ossimSarSensorModel:debug");
typedef char const* const* strings_iterator;
static char const* const PRODUCTTYPE_STRINGS[] = { "SLC", "GRD", "MGD", "GEC", "EEC", "SCS_B" };
static char const* const PRODUCTTYPE_STRINGS[] = { "SLC", "GRD", "MGD", "GEC", "EEC", "SCS_B", "SCS_U" };
}// Anonymous namespace
namespace ossimplugins
......
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