Moved sing/cosg from common init to deep space init
parent
9c7aa8325d
commit
cbb1f894cf
|
@ -174,12 +174,10 @@ void SGDP4::Initialize(const double& theta2, const double& betao2, const double&
|
||||||
|
|
||||||
if (i_use_deep_space_) {
|
if (i_use_deep_space_) {
|
||||||
|
|
||||||
const double sing = sin(ArgumentPerigee());
|
|
||||||
const double cosg = cos(ArgumentPerigee());
|
|
||||||
d_gsto_ = Epoch().ToGreenwichSiderealTime();
|
d_gsto_ = Epoch().ToGreenwichSiderealTime();
|
||||||
|
|
||||||
DeepSpaceInitialize(eosq, i_sinio_, i_cosio_, betao,
|
DeepSpaceInitialize(eosq, i_sinio_, i_cosio_, betao,
|
||||||
theta2, sing, cosg, betao2,
|
theta2, betao2,
|
||||||
i_xmdot_, i_omgdot_, i_xnodot_);
|
i_xmdot_, i_omgdot_, i_xnodot_);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -606,6 +604,8 @@ void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const d
|
||||||
const double xpidot = omgdot + xnodot;
|
const double xpidot = omgdot + xnodot;
|
||||||
const double sinq = sin(AscendingNode());
|
const double sinq = sin(AscendingNode());
|
||||||
const double cosq = cos(AscendingNode());
|
const double cosq = cos(AscendingNode());
|
||||||
|
const double sing = sin(ArgumentPerigee());
|
||||||
|
const double cosg = cos(ArgumentPerigee());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* initialize lunar / solar terms
|
* initialize lunar / solar terms
|
||||||
|
|
2
SGDP4.h
2
SGDP4.h
|
@ -15,7 +15,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void Initialize(const double& theta2, const double& betao2, const double& betao, const double& eosq);
|
void Initialize(const double& theta2, const double& betao2, const double& betao, const double& eosq);
|
||||||
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& betao2,
|
||||||
const double& xmdot, const double& omgdot, const double& xnodot);
|
const double& xmdot, const double& omgdot, const double& xnodot);
|
||||||
void DeepSpaceCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
void DeepSpaceCalculateLunarSolarTerms(const double t, double& pe, double& pinc,
|
||||||
double& pl, double& pgh, double& ph) const;
|
double& pl, double& pgh, double& ph) const;
|
||||||
|
|
Loading…
Reference in New Issue