#ifndef _sgp4unit_
#define _sgp4unit_
#include <math.h>
#include <stdio.h>
#define SGP4Version "SGP4 Version 2011-12-30"
#define pi 3.14159265358979323846
typedef enum { wgs72old, wgs72, wgs84 } gravconsttype;
typedef struct elsetrec {
long int satnum;
int epochyr, epochtynumrev;
int error;
char operationmode;
char init, method;
int isimp;
double aycof, con41, cc1, cc4, cc5, d2, d3, d4, delmo, eta, argpdot, omgcof,
sinmao, t, t2cof, t3cof, t4cof, t5cof, x1mth2, x7thm1, mdot, nodedot,
xlcof, xmcof, nodecf;
int irez;
double d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433,
dedt, del1, del2, del3, didt, dmdt, dnodt, domdt, e3, ee2, peo, pgho, pho,
pinco, plo, se2, se3, sgh2, sgh3, sgh4, sh2, sh3, si2, si3, sl2, sl3, sl4,
gsto, xfact, xgh2, xgh3, xgh4, xh2, xh3, xi2, xi3, xl2, xl3, xl4, xlamo,
zmol, zmos, atime, xli, xni;
double a, altp, alta, epochdays, jdsatepoch, nddot, ndot, bstar, rcse, inclo,
nodeo, ecco, argpo, mo, no;
} elsetrec;
extern "C" {
bool sgp4init(gravconsttype whichconst, char opsmode, const int satn,
const double epoch, const double xbstar,
const double xecco, const double xargpo,
const double xinclo, const double xmo,
const double xno, const double xnodeo,
elsetrec &satrec);
bool sgp4(gravconsttype whichconst, elsetrec &satrec, double tsince,
double r[3], double v[3]);
double gstime(double jdut1);
void getgravconst(gravconsttype whichconst, double &tumin,
double &mu, double &radiusearthkm, double &xke,
double &j2, double &j3, double &j4, double &j3oj2);
}
#endif