sgp4unit.cpp   sgp4unit.cpp 
skipping to change at line 51 skipping to change at line 51
* 10 aug 04 david vallado * 10 aug 04 david vallado
* 2nd printing baseline working * 2nd printing baseline working
* 14 may 01 david vallado * 14 may 01 david vallado
* 2nd edition baseline * 2nd edition baseline
* 80 norad * 80 norad
* original baseline * original baseline
* ---------------------------------------------------------------- */ * ---------------------------------------------------------------- */
#include "sgp4unit.h" #include "sgp4unit.h"
const char help = 'n';
FILE *dbgfile; FILE *dbgfile;
/* ----------- local functions - only ever used internally by sgp4 -------- -- */ /* ----------- local functions - only ever used internally by sgp4 -------- -- */
static void dpper static void dpper
( (
double e3, double ee2, double peo, double pgho, double pho, double e3, double ee2, double peo, double pgho, double pho,
double pinco, double plo, double se2, double se3, double sgh2, double pinco, double plo, double se2, double se3, double sgh2,
double sgh3, double sgh4, double sh2, double sh3, double si2, double sgh3, double sgh4, double sh2, double sh3, double si2,
double si3, double sl2, double sl3, double sl4, double t, double si3, double sl2, double sl3, double sl4, double t,
double xgh2, double xgh3, double xgh4, double xh2, double xh3, double xgh2, double xgh3, double xgh4, double xh2, double xh3,
skipping to change at line 714 skipping to change at line 713
/* --------------------- local variables ------------------------ */ /* --------------------- local variables ------------------------ */
const double twopi = 2.0 * M_PI; const double twopi = 2.0 * M_PI;
double ainv2 , aonv=0.0, cosisq, eoc, f220 , f221 , f311 , double ainv2 , aonv=0.0, cosisq, eoc, f220 , f221 , f311 ,
f321 , f322 , f330 , f441 , f442 , f522 , f523 , f321 , f322 , f330 , f441 , f442 , f522 , f523 ,
f542 , f543 , g200 , g201 , g211 , g300 , g310 , f542 , f543 , g200 , g201 , g211 , g300 , g310 ,
g322 , g410 , g422 , g520 , g521 , g532 , g533 , g322 , g410 , g422 , g520 , g521 , g532 , g533 ,
ses , sgs , sghl , sghs , shs , shll , sis , ses , sgs , sghl , sghs , shs , shll , sis ,
sini2 , sls , temp , temp1 , theta , xno2 , q22 , sini2 , sls , temp , temp1 , theta , xno2 , q22 ,
q31 , q33 , root22, root44, root54, rptim , root32, q31 , q33 , root22, root44, root54, rptim , root32,
root52, x2o3 , xke , znl , emo , zns , emsqo, root52, x2o3 , xke=0 , znl , emo , zns , emsqo,
tumin, mu, radiusearthkm, j2, j3, j4, j3oj2; tumin, mu, radiusearthkm, j2, j3, j4, j3oj2;
q22 = 1.7891679e-6; q22 = 1.7891679e-6;
q31 = 2.1460748e-6; q31 = 2.1460748e-6;
q33 = 2.2123015e-7; q33 = 2.2123015e-7;
root22 = 1.7891679e-6; root22 = 1.7891679e-6;
root44 = 7.3636953e-9; root44 = 7.3636953e-9;
root54 = 2.1765803e-9; root54 = 2.1765803e-9;
rptim = 4.37526908801129966e-3; // this equates to 7.29211514668855e- 5 rad/sec rptim = 4.37526908801129966e-3; // this equates to 7.29211514668855e- 5 rad/sec
root32 = 3.7393792e-7; root32 = 3.7393792e-7;
skipping to change at line 1193 skipping to change at line 1192
int satn, gravconsttype whichconst, int satn, gravconsttype whichconst,
double ecco, double epoch, double inclo, double& no, double ecco, double epoch, double inclo, double& no,
char& method, char& method,
double& ainv, double& ao, double& con41, double& con42, double& cosio, double& ainv, double& ao, double& con41, double& con42, double& cosio,
double& cosio2,double& eccsq, double& omeosq, double& posq, double& cosio2,double& eccsq, double& omeosq, double& posq,
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=0, xke=0,
tumin, mu, radiusearthkm, j3, j4, j3oj2; tumin, mu, radiusearthkm, j3, j4, j3oj2;
/* kill warning */ /* kill warning */
satn = 0; satn = 0;
static_cast<void>(satn); 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;
skipping to change at line 1363 skipping to change at line 1362
cc2 , cc3 , coef , coef1 , cosio4, day , dndt , cc2 , cc3 , coef , coef1 , cosio4, day , dndt ,
em , emsq , eeta , etasq , gam , argpm , nodem , em , emsq , eeta , etasq , gam , argpm , nodem ,
inclm , mm , nm , perige, pinvsq, psisq , qzms24, inclm , mm , nm , perige, pinvsq, psisq , qzms24,
rtemsq, s1 , s2 , s3 , s4 , s5 , s6 , rtemsq, s1 , s2 , s3 , s4 , s5 , s6 ,
s7 , sfour , ss1 , ss2 , ss3 , ss4 , ss5 , s7 , sfour , ss1 , ss2 , ss3 , ss4 , ss5 ,
ss6 , ss7 , sz1 , sz2 , sz3 , sz11 , sz12 , ss6 , ss7 , sz1 , sz2 , sz3 , sz11 , sz12 ,
sz13 , sz21 , sz22 , sz23 , sz31 , sz32 , sz33 , sz13 , sz21 , sz22 , sz23 , sz31 , sz32 , sz33 ,
tc , temp , temp1 , temp2 , temp3 , tsi , xpidot, tc , temp , temp1 , temp2 , temp3 , tsi , xpidot,
xhdot1, z1 , z2 , z3 , z11 , z12 , z13 , xhdot1, z1 , z2 , z3 , z11 , z12 , z13 ,
z21 , z22 , z23 , z31 , z32 , z33, z21 , z22 , z23 , z31 , z32 , z33,
qzms2t, ss, j2, j3oj2, j4, x2o3, r[3], v[3], qzms2t, ss, j2=0, j3oj2=0, j4=0, x2o3, r[3], v[3],
tumin, mu, radiusearthkm, xke, j3; tumin, mu, radiusearthkm=0, xke, j3;
/* ------------------------ initialization --------------------- */ /* ------------------------ initialization --------------------- */
// sgp4fix divisor for divide by zero check on inclination // sgp4fix divisor for divide by zero check on inclination
// the old check used 1.0 + cos(pi-1.0e-9), but then compared it to // the old check used 1.0 + cos(pi-1.0e-9), but then compared it to
// 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency // 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency
const double temp4 = 1.5e-12; const double temp4 = 1.5e-12;
/* ----------- set all near earth variables to zero ------------ */ /* ----------- set all near earth variables to zero ------------ */
satrec.isimp = 0; satrec.method = 'n'; satrec.aycof = 0.0; satrec.isimp = 0; satrec.method = 'n'; satrec.aycof = 0.0;
satrec.con41 = 0.0; satrec.cc1 = 0.0; satrec.cc4 = 0.0; satrec.con41 = 0.0; satrec.cc1 = 0.0; satrec.cc4 = 0.0;
skipping to change at line 1715 skipping to change at line 1714
cos2u, coseo1, cosi , cosip , cosisq, cossu , cosu, cos2u, coseo1, cosi , cosip , cosisq, cossu , cosu,
delm , delomg, em , emsq , ecose , el2 , eo1 , delm , delomg, em , emsq , ecose , el2 , eo1 ,
ep , esine , argpm, argpp , argpdf, pl, mrt = 0.0, ep , esine , argpm, argpp , argpdf, pl, mrt = 0.0,
mvt , rdotl , rl , rvdot , rvdotl, sinim , mvt , rdotl , rl , rvdot , rvdotl, sinim ,
sin2u, sineo1, sini , sinip , sinsu , sinu , sin2u, sineo1, sini , sinip , sinsu , sinu ,
snod , su , t2 , t3 , t4 , tem5 , temp, snod , su , t2 , t3 , t4 , tem5 , temp,
temp1, temp2 , tempa, tempe , templ , u , ux , temp1, temp2 , tempa, tempe , templ , u , ux ,
uy , uz , vx , vy , vz , inclm , mm , uy , uz , vx , vy , vz , inclm , mm ,
nm , nodem, xinc , xincp , xl , xlm , mp , nm , nodem, xinc , xincp , xl , xlm , mp ,
xmdf , xmx , xmy , nodedf, xnode , nodep, tc , dndt, xmdf , xmx , xmy , nodedf, xnode , nodep, tc , dndt,
twopi, x2o3 , j2 , j3 , tumin, j4 , xke , j3oj2, radiusear thkm, twopi, x2o3 , j2=0 , j3 , tumin, j4=0 , xke=0 , j3oj2=0, r adiusearthkm=0,
mu, vkmpersec; mu, vkmpersec;
int ktr; int ktr;
/* ------------------ set mathematical constants --------------- */ /* ------------------ set mathematical constants --------------- */
// sgp4fix divisor for divide by zero check on inclination // sgp4fix divisor for divide by zero check on inclination
// the old check used 1.0 + cos(pi-1.0e-9), but then compared it to // the old check used 1.0 + cos(pi-1.0e-9), but then compared it to
// 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency // 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency
const double temp4 = 1.5e-12; const double temp4 = 1.5e-12;
twopi = 2.0 * M_PI; twopi = 2.0 * M_PI;
x2o3 = 2.0 / 3.0; x2o3 = 2.0 / 3.0;
 End of changes. 5 change blocks. 
6 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/