From 43f6aca6f8d34db8baef51cbd3feaabffef810c3 Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Wed, 30 Mar 2011 13:59:34 +0100 Subject: [PATCH] Edited FindPositionSDP4() to start testing SDP4 --- SGDP4.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/SGDP4.cpp b/SGDP4.cpp index addb329..23abd6c 100644 --- a/SGDP4.cpp +++ b/SGDP4.cpp @@ -265,8 +265,8 @@ void SGDP4::FindPositionSDP4(double tsince) { /* * update for secular gravity and atmospheric drag */ - const double xmdf = MeanAnomoly() + i_xmdot_ * tsince; - const double omgadf = ArgumentPerigee() + i_omgdot_ * tsince; + double xmdf = MeanAnomoly() + i_xmdot_ * tsince; + double omgadf = ArgumentPerigee() + i_omgdot_ * tsince; const double xnoddf = AscendingNode() + i_xnodot_ * tsince; const double tsq = tsince * tsince; @@ -278,11 +278,10 @@ void SGDP4::FindPositionSDP4(double tsince) { double em = Eccentricity(); double xinc = Inclination(); double xn = RecoveredMeanMotion(); -#if 0 - CALL DPSEC(XMDF, OMGADF, XNODE, EM, XINC, XN, TSINCE) - ENTRY DPSEC(XLL, OMGASM, XNODES, EM, XINC, XN, T) - DeepSecular(tsince, xll, omgasm, - xnodes, em, xinc, xn); + + //CALL DPSEC(XMDF, OMGADF, XNODE, EM, XINC, XN, TSINCE) + //ENTRY DPSEC(XLL, OMGASM, XNODES, EM, XINC, XN, T) + DeepSecular(tsince, xmdf, omgadf, xnode, em, xinc, xn); a = pow(constants_.XKE / xn, constants_.TWOTHRD) * pow(tempa, 2.0); xn = constants_.XKE / pow(a, 1.5); @@ -290,13 +289,12 @@ void SGDP4::FindPositionSDP4(double tsince) { double xmam = xmdf + RecoveredMeanMotion() * templ; - CALL DPPER(E, XINC, OMGADF, XNODE, XMAM) - ENTRY DPPER(EM, XINC, OMGASM, XNODES, XLL) - DeepPeriodics(tsince, final_eccentricity, - final_inclination, final_arg_perigee, final_ascending_node, xmam); + //CALL DPPER(E, XINC, OMGADF, XNODE, XMAM) + //ENTRY DPPER(EM, XINC, OMGASM, XNODES, XLL) + DeepPeriodics(tsince, e, xinc, omgadf, xnode, xmam); - xl = xmam + final_arg_perigee + xnode; -#endif + xl = xmam + omgadf + xnode; + xincl = xinc; /* * re-compute the perturbed values