Commit b34ad36c authored by Alexander Lapshin's avatar Alexander Lapshin

aberration method

parent afdd399e
...@@ -178,7 +178,7 @@ CAA2DCoordinate EquatorialAberration(double Alpha, double Delta, double JD) ...@@ -178,7 +178,7 @@ CAA2DCoordinate EquatorialAberration(double Alpha, double Delta, double JD)
OpticMeasurement::OpticMeasurement() : AFreeMeasurement() OpticMeasurement::OpticMeasurement() : AFreeMeasurement()
{ {
Type = mtOptic; Type = mtOptic;
IsCorrected = true; m_aberation_method = aberration_method::NONE;
m_isBad = false; m_isBad = false;
RecPosFrInit = false; RecPosFrInit = false;
VAlpha = 0; VAlpha = 0;
...@@ -410,15 +410,10 @@ void OpticMeasurement::AberrationCorrect(double alpha, double delta, TimeJD date ...@@ -410,15 +410,10 @@ void OpticMeasurement::AberrationCorrect(double alpha, double delta, TimeJD date
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Коррекция с учетом звездной аберрации // Коррекция с учетом звездной аберрации
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void OpticMeasurement::Correct(aberration_method ab) void OpticMeasurement::Correct(const aberration_method& ab)
{ {
if (IsCorrected || ab == aberration_method::NONE) {
return;
}
AberrationCorrect(Alpha, Delta, MTime, false, ab, Alpha, Delta); AberrationCorrect(Alpha, Delta, MTime, false, ab, Alpha, Delta);
m_aberation_method = ab;
IsCorrected = true;
} }
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
......
...@@ -80,18 +80,11 @@ public: ...@@ -80,18 +80,11 @@ public:
// bool SimulateEx(int matrixSize, ITraject &trj, TimeJD &t, Vect6 &f, double* v, double *del) const; // bool SimulateEx(int matrixSize, ITraject &trj, TimeJD &t, Vect6 &f, double* v, double *del) const;
virtual bool DetectPositionEx(ITraject& trj, TimeJD& t, Vect6& f) const { return false; }; virtual bool DetectPositionEx(ITraject& trj, TimeJD& t, Vect6& f) const { return false; };
// Установка флага коррекции аберрации
void SetCorrectFlag(bool f)
{
IsCorrected = f;
};
// Получение флага коррекции аберрации // Получение флага коррекции аберрации
bool GetCorrectFlag() const const aberration_method& get_aberation_method() const { return m_aberation_method; }
{
return IsCorrected;
};
// Коррекция с учетом звездной аберрации // Коррекция с учетом звездной аберрации
void Correct(aberration_method ab); void Correct(const aberration_method& ab);
// Получение координат станции в Гринвиче // Получение координат станции в Гринвиче
virtual const Vect3& GetStationCoord() const = 0; virtual const Vect3& GetStationCoord() const = 0;
...@@ -109,13 +102,12 @@ public: ...@@ -109,13 +102,12 @@ public:
static void AberrationCorrect(double alpha, double delta, TimeJD date, bool backwardCorrection, aberration_method ab, double& correctedAlpha, double& correctedDelta); static void AberrationCorrect(double alpha, double delta, TimeJD date, bool backwardCorrection, aberration_method ab, double& correctedAlpha, double& correctedDelta);
protected: protected:
// Флаг учета аберрации
bool IsCorrected;
Vect3 RecPosFr; Vect3 RecPosFr;
bool RecPosFrInit; bool RecPosFrInit;
bool m_isBad; bool m_isBad;
// Флаг учета аберрации
aberration_method m_aberation_method;
}; };
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
......
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