1 #ifndef SGP4_H_
2 #define SGP4_H_
3 
4 #include <predict/predict.h>
5 #include "sdp4.h"
6 
7 /**
8  * Parameters relevant for SGP4 (simplified general perturbations) orbital model.
9  **/
10 struct _sgp4 {
11 
12 	///Simple flag
13 	int simpleFlag;
14 
15 	///Static variables from original SGP4() (time-independent, and might probably have physical meaningfulness)
16 	double aodp, aycof, c1, c4, c5, cosio, d2, d3, d4, delmo,
17 	omgcof, eta, omgdot, sinio, xnodp, sinmo, t2cof, t3cof, t4cof,
18 	t5cof, x1mth2, x3thm1, x7thm1, xmcof, xmdot, xnodcf, xnodot, xlcof;
19 
20 	//tle fields copied (and converted) from predict_orbital_t. The fields above are TLE-dependent anyway, and interrelated with the values below.
21 	double bstar;
22 	double xincl;
23 	double xnodeo;
24 	double eo;
25 	double omegao;
26 	double xmo;
27 	double xno;
28 };
29 
30 /**
31  * Initialize SGP4 model parameters.
32  *
33  * \param orbital_elements Orbital elements
34  * \param m Struct to initialize
35  * \copyright GPLv2+
36  **/
37 void sgp4_init(const predict_orbital_elements_t *orbital_elements, struct _sgp4 *m);
38 
39 /**
40  * Predict ECI position and velocity of near-earth orbit (period < 225 minutes) according to SGP4 model and the given orbital parameters.
41  *
42  * \param m SGP4 model parameters
43  * \param tsince Time since epoch of TLE in minutes
44  * \param output Output of model
45  * \copyright GPLv2+
46  **/
47 void sgp4_predict(const struct _sgp4 *m, double tsince, struct model_output *output);
48 
49 #endif
50