Removed -= and *=
parent
d24d064920
commit
18de6eb3ab
|
@ -173,7 +173,7 @@ time_t Julian::ToTime() const {
|
||||||
// the fractional portion of day.
|
// the fractional portion of day.
|
||||||
int nDOM = (int) dblDay;
|
int nDOM = (int) dblDay;
|
||||||
|
|
||||||
dblDay -= nDOM;
|
dblDay = dblDay - nDOM;
|
||||||
|
|
||||||
const int SEC_PER_MIN = 60;
|
const int SEC_PER_MIN = 60;
|
||||||
const int SEC_PER_HR = 60 * SEC_PER_MIN;
|
const int SEC_PER_HR = 60 * SEC_PER_MIN;
|
||||||
|
@ -202,7 +202,7 @@ time_t Julian::ToTime() const {
|
||||||
// Valid time_t value returned from mktime().
|
// Valid time_t value returned from mktime().
|
||||||
// mktime() expects a local time which means that tEpoch now needs
|
// mktime() expects a local time which means that tEpoch now needs
|
||||||
// to be adjusted by the difference between this time zone and GMT.
|
// to be adjusted by the difference between this time zone and GMT.
|
||||||
// tEpoch -= _timezone;
|
// tEpoch = tEpoch - _timezone;
|
||||||
}
|
}
|
||||||
|
|
||||||
return tEpoch;
|
return tEpoch;
|
||||||
|
|
14
SGDP4.cpp
14
SGDP4.cpp
|
@ -284,8 +284,8 @@ void SGDP4::FindPositionSDP4(Eci& eci, double tsince) {
|
||||||
}
|
}
|
||||||
|
|
||||||
a = pow(constants_.XKE / xn, constants_.TWOTHRD) * pow(tempa, 2.0);
|
a = pow(constants_.XKE / xn, constants_.TWOTHRD) * pow(tempa, 2.0);
|
||||||
e -= tempe;
|
e = e - tempe;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fix tolerance for error recognition
|
* fix tolerance for error recognition
|
||||||
*/
|
*/
|
||||||
|
@ -318,7 +318,7 @@ void SGDP4::FindPositionSDP4(Eci& eci, double tsince) {
|
||||||
if (xincl < 0.0) {
|
if (xincl < 0.0) {
|
||||||
xincl = -xincl;
|
xincl = -xincl;
|
||||||
xnode += Globals::PI();
|
xnode += Globals::PI();
|
||||||
omgadf -= Globals::PI();
|
omgadf = omgadf - Globals::PI();
|
||||||
}
|
}
|
||||||
|
|
||||||
xl = xmam + omgadf + xnode;
|
xl = xmam + omgadf + xnode;
|
||||||
|
@ -394,12 +394,12 @@ void SGDP4::FindPositionSGP4(Eci& eci, double tsince) const {
|
||||||
const double temp = delomg + delm;
|
const double temp = delomg + delm;
|
||||||
|
|
||||||
xmp += temp;
|
xmp += temp;
|
||||||
omega -= temp;
|
omega = omega - temp;
|
||||||
|
|
||||||
const double tcube = tsq * tsince;
|
const double tcube = tsq * tsince;
|
||||||
const double tfour = tsince * tcube;
|
const double tfour = tsince * tcube;
|
||||||
|
|
||||||
tempa -= i_d2_ * tsq - i_d3_ * tcube - i_d4_ * tfour;
|
tempa = tempa - i_d2_ * tsq - i_d3_ * tcube - i_d4_ * tfour;
|
||||||
tempe += BStar() * i_c5_ * (sin(xmp) - i_sinmo_);
|
tempe += BStar() * i_c5_ * (sin(xmp) - i_sinmo_);
|
||||||
templ += i_t3cof_ * tcube + tfour * (i_t4cof_ + tsince * i_t5cof_);
|
templ += i_t3cof_ * tcube + tfour * (i_t4cof_ + tsince * i_t5cof_);
|
||||||
}
|
}
|
||||||
|
@ -1049,7 +1049,7 @@ void SGDP4::DeepSpacePeriodics(const double& t, double& em,
|
||||||
if (xnodes < oldxnodes)
|
if (xnodes < oldxnodes)
|
||||||
xnodes += Globals::TWOPI();
|
xnodes += Globals::TWOPI();
|
||||||
else
|
else
|
||||||
xnodes -= Globals::TWOPI();
|
xnodes = xnodes - Globals::TWOPI();
|
||||||
}
|
}
|
||||||
|
|
||||||
xll += pl;
|
xll += pl;
|
||||||
|
@ -1188,7 +1188,7 @@ void SGDP4::DeepSpaceCalcDotTerms(double& xndot, double& xnddt, double& xldot) c
|
||||||
}
|
}
|
||||||
|
|
||||||
xldot = d_xni_ + d_xfact_;
|
xldot = d_xni_ + d_xfact_;
|
||||||
xnddt *= xldot;
|
xnddt = xnddt * xldot;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
2
main.cpp
2
main.cpp
|
@ -424,7 +424,7 @@ void RunTest() {
|
||||||
"1 29141U 85108AA 06170.26783845 .99999999 00000-0 13519-0 0 718",
|
"1 29141U 85108AA 06170.26783845 .99999999 00000-0 13519-0 0 718",
|
||||||
"2 29141 82.4288 273.4882 0015848 277.2124 83.9133 15.93343074 6828"), 0.0, 420.0, 20.0);
|
"2 29141 82.4288 273.4882 0015848 277.2124 83.9133 15.93343074 6828"), 0.0, 420.0, 20.0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
# SL-12 DEB # Near Earth, perigee = 212.24 < 220
|
# SL-12 DEB # Near Earth, perigee = 212.24 < 220
|
||||||
# # simplified drag eq
|
# # simplified drag eq
|
||||||
|
|
Loading…
Reference in New Issue