Commit 9296b7d5 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Calcul ecart angle de pointage / direction de pointage nominale, amelioration...

Calcul ecart angle de pointage / direction de pointage nominale, amelioration prints programme fit des pointages et phases sur satellite, Reza 15/07/2019
parent c66825d3
......@@ -214,6 +214,7 @@ AcxDataSet::AcxDataSet(AcxDataSet const & a)
v_RcFit_ac(a.v_RcFit_ac), v_xi2red_ac(a.v_xi2red_ac),
v_Ddish(a.v_Ddish), v_thetaant(a.v_thetaant), v_phiant(a.v_phiant),
v_err_Ddish(a.v_err_Ddish), v_err_thetaant(a.v_err_thetaant), v_err_phiant(a.v_err_phiant),
v_deltapointage_theta(a.v_deltapointage_theta), v_deltapointage_phi(a.v_deltapointage_phi),
v_RcFit_cx(a.v_RcFit_cx), v_xi2red_cx(a.v_xi2red_cx),
v_phase(a.v_phase), v_phi_0(a.v_phi_0), v_a_phi(a.v_a_phi),
v_err_phi_0(a.v_err_phi_0), v_err_a_phi(a.v_err_a_phi),
......@@ -233,6 +234,7 @@ AcxDataSet & AcxDataSet::operator = (AcxDataSet const & a)
v_RcFit_ac=a.v_RcFit_ac; v_xi2red_ac=a.v_xi2red_ac;
v_Ddish=a.v_Ddish; v_thetaant=a.v_thetaant; v_phiant=a.v_phiant;
v_err_Ddish=a.v_err_Ddish; v_err_thetaant=a.v_err_thetaant; v_err_phiant=a.v_err_phiant;
v_deltapointage_theta=a.v_deltapointage_theta; v_deltapointage_phi=a.v_deltapointage_phi;
v_RcFit_cx=a.v_RcFit_cx; v_xi2red_cx=a.v_xi2red_cx;
v_phase=a.v_phase; v_phi_0=a.v_phi_0; v_a_phi=a.v_a_phi;
v_err_phi_0=a.v_err_phi_0; v_err_a_phi=a.v_err_a_phi;
......@@ -337,8 +339,9 @@ size_t AcxDataSet::ReadData(TrkInputDataSet & tkds)
ostream & AcxDataSet::PrintACFitSummary(ostream & os)
{
computeDeltaPointing();
const char* acnames[4]={"AC-1","AC-2","AC-3","AC-4"};
os << "--------- Fitted Parameters and errors from AutoCorrelations (D-dish, Theta,Phi Antennes) "<<endl;
os << "--------- Fitted Parameters and errors from AutoCorrelations (D-dish, Theta,Phi Antennes, DeltaPointage) "<<endl;
for(size_t i=0; i<getNbAutoCor(); i++) {
double thetaant=v_thetaant[i]; double err_thetaant=v_err_thetaant[i];
double phiant=v_phiant[i]; double err_phiant=v_err_phiant[i];
......@@ -350,8 +353,16 @@ ostream & AcxDataSet::PrintACFitSummary(ostream & os)
os<<acnames[i]<<" D(m)= "<<setw(8)<<v_Ddish[i]<<" +/- "<<setw(8)<<v_err_Ddish[i];
os<<" Elev(deg)= "<<setw(8)<<elevdeg<<" +/- "<<setw(8)<<err_elevdeg;
os<<" Azim(deg)= "<<setw(8)<<azimdeg<<" +/- "<<setw(8)<<err_azimdeg;
os<<" [DeltaP="<<setw(6)<<Angle(v_deltapointage_theta[i]).ToDegree()<<" , "
<<setw(6)<<Angle(v_deltapointage_phi[i]).ToDegree()<<" ]";
os<<" RcFit="<<setw(6)<<v_RcFit_ac[i]<<" Xi2Red= "<<setw(8)<<v_xi2red_ac[i]<<endl;
}
os << "### ZenithAngleDeg DishNumber(1..4) D_dish (m) ThetaDeg PhiDeg DeltaPointage (Theta, Phi - Deg) "<<endl;
for(size_t i=0; i<getNbCrossCor(); i++) {
os <<setw(6)<<zenang<<" "<<setw(3)<<i+1<<" "<<setw(6)<<v_Ddish[i]<<" "
<<setw(6)<<Angle(v_thetaant[i]).ToDegree()<<" "<<setw(6)<<Angle(v_phiant[i]).ToDegree()<<" "
<<setw(6)<<Angle(v_deltapointage_theta[i]).ToDegree()<<" "<<setw(6)<<Angle(v_deltapointage_phi[i]).ToDegree()<<endl;
}
return os;
}
......@@ -377,6 +388,31 @@ ostream & AcxDataSet::PrintCxPhaseFitSummary(ostream & os)
}
void AcxDataSet::computeDeltaPointing()
{
// calcul les directions de pointage par rapport a la direction de pointage theorique
v_deltapointage_theta.resize(v_thetaant.size());
v_deltapointage_phi.resize(v_thetaant.size());
EulerRotation3D rot;
if (fabs(zenang)>1.e-6) {
double rphi=Angle::PioTwoCst();
if (zenang>0.) rphi+=Angle::OnePiCst();
double rthet=Angle(fabs(zenang),Angle::Degree).ToRadian();
rot=EulerRotation3D(rphi, rthet, 0.);
}
for(size_t i=0; i<getNbAutoCor(); i++) {
double thetaant=v_thetaant[i];
double phiant=v_phiant[i];
Vector3d uv;
uv.SetThetaPhi(thetaant, phiant);
Vector3d rv=rot.Rotate(uv);
LongitudeLatitude ll=rv.GetThetaPhi();
v_deltapointage_theta[i]=ll.Theta();
v_deltapointage_phi[i]=ll.Phi();
}
return;
}
//------------------------ TrackSet -------------------------------------
TrackSet::TrackSet(TrackSet const & a)
: v_time_sat(a.v_time_sat), v_sat_elev(a.v_sat_elev), v_sat_azim(a.v_sat_azim),
......
......@@ -17,6 +17,8 @@
#include "cxbeam.h"
#include "rotation3d.h"
using namespace std;
using namespace SOPHYA;
......@@ -77,6 +79,8 @@ public:
ostream & PrintACFitSummary(ostream & os);
ostream & PrintCxPhaseFitSummary(ostream & os);
void computeDeltaPointing(); // calcul les directions de pointage par rapport a la direction de pointage theorique
vector< vector<double> > v_time_data;
vector< vector< vector<double> > > vv_data;
vector< vector< vector<double> > > vv_err;
......@@ -103,6 +107,8 @@ public:
vector<double> v_thetaant, v_phiant;
vector<double> v_err_Ddish;
vector<double> v_err_thetaant, v_err_phiant;
// angle de pointage par rapport a la direction theorique defini par zenang
vector<double> v_deltapointage_theta, v_deltapointage_phi;
//---- Resultat fits cross-corr
vector<int> v_RcFit_cx;
......
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