FinalPosition compiles.

feature/19
Daniel Warner 2011-03-25 16:19:08 +00:00
parent 0e03902f69
commit 7cd737b81d
1 changed files with 8 additions and 8 deletions

View File

@ -235,6 +235,7 @@ void SGDP4::FindPosition(double tsince) {
tle_data_tsince_.epoch = tle_data_0_.epoch; tle_data_tsince_.epoch = tle_data_0_.epoch;
double xl = 0.0; double xl = 0.0;
double a = 0.0;
/* /*
* update for secular gravity and atmospheric drag * update for secular gravity and atmospheric drag
@ -253,15 +254,14 @@ void SGDP4::FindPosition(double tsince) {
if (use_deep_space_) { if (use_deep_space_) {
double xn = xnodp_; double xn = xnodp_;
double em = 0.0;
#if 0 #if 0
CALL DPSEC(xmdf, tle_data_tsince_.omega, XNODE, EM, tle_data_tsince_.xincl, xn, tsince); CALL DPSEC(xmdf, tle_data_tsince_.omega, XNODE, tle_data_tsince_.eo, tle_data_tsince_.xincl, xn, tsince);
#endif #endif
a = pow(Globals::XKE() / xn, Globals::TOTHRD()) * pow(tempa, 2.0); a = pow(Globals::XKE() / xn, Globals::TOTHRD()) * pow(tempa, 2.0);
e = em - tempe; tle_data_tsince_.eo -= tempe;
double xmam = xmdf + xnodp_ * templ; double xmam = xmdf + xnodp_ * templ;
#if 0 #if 0
CALL DPPER(E, tle_data_tsince_.xincl, tle_data_tsince_.omega, tle_data_tsince_.xnodeo, xmam); CALL DPPER(tle_data_tsince_.eo, tle_data_tsince_.xincl, tle_data_tsince_.omega, tle_data_tsince_.xnodeo, xmam);
#endif #endif
xl = xmam + tle_data_tsince_.omega + xnode; xl = xmam + tle_data_tsince_.omega + xnode;
@ -299,21 +299,21 @@ void SGDP4::FindPosition(double tsince) {
templ += t3cof_ * tcube + tfour * (t4cof_ + tsince * t5cof_); templ += t3cof_ * tcube + tfour * (t4cof_ + tsince * t5cof_);
} }
a = aodp_ * pow(tempa, 2.0); a = aodp_ * pow(tempa, 2.0);
e = eo - tempe; tle_data_tsince_.eo = tle_data_0_.eo - tempe;
xl = xmp + tle_data_tsince_.omega + xnode + xnodp_ * templ; xl = xmp + tle_data_tsince_.omega + xnode + xnodp_ * templ;
} }
double beta = sqrt(1.0 - e * e); double beta = sqrt(1.0 - tle_data_tsince_.eo * tle_data_tsince_.eo);
double xn = Globals::XKE() / pow(a, 1.5); double xn = Globals::XKE() / pow(a, 1.5);
/* /*
* long period periodics * long period periodics
*/ */
double axn = e * cos(tle_data_tsince_.omega); double axn = tle_data_tsince_.eo * cos(tle_data_tsince_.omega);
double temp = 1.0 / (a * beta * beta); double temp = 1.0 / (a * beta * beta);
double xll = temp * xlcof_ * axn; double xll = temp * xlcof_ * axn;
double aynl = temp * aycof_; double aynl = temp * aycof_;
double xlt = xl + xll; double xlt = xl + xll;
double ayn = e * sin(tle_data_tsince_.omega) + aynl; double ayn = tle_data_tsince_.eo * sin(tle_data_tsince_.omega) + aynl;
/* /*
* solve keplers equation * solve keplers equation
*/ */