Loading...
Searching...
No Matches
satellite-sgp4unit.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------
2 *
3 * sgp4unit.h
4 *
5 * this file contains the sgp4 procedures for analytical propagation
6 * of a satellite. the code was originally released in the 1980 and 1986
7 * spacetrack papers. a detailed discussion of the theory and history
8 * may be found in the 2006 aiaa paper by vallado, crawford, hujsak,
9 * and kelso.
10 *
11 * companion code for
12 * fundamentals of astrodynamics and applications
13 * 2007
14 * by david vallado
15 *
16 * (w) 719-573-2600, email dvallado@agi.com
17 *
18 * current :
19 * 30 Dec 11 david vallado
20 * consolidate updated code version
21 * 30 Aug 10 david vallado
22 * delete unused variables in initl
23 * replace pow inetger 2, 3 with multiplies for speed
24 * changes :
25 * 3 Nov 08 david vallado
26 * put returns in for error codes
27 * 29 sep 08 david vallado
28 * fix atime for faster operation in dspace
29 * add operationmode for afspc (a) or improved (i)
30 * performance mode
31 * 20 apr 07 david vallado
32 * misc fixes for constants
33 * 11 aug 06 david vallado
34 * chg lyddane choice back to strn3, constants, misc doc
35 * 15 dec 05 david vallado
36 * misc fixes
37 * 26 jul 05 david vallado
38 * fixes for paper
39 * note that each fix is preceded by a
40 * comment with "sgp4fix" and an explanation of
41 * what was changed
42 * 10 aug 04 david vallado
43 * 2nd printing baseline working
44 * 14 may 01 david vallado
45 * 2nd edition baseline
46 * 80 norad
47 * original baseline
48 *
49 * code from https://gitlab.inesctec.pt/pmms/ns3-satellite
50 * ---------------------------------------------------------------- */
51
52#ifndef SAT_SGP4UNIT_H
53#define SAT_SGP4UNIT_H
54
55#include <math.h>
56#include <stdio.h>
57#define SGP4Version "SGP4 Version 2011-12-30"
58
59#define pi 3.14159265358979323846
60
61// -------------------------- structure declarations ----------------------------
68
92
93// --------------------------- function declarations ----------------------------
94bool sgp4init(gravconsttype whichconst,
95 char opsmode,
96 const long int satn,
97 const double epoch,
98 const double xbstar,
99 const double xecco,
100 const double xargpo,
101 const double xinclo,
102 const double xmo,
103 const double xno,
104 const double xnodeo,
105 elsetrec& satrec);
106
107bool sgp4(gravconsttype whichconst, elsetrec& satrec, double tsince, double r[3], double v[3]);
108
109double gstime(double jdut1);
110
111void getgravconst(gravconsttype whichconst,
112 double& tumin,
113 double& mu,
114 double& radiusearthkm,
115 double& xke,
116 double& j2,
117 double& j3,
118 double& j4,
119 double& j3oj2);
120
121#endif // SAT_SGP4UNIT_H
bool sgp4(gravconsttype whichconst, elsetrec &satrec, double tsince, double r[3], double v[3])
gravconsttype
@ wgs72old
void getgravconst(gravconsttype whichconst, double &tumin, double &mu, double &radiusearthkm, double &xke, double &j2, double &j3, double &j4, double &j3oj2)
double gstime(double jdut1)
bool sgp4init(gravconsttype whichconst, char opsmode, const long 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)
long int satnum