Created DeepCalculateLunarSolarTerms() to calculate lunar solar terms
parent
a60db98039
commit
d9bb10a12c
43
SGDP4.cpp
43
SGDP4.cpp
|
@ -921,17 +921,17 @@ void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
void SGDP4::DeepCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
||||||
* lunar / solar periodics
|
double& pl, double& pgh, double& ph) {
|
||||||
*/
|
|
||||||
void SGDP4::DeepPeriodics(const double& t, double& em,
|
|
||||||
double& xinc, double& omgasm, double& xnodes, double& xll) {
|
|
||||||
|
|
||||||
static const double ZES = 0.01675;
|
static const double ZES = 0.01675;
|
||||||
static const double ZNS = 1.19459E-5;
|
static const double ZNS = 1.19459E-5;
|
||||||
static const double ZNL = 1.5835218E-4;
|
static const double ZNL = 1.5835218E-4;
|
||||||
static const double ZEL = 0.05490;
|
static const double ZEL = 0.05490;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* update solar terms
|
||||||
|
*/
|
||||||
double zm = d_zmos_ + ZNS * t;
|
double zm = d_zmos_ + ZNS * t;
|
||||||
if (first_run_)
|
if (first_run_)
|
||||||
zm = d_zmos_;
|
zm = d_zmos_;
|
||||||
|
@ -942,9 +942,12 @@ void SGDP4::DeepPeriodics(const double& t, double& em,
|
||||||
const double ses = d_se2_ * f2 + d_se3_ * f3;
|
const double ses = d_se2_ * f2 + d_se3_ * f3;
|
||||||
const double sis = d_si2_ * f2 + d_si3_ * f3;
|
const double sis = d_si2_ * f2 + d_si3_ * f3;
|
||||||
const double sls = d_sl2_ * f2 + d_sl3_ * f3 + d_sl4_ * sinzf;
|
const double sls = d_sl2_ * f2 + d_sl3_ * f3 + d_sl4_ * sinzf;
|
||||||
|
|
||||||
const double sghs = d_sgh2_ * f2 + d_sgh3_ * f3 + d_sgh4_ * sinzf;
|
const double sghs = d_sgh2_ * f2 + d_sgh3_ * f3 + d_sgh4_ * sinzf;
|
||||||
const double shs = d_sh2_ * f2 + d_sh3_ * f3;
|
const double shs = d_sh2_ * f2 + d_sh3_ * f3;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* update lunar terms
|
||||||
|
*/
|
||||||
zm = d_zmol_ + ZNL * t;
|
zm = d_zmol_ + ZNL * t;
|
||||||
if (first_run_)
|
if (first_run_)
|
||||||
zm = d_zmol_;
|
zm = d_zmol_;
|
||||||
|
@ -958,11 +961,29 @@ void SGDP4::DeepPeriodics(const double& t, double& em,
|
||||||
const double sghl = d_xgh2_ * f2 + d_xgh3_ * f3 + d_xgh4_ * sinzf;
|
const double sghl = d_xgh2_ * f2 + d_xgh3_ * f3 + d_xgh4_ * sinzf;
|
||||||
const double shl = d_xh2_ * f2 + d_xh3_ * f3;
|
const double shl = d_xh2_ * f2 + d_xh3_ * f3;
|
||||||
|
|
||||||
const double pe = ses + sel;
|
/*
|
||||||
const double pinc = sis + sil;
|
* merge computed values
|
||||||
const double pl = sls + sll;
|
*/
|
||||||
const double pgh = sghs + sghl;
|
pe = ses + sel;
|
||||||
const double ph = shs + shl;
|
pinc = sis + sil;
|
||||||
|
pl = sls + sll;
|
||||||
|
pgh = sghs + sghl;
|
||||||
|
ph = shs + shl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* lunar / solar periodics
|
||||||
|
*/
|
||||||
|
void SGDP4::DeepPeriodics(const double& t, double& em,
|
||||||
|
double& xinc, double& omgasm, double& xnodes, double& xll) {
|
||||||
|
|
||||||
|
double pe = 0.0;
|
||||||
|
double pinc = 0.0;
|
||||||
|
double pl = 0.0;
|
||||||
|
double pgh = 0.0;
|
||||||
|
double ph = 0.0;
|
||||||
|
|
||||||
|
DeepCalculateLunarSolarTerms(t, pe, pinc, pl, pgh, ph);
|
||||||
|
|
||||||
if (!first_run_) {
|
if (!first_run_) {
|
||||||
|
|
||||||
|
|
2
SGDP4.h
2
SGDP4.h
|
@ -24,6 +24,8 @@ private:
|
||||||
void DeepSpaceInitialize(const double& eosq, const double& sinio, const double& cosio, const double& betao,
|
void DeepSpaceInitialize(const double& eosq, const double& sinio, const double& cosio, const double& betao,
|
||||||
const double& theta2, const double& sing, const double& cosg, const double& betao2,
|
const double& theta2, const double& sing, const double& cosg, const double& betao2,
|
||||||
const double& xmdot, const double& omgdot, const double& xnodot);
|
const double& xmdot, const double& omgdot, const double& xnodot);
|
||||||
|
void DeepCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
||||||
|
double& pl, double& pgh, double& ph);
|
||||||
void DeepPeriodics(const double& t, double& em, double& xinc,
|
void DeepPeriodics(const double& t, double& em, double& xinc,
|
||||||
double& omgasm, double& xnodes, double& xll);
|
double& omgasm, double& xnodes, double& xll);
|
||||||
void DeepSecular(const double& t, double& xll, double& omgasm,
|
void DeepSecular(const double& t, double& xll, double& omgasm,
|
||||||
|
|
Loading…
Reference in New Issue