Added fmod 2PI for calculation of d_xlamo_

feature/19
Daniel Warner 2011-04-01 15:01:38 +01:00
parent 72452918df
commit 219b70ee2c
1 changed files with 2 additions and 2 deletions

View File

@ -810,7 +810,7 @@ void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const d
d_fasx4_ = 2.8843198; d_fasx4_ = 2.8843198;
d_fasx6_ = 0.37448087; d_fasx6_ = 0.37448087;
d_xlamo_ = MeanAnomoly() + AscendingNode() + ArgumentPerigee() - i_gsto_; d_xlamo_ = fmod(MeanAnomoly() + AscendingNode() + ArgumentPerigee() - i_gsto_, Globals::TWOPI());
bfact = xmdot + xpidot - THDT; bfact = xmdot + xpidot - THDT;
bfact += d_ssl_ + d_ssg_ + d_ssh_; bfact += d_ssl_ + d_ssg_ + d_ssh_;
@ -907,7 +907,7 @@ void SGDP4::DeepSpaceInitialize(const double& eosq, const double& sinio, const d
d_d5421_ = temp * f542 * g521; d_d5421_ = temp * f542 * g521;
d_d5433_ = temp * f543 * g533; d_d5433_ = temp * f543 * g533;
d_xlamo_ = MeanAnomoly() + AscendingNode() + AscendingNode() - i_gsto_ - i_gsto_; d_xlamo_ = fmod(MeanAnomoly() + AscendingNode() + AscendingNode() - i_gsto_ - i_gsto_, Globals::TWOPI());
bfact = xmdot + xnodot + xnodot - THDT - THDT; bfact = xmdot + xnodot + xnodot - THDT - THDT;
bfact = bfact + d_ssl_ + d_ssh_ + d_ssh_; bfact = bfact + d_ssl_ + d_ssh_ + d_ssh_;
} }