diff --git a/SGDP4.cpp b/SGDP4.cpp index 625c5e5..d26527f 100644 --- a/SGDP4.cpp +++ b/SGDP4.cpp @@ -247,15 +247,15 @@ void SGDP4::FindPosition(double tsince) { } else { double xmp = xmdf; if (!i_use_simple_model_) { - double delomg = omgcof_ * tsince; - double delm = xmcof_ * (pow(1.0 + i_eta_ * cos(xmdf), 3.0) - delmo_); + double delomg = i_omgcof_ * tsince; + double delm = i_xmcof_ * (pow(1.0 + i_eta_ * cos(xmdf), 3.0) - i_delmo_); double temp1 = delomg + delm; xmp = xmdf + temp1; tsince_arg_perigee -= temp1; double tcube = tsq * tsince; double tfour = tsince * tcube; tempa -= i_d2_ * tsq - i_d3_ * tcube - i_d4_ * tfour; - tempe += BStar() * i_c5_ * (sin(xmp) - sinmo_); + tempe += BStar() * i_c5_ * (sin(xmp) - i_sinmo_); templ += i_t3cof_ * tcube + tfour * (i_t4cof_ + tsince * i_t5cof_); } a = RecoveredSemiMajorAxis() * pow(tempa, 2.0); diff --git a/SGDP4.h b/SGDP4.h index 9ed7115..3721709 100644 --- a/SGDP4.h +++ b/SGDP4.h @@ -23,7 +23,7 @@ private: bool first_run_; /* - * i_ variables are constants that wont be modified outside Init + * variables are constants that wont be modified outside init */ double i_cosio_; double i_sinio_; @@ -33,7 +33,6 @@ private: double i_a3ovk2_; double i_x1mth2_; double i_c4_; - double i_c5_; double i_xmdot_; double i_omgdot_; double i_xnodot_; @@ -42,6 +41,10 @@ private: double i_xlcof_; double i_aycof_; double i_x7thm1_; + /* + * sgp4 constant + */ + double i_c5_; double i_omgcof_; double i_xmcof_; double i_delmo_; @@ -52,6 +55,9 @@ private: double i_t3cof_; double i_t4cof_; double i_t5cof_; + /* + * sdp4 constant + */ double i_gsto_; bool i_use_simple_model_;