Commit b4a4609f authored by Julien Osman's avatar Julien Osman
Browse files

FIX: Parse the AzimuthFmRate from GEOM files

parent d38eccaf
Pipeline #7221 passed with stages
in 6 minutes and 24 seconds
......@@ -115,6 +115,7 @@ protected:
/* Fetch the AzimuthFmRate metadata */
std::vector<AzimuthFmRate> GetAzimuthFmRate(const XMLMetadataSupplier&) const;
std::vector<AzimuthFmRate> GetAzimuthFmRateGeom(const MetadataSupplierInterface&) const;
/* Fetch the DopplerCentroid metadata */
std::vector<DopplerCentroid> GetDopplerCentroid(const XMLMetadataSupplier&) const;
......
......@@ -375,6 +375,31 @@ std::vector<AzimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate(con
return azimuthFmRateVector;
}
std::vector<AzimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRateGeom(const MetadataSupplierInterface & mds) const
{
std::vector<AzimuthFmRate> azimuthFmRateVector;
// Number of entries in the vector
int listCount = mds.GetAs<int>("azimuthFmRate.azi_fm_rate_coef_nb_list");
// This streams wild hold the iteration number
std::ostringstream oss;
for (int listId = 1 ; listId <= listCount ; ++listId)
{
oss.str("");
oss << listId;
// Base path to the data, that depends on the iteration number
std::string path_root = "azimuthFmRate.azi_fm_rate_coef_list" + oss.str();
AzimuthFmRate afr;
std::istringstream(mds.GetAs<std::string>(path_root + ".azi_fm_rate_coef_time")) >> afr.azimuthTime;
afr.t0 = mds.GetAs<double>(path_root + ".slant_range_time");
std::vector<double> polynom(3);
for (int polyId = 1 ; polyId < 4 ; ++polyId)
polynom.push_back(mds.GetAs<double>(path_root+"."+std::to_string(polyId)+".azi_fm_rate_coef"));
afr.azimuthFmRatePolynomial = polynom;
azimuthFmRateVector.push_back(afr);
}
return azimuthFmRateVector;
}
std::vector<DopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCentroid(const XMLMetadataSupplier &xmlMS) const
{
std::vector<DopplerCentroid> dopplerCentroidVector;
......@@ -730,7 +755,7 @@ void Sentinel1ImageMetadataInterface::ParseGeom(const MetadataSupplierInterface
SARParam sarParam;
Fetch("FACILITY_IDENTIFIER", mds, "manifest_data.Processing_system_identifier");
// TODO: sarParam.azimuthFmRates = ???
sarParam.azimuthFmRates = this->GetAzimuthFmRateGeom(mds);
sarParam.dopplerCentroids = this->GetDopplerCentroidGeom(mds);
sarParam.orbits = this->GetOrbitsGeom(mds);
m_Imd.Add(MDStr::SensorID, "SAR");
......
......@@ -1762,7 +1762,7 @@ int TestHelper::RegressionTestMetaData(const char* testImageFilename, const char
//
// Generate all of the possible baselines
// The possible baselines are generated fromn the baselineFilename using the following algorithm:
// The possible baselines are generated from the baselineFilename using the following algorithm:
// 1) strip the suffix
// 2) append a digit _x
// 3) append the original suffix.
......
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