• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • satellites
  • sgp4
sgp4unit.h
Go to the documentation of this file.
1 #ifndef _sgp4unit_
2 #define _sgp4unit_
3 /* ----------------------------------------------------------------
4 *
5 * sgp4unit.h
6 *
7 * this file contains the sgp4 procedures for analytical propagation
8 * of a satellite. the code was originally released in the 1980 and 1986
9 * spacetrack papers. a detailed discussion of the theory and history
10 * may be found in the 2006 aiaa paper by vallado, crawford, hujsak,
11 * and kelso.
12 *
13 * companion code for
14 * fundamentals of astrodynamics and applications
15 * 2007
16 * by david vallado
17 *
18 * (w) 719-573-2600, email dvallado@agi.com
19 *
20 * current :
21 * 3 Nov 08 david vallado
22 * put returns in for error codes
23 * changes :
24 * 29 sep 08 david vallado
25 * fix atime for faster operation in dspace
26 * add operationmode for afspc (a) or improved (i)
27 * performance mode
28 * 20 apr 07 david vallado
29 * misc fixes for constants
30 * 11 aug 06 david vallado
31 * chg lyddane choice back to strn3, constants, misc doc
32 * 15 dec 05 david vallado
33 * misc fixes
34 * 26 jul 05 david vallado
35 * fixes for paper
36 * note that each fix is preceded by a
37 * comment with "sgp4fix" and an explanation of
38 * what was changed
39 * 10 aug 04 david vallado
40 * 2nd printing baseline working
41 * 14 may 01 david vallado
42 * 2nd edition baseline
43 * 80 norad
44 * original baseline
45 * ---------------------------------------------------------------- */
46 
47 #include <math.h>
48 #include <stdio.h>
49 #define SGP4Version "SGP4 Version 2008-11-03"
50 
51 #ifndef M_PI
52 #define M_PI 3.14159265358979323846
53 #endif
54 
55 // -------------------------- structure declarations ----------------------------
56 typedef enum
57 {
58  wgs72old,
59  wgs72,
60  wgs84
61 } gravconsttype;
62 
63 typedef struct elsetrec
64 {
65  long int satnum;
66  int epochyr, epochtynumrev;
67  int error;
68  char operationmode;
69  char init, method;
70 
71  /* Near Earth */
72  int isimp;
73  double aycof , con41 , cc1 , cc4 , cc5 , d2 , d3 , d4 ,
74  delmo , eta , argpdot, omgcof , sinmao , t , t2cof, t3cof ,
75  t4cof , t5cof , x1mth2 , x7thm1 , mdot , nodedot, xlcof , xmcof ,
76  nodecf;
77 
78  /* Deep Space */
79  int irez;
80  double d2201 , d2211 , d3210 , d3222 , d4410 , d4422 , d5220 , d5232 ,
81  d5421 , d5433 , dedt , del1 , del2 , del3 , didt , dmdt ,
82  dnodt , domdt , e3 , ee2 , peo , pgho , pho , pinco ,
83  plo , se2 , se3 , sgh2 , sgh3 , sgh4 , sh2 , sh3 ,
84  si2 , si3 , sl2 , sl3 , sl4 , gsto , xfact , xgh2 ,
85  xgh3 , xgh4 , xh2 , xh3 , xi2 , xi3 , xl2 , xl3 ,
86  xl4 , xlamo , zmol , zmos , atime , xli , xni;
87 
88  double a , altp , alta , epochdays, jdsatepoch , nddot , ndot ,
89  bstar , rcse , inclo , nodeo , ecco , argpo , mo ,
90  no;
91 } elsetrec;
92 
93 
94 // --------------------------- function declarations ----------------------------
95 bool sgp4init
96  (
97  gravconsttype whichconst, char opsmode, const int satn, const double epoch,
98  const double xbstar, const double xecco, const double xargpo,
99  const double xinclo, const double xmo, const double xno,
100  const double xnodeo, elsetrec& satrec
101  );
102 
103 bool sgp4
104  (
105  gravconsttype whichconst, elsetrec& satrec, double tsince,
106  double r[3], double v[3]
107  );
108 
109 double gstime
110  (
111  double jdut1
112  );
113 
114 void getgravconst
115  (
116  gravconsttype whichconst,
117  double& tumin,
118  double& mu,
119  double& radiusearthkm,
120  double& xke,
121  double& j2,
122  double& j3,
123  double& j4,
124  double& j3oj2
125  );
126 
127 #endif
128 
elsetrec::aycof
double aycof
Definition: sgp4unit.h:73
elsetrec::se2
double se2
Definition: sgp4unit.h:80
elsetrec::dnodt
double dnodt
Definition: sgp4unit.h:80
gstime
double gstime(double jdut1)
Definition: sgp4unit.cpp:2008
elsetrec::se3
double se3
Definition: sgp4unit.h:80
elsetrec::a
double a
Definition: sgp4unit.h:88
elsetrec
Definition: sgp4unit.h:63
elsetrec::d4410
double d4410
Definition: sgp4unit.h:80
elsetrec::mdot
double mdot
Definition: sgp4unit.h:73
elsetrec::nddot
double nddot
Definition: sgp4unit.h:88
elsetrec::bstar
double bstar
Definition: sgp4unit.h:88
elsetrec::cc5
double cc5
Definition: sgp4unit.h:73
elsetrec::no
double no
Definition: sgp4unit.h:88
elsetrec::nodedot
double nodedot
Definition: sgp4unit.h:73
elsetrec::xh2
double xh2
Definition: sgp4unit.h:80
elsetrec::d3210
double d3210
Definition: sgp4unit.h:80
elsetrec::argpo
double argpo
Definition: sgp4unit.h:88
elsetrec::epochdays
double epochdays
Definition: sgp4unit.h:88
elsetrec::sh2
double sh2
Definition: sgp4unit.h:80
elsetrec::d2201
double d2201
Definition: sgp4unit.h:80
elsetrec::pho
double pho
Definition: sgp4unit.h:80
elsetrec
struct elsetrec elsetrec
elsetrec::d5232
double d5232
Definition: sgp4unit.h:80
elsetrec::xgh3
double xgh3
Definition: sgp4unit.h:80
elsetrec::alta
double alta
Definition: sgp4unit.h:88
elsetrec::epochyr
int epochyr
Definition: sgp4unit.h:66
elsetrec::mo
double mo
Definition: sgp4unit.h:88
elsetrec::zmos
double zmos
Definition: sgp4unit.h:80
elsetrec::sgh3
double sgh3
Definition: sgp4unit.h:80
elsetrec::sgh2
double sgh2
Definition: sgp4unit.h:80
elsetrec::pgho
double pgho
Definition: sgp4unit.h:80
elsetrec::pinco
double pinco
Definition: sgp4unit.h:80
elsetrec::xfact
double xfact
Definition: sgp4unit.h:80
elsetrec::d5433
double d5433
Definition: sgp4unit.h:80
elsetrec::sl4
double sl4
Definition: sgp4unit.h:80
elsetrec::omgcof
double omgcof
Definition: sgp4unit.h:73
elsetrec::d2211
double d2211
Definition: sgp4unit.h:80
elsetrec::t3cof
double t3cof
Definition: sgp4unit.h:73
elsetrec::xh3
double xh3
Definition: sgp4unit.h:80
elsetrec::e3
double e3
Definition: sgp4unit.h:80
sgp4
bool sgp4(gravconsttype whichconst, elsetrec &satrec, double tsince, double r[3], double v[3])
Definition: sgp4unit.cpp:1696
elsetrec::xlcof
double xlcof
Definition: sgp4unit.h:73
elsetrec::atime
double atime
Definition: sgp4unit.h:80
wgs72old
Definition: sgp4unit.h:58
elsetrec::x1mth2
double x1mth2
Definition: sgp4unit.h:73
elsetrec::t4cof
double t4cof
Definition: sgp4unit.h:73
elsetrec::sh3
double sh3
Definition: sgp4unit.h:80
gravconsttype
gravconsttype
Definition: sgp4unit.h:56
elsetrec::d5421
double d5421
Definition: sgp4unit.h:80
elsetrec::d5220
double d5220
Definition: sgp4unit.h:80
elsetrec::xl2
double xl2
Definition: sgp4unit.h:80
elsetrec::dmdt
double dmdt
Definition: sgp4unit.h:80
elsetrec::eta
double eta
Definition: sgp4unit.h:73
elsetrec::xmcof
double xmcof
Definition: sgp4unit.h:73
elsetrec::d3
double d3
Definition: sgp4unit.h:73
elsetrec::init
char init
Definition: sgp4unit.h:69
elsetrec::d3222
double d3222
Definition: sgp4unit.h:80
elsetrec::sl2
double sl2
Definition: sgp4unit.h:80
elsetrec::xgh4
double xgh4
Definition: sgp4unit.h:80
elsetrec::sl3
double sl3
Definition: sgp4unit.h:80
elsetrec::didt
double didt
Definition: sgp4unit.h:80
elsetrec::si3
double si3
Definition: sgp4unit.h:80
elsetrec::altp
double altp
Definition: sgp4unit.h:88
elsetrec::d2
double d2
Definition: sgp4unit.h:73
wgs84
Definition: sgp4unit.h:60
elsetrec::xl3
double xl3
Definition: sgp4unit.h:80
elsetrec::plo
double plo
Definition: sgp4unit.h:80
elsetrec::t2cof
double t2cof
Definition: sgp4unit.h:73
elsetrec::peo
double peo
Definition: sgp4unit.h:80
elsetrec::method
char method
Definition: sgp4unit.h:69
elsetrec::gsto
double gsto
Definition: sgp4unit.h:80
elsetrec::del1
double del1
Definition: sgp4unit.h:80
elsetrec::error
int error
Definition: sgp4unit.h:67
elsetrec::nodecf
double nodecf
Definition: sgp4unit.h:73
elsetrec::xl4
double xl4
Definition: sgp4unit.h:80
elsetrec::ndot
double ndot
Definition: sgp4unit.h:88
elsetrec::inclo
double inclo
Definition: sgp4unit.h:88
elsetrec::del2
double del2
Definition: sgp4unit.h:80
elsetrec::jdsatepoch
double jdsatepoch
Definition: sgp4unit.h:88
elsetrec::isimp
int isimp
Definition: sgp4unit.h:72
elsetrec::operationmode
char operationmode
Definition: sgp4unit.h:68
elsetrec::xi2
double xi2
Definition: sgp4unit.h:80
elsetrec::cc4
double cc4
Definition: sgp4unit.h:73
elsetrec::domdt
double domdt
Definition: sgp4unit.h:80
elsetrec::cc1
double cc1
Definition: sgp4unit.h:73
elsetrec::xi3
double xi3
Definition: sgp4unit.h:80
elsetrec::t
double t
Definition: sgp4unit.h:73
elsetrec::satnum
long int satnum
Definition: sgp4unit.h:65
elsetrec::argpdot
double argpdot
Definition: sgp4unit.h:73
elsetrec::del3
double del3
Definition: sgp4unit.h:80
elsetrec::epochtynumrev
int epochtynumrev
Definition: sgp4unit.h:66
wgs72
Definition: sgp4unit.h:59
elsetrec::con41
double con41
Definition: sgp4unit.h:73
elsetrec::xlamo
double xlamo
Definition: sgp4unit.h:80
elsetrec::zmol
double zmol
Definition: sgp4unit.h:80
elsetrec::xli
double xli
Definition: sgp4unit.h:80
getgravconst
void getgravconst(gravconsttype whichconst, double &tumin, double &mu, double &radiusearthkm, double &xke, double &j2, double &j3, double &j4, double &j3oj2)
Definition: sgp4unit.cpp:2059
elsetrec::nodeo
double nodeo
Definition: sgp4unit.h:88
elsetrec::xgh2
double xgh2
Definition: sgp4unit.h:80
elsetrec::delmo
double delmo
Definition: sgp4unit.h:73
elsetrec::ee2
double ee2
Definition: sgp4unit.h:80
elsetrec::ecco
double ecco
Definition: sgp4unit.h:88
elsetrec::dedt
double dedt
Definition: sgp4unit.h:80
elsetrec::irez
int irez
Definition: sgp4unit.h:79
elsetrec::si2
double si2
Definition: sgp4unit.h:80
elsetrec::x7thm1
double x7thm1
Definition: sgp4unit.h:73
elsetrec::sinmao
double sinmao
Definition: sgp4unit.h:73
elsetrec::rcse
double rcse
Definition: sgp4unit.h:88
elsetrec::d4
double d4
Definition: sgp4unit.h:73
elsetrec::d4422
double d4422
Definition: sgp4unit.h:80
sgp4init
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)
Definition: sgp4unit.cpp:1339
elsetrec::t5cof
double t5cof
Definition: sgp4unit.h:73
elsetrec::sgh4
double sgh4
Definition: sgp4unit.h:80
elsetrec::xni
double xni
Definition: sgp4unit.h:80
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal