Commit 27ee75b8 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

bretelle pour eviter saut de l'azimuth de 0 deg a 360 deg (probleme ds...

bretelle pour eviter saut de l'azimuth de 0 deg a 360 deg (probleme ds l'interplolation), Reza 22/02/2019
parent a617f03b
......@@ -318,15 +318,25 @@ size_t TrackSet::ReadData(TrkInputDataSet & tkds)
// azimuth values, shifted possibly +360 +720 deg ... to avoid jumping from 360 deg to 0 deg
vector<double> shifted_azim(v_sat_azim[j].size());
double azim_offset=0.;
double min_azim_offset=0.;
bool fgneg_azim_offset=false;
for(size_t k=0; k<v_sat_azim[j].size(); k++) {
double azim=v_sat_azim[j][k];
if ((k>0)&&(azim<last_azim)) {
if ((last_azim>270)&&(azim<90.)) {
if ((last_azim>300.)&&(azim<60.)) {
azim_offset += 360.;
if (_prtlevel_>0)
cout << " read_srctracks k="<<k<<" last_azim="<<last_azim<<" azimuth= "<<azim<<" Offset->"<<azim_offset<<endl;
cout << " read_srctracks 360 to 0 deg. Jump k="<<k<<" last_azim="<<last_azim<<" azimuth= "<<azim<<" Offset->"<<azim_offset<<endl;
}
}
else if ((k>0)&&(azim>last_azim)) {
if ((last_azim<60)&&(azim>300.)) {
azim_offset -= 360.;
if (_prtlevel_>0)
cout << " read_srctracks 0 to 360 deg. Jump: k="<<k<<" last_azim="<<last_azim<<" azimuth= "<<azim<<" Offset->"<<azim_offset<<endl;
}
}
if (azim_offset<min_azim_offset) min_azim_offset=azim_offset;
last_azim = azim;
shifted_azim[k]=azim+azim_offset;
/*
......@@ -336,6 +346,10 @@ size_t TrackSet::ReadData(TrkInputDataSet & tkds)
cazim[k]=cos(phisrc);
*/
}
if (min_azim_offset < -300.) {
cout << " read_srctracks() - correcting for negative azim_offset -> Adding " << -min_azim_offset <<" deg."<<endl;
for(size_t k=0; k<shifted_azim.size(); k++) shifted_azim[k] -= min_azim_offset;
}
v_interp_sazim[j].DefinePoints(v_time_sat[j], shifted_azim);
// v_interp_cphi[j].DefinePoints(v_time_sat[j], cazim);
cout<<" DONE Creation SLinInterp1D for elevation / azimuth ..."<<endl;
......
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