sgp4unit.cpp   sgp4unit.cpp 
skipping to change at line 227 skipping to change at line 227
/* --------------------- local variables ------------------------ */ /* --------------------- local variables ------------------------ */
const double twopi = 2.0 * M_PI; const double twopi = 2.0 * M_PI;
double alfdp, betdp, cosip, cosop, dalf, dbet, dls, double alfdp, betdp, cosip, cosop, dalf, dbet, dls,
f2, f3, pe, pgh, ph, pinc, pl , f2, f3, pe, pgh, ph, pinc, pl ,
sel, ses, sghl, sghs, shll, shs, sil, sel, ses, sghl, sghs, shll, shs, sil,
sinip, sinop, sinzf, sis, sll, sls, xls, sinip, sinop, sinzf, sis, sll, sls, xls,
xnoh, zf, zm, zel, zes, znl, zns; xnoh, zf, zm, zel, zes, znl, zns;
/* kill warning */ /* kill warning */
inclo = 0.; inclo = 0.;
static_cast<void>(inclo);
/* ---------------------- constants ----------------------------- */ /* ---------------------- constants ----------------------------- */
zns = 1.19459e-5; zns = 1.19459e-5;
zes = 0.01675; zes = 0.01675;
znl = 1.5835218e-4; znl = 1.5835218e-4;
zel = 0.05490; zel = 0.05490;
/* --------------- calculate time varying periodics ----------- */ /* --------------- calculate time varying periodics ----------- */
zm = zmos + zns * t; zm = zmos + zns * t;
// be sure that the initial call has time set to zero // be sure that the initial call has time set to zero
skipping to change at line 1053 skipping to change at line 1054
xni = no; xni = no;
xli = xlamo; xli = xlamo;
} }
// sgp4fix move check outside loop // sgp4fix move check outside loop
if (t > 0.0) if (t > 0.0)
delt = stepp; delt = stepp;
else else
delt = stepn; delt = stepn;
iretn = 381; // added for do loop iretn = 381; // added for do loop
iret = 0; // added for loop iret = 0; // added for loop
static_cast<void>(iret);
while (iretn == 381) while (iretn == 381)
{ {
/* ------------------- dot terms calculated ------------- */ /* ------------------- dot terms calculated ------------- */
/* ----------- near - synchronous resonance terms ------- */ /* ----------- near - synchronous resonance terms ------- */
if (irez != 2) if (irez != 2)
{ {
xndt = del1 * sin(xli - fasx2) + del2 * sin(2.0 * (xli - fasx4)) + xndt = del1 * sin(xli - fasx2) + del2 * sin(2.0 * (xli - fasx4)) +
del3 * sin(3.0 * (xli - fasx6)); del3 * sin(3.0 * (xli - fasx6));
xldot = xni + xfact; xldot = xni + xfact;
xnddt = del1 * cos(xli - fasx2) + xnddt = del1 * cos(xli - fasx2) +
skipping to change at line 1093 skipping to change at line 1095
2.0 * (d4410 * cos(x2omi + x2li - g44) + 2.0 * (d4410 * cos(x2omi + x2li - g44) +
d4422 * cos(x2li - g44) + d5421 * cos(xomi + x2li - g54) + d4422 * cos(x2li - g44) + d5421 * cos(xomi + x2li - g54) +
d5433 * cos(-xomi + x2li - g54)); d5433 * cos(-xomi + x2li - g54));
xnddt = xnddt * xldot; xnddt = xnddt * xldot;
} }
/* ----------------------- integrator ------------------- */ /* ----------------------- integrator ------------------- */
// sgp4fix move end checks to end of routine // sgp4fix move end checks to end of routine
if (fabs(t - atime) >= stepp) if (fabs(t - atime) >= stepp)
{ {
iret = 0; iret = 0;
iretn = 381; iretn = 381;
} }
else // exit here else // exit here
{ {
ft = t - atime; ft = t - atime;
iretn = 0; iretn = 0;
} }
if (iretn == 381) if (iretn == 381)
{ {
skipping to change at line 1196 skipping to change at line 1198
double& rp, double& rteosq,double& sinio , double& gsto, double& rp, double& rteosq,double& sinio , double& gsto,
char opsmode char opsmode
) )
{ {
/* --------------------- local variables ------------------------ */ /* --------------------- local variables ------------------------ */
double ak, d1, del, adel, po, x2o3, j2, xke, double ak, d1, del, adel, po, x2o3, j2, xke,
tumin, mu, radiusearthkm, j3, j4, j3oj2; tumin, mu, radiusearthkm, j3, j4, j3oj2;
/* kill warning */ /* kill warning */
satn = 0; satn = 0;
static_cast<void>(satn);
// sgp4fix use old way of finding gst // sgp4fix use old way of finding gst
double ds70; double ds70;
double ts70, tfrac, c1, thgr70, fk5r, c1p2p; double ts70, tfrac, c1, thgr70, fk5r, c1p2p;
const double twopi = 2.0 * M_PI; const double twopi = 2.0 * M_PI;
/* ----------------------- earth constants ---------------------- */ /* ----------------------- earth constants ---------------------- */
// sgp4fix identify constants and allow alternate values // sgp4fix identify constants and allow alternate values
getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j 3oj2 ); getgravconst( whichconst, tumin, mu, radiusearthkm, xke, j2, j3, j4, j 3oj2 );
x2o3 = 2.0 / 3.0; x2o3 = 2.0 / 3.0;
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/