VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfutil
SGP4.h
Go to the documentation of this file.
1
#ifndef _h_
2
#define _h_
3
/* ----------------------------------------------------------------
4
*
5
* SGP4.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
* current :
14
* 7 dec 15 david vallado
15
* fix jd, jdfrac
16
* changes :
17
* 3 nov 14 david vallado
18
* update to msvs2013 c++
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
* 3 Nov 08 david vallado
25
* put returns in for error codes
26
* 29 sep 08 david vallado
27
* fix atime for faster operation in dspace
28
* add operationmode for afspc (a) or improved (i)
29
* performance mode
30
* 20 apr 07 david vallado
31
* misc fixes for constants
32
* 11 aug 06 david vallado
33
* chg lyddane choice back to strn3, constants, misc doc
34
* 15 dec 05 david vallado
35
* misc fixes
36
* 26 jul 05 david vallado
37
* fixes for paper
38
* note that each fix is preceded by a
39
* comment with "sgp4fix" and an explanation of
40
* what was changed
41
* 10 aug 04 david vallado
42
* 2nd printing baseline working
43
* 14 may 01 david vallado
44
* 2nd edition baseline
45
* 80 norad
46
* original baseline
47
* ---------------------------------------------------------------- */
48
49
#pragma once
50
51
//using namespace System;
52
53
#include <math.h>
54
#include <stdio.h>
55
#include <string.h>
56
#include <iostream>
57
#include "
vrfutil/vrfutilDefines.h
"
58
59
60
#define SGP4Version "SGP4 Version 2016-03-09"
61
63
typedef
enum
64
{
65
wgs72old
,
66
wgs72
,
67
wgs84
68
}
gravconsttype
;
69
70
typedef
struct
elsetrec
71
{
72
long
int
satnum
;
73
int
epochyr
,
epochtynumrev
;
74
int
error
;
75
char
operationmode
;
76
char
init
,
method
;
77
78
/* Near Earth */
79
int
isimp
;
80
double
aycof
,
con41
,
cc1
,
cc4
,
cc5
,
d2
,
d3
,
d4
,
81
delmo
,
eta
,
argpdot
,
omgcof
,
sinmao
,
t
,
t2cof
,
t3cof
,
82
t4cof
,
t5cof
,
x1mth2
,
x7thm1
,
mdot
,
nodedot
,
xlcof
,
xmcof
,
83
nodecf
;
84
85
/* Deep Space */
86
int
irez
;
87
double
d2201
,
d2211
,
d3210
,
d3222
,
d4410
,
d4422
,
d5220
,
d5232
,
88
d5421
,
d5433
,
dedt
,
del1
,
del2
,
del3
,
didt
,
dmdt
,
89
dnodt
,
domdt
,
e3
,
ee2
,
peo
,
pgho
,
pho
,
pinco
,
90
plo
,
se2
,
se3
,
sgh2
,
sgh3
,
sgh4
,
sh2
,
sh3
,
91
si2
,
si3
,
sl2
,
sl3
,
sl4
,
gsto
,
xfact
,
xgh2
,
92
xgh3
,
xgh4
,
xh2
,
xh3
,
xi2
,
xi3
,
xl2
,
xl3
,
93
xl4
,
xlamo
,
zmol
,
zmos
,
atime
,
xli
,
xni
;
94
95
double
a
,
altp
,
alta
,
epochdays
,
jdsatepoch
,
jdsatepochF
,
nddot
,
ndot
,
96
bstar
,
rcse
,
inclo
,
nodeo
,
ecco
,
argpo
,
mo
,
no_kozai
;
98
char
classification
,
intldesg
[11];
99
int
ephtype
;
100
long
elnum
,
revnum
;
102
double
no_unkozai
;
104
double
am
,
em
,
im
,
Om
,
om
,
mm
,
nm
;
106
double
tumin
,
mu
,
radiusearthkm
,
xke
,
j2
,
j3
,
j4
,
j3oj2
;
107
109
long
dia_mm
;
110
double
period_sec
;
111
unsigned
char
active
;
112
unsigned
char
not_orbital
;
113
double
rcs_m2
;
114
115
}
elsetrec
;
116
117
118
namespace
SGP4Funcs
119
{
120
121
// public class SGP4Class
122
// {
123
124
DT_DLL_vrfutil
bool
sgp4init
125
(
126
gravconsttype
whichconst,
char
opsmode,
const
int
satn,
const
double
epoch,
127
const
double
xbstar,
const
double
xndot,
const
double
xnddot,
const
double
xecco,
const
double
xargpo,
128
const
double
xinclo,
const
double
xmo,
const
double
xno,
129
const
double
xnodeo,
elsetrec
& satrec
130
);
131
132
DT_DLL_vrfutil
bool
sgp4
133
(
135
elsetrec
& satrec,
double
tsince,
136
double
r[3],
double
v[3]
137
);
138
139
DT_DLL_vrfutil
void
getgravconst
140
(
141
gravconsttype
whichconst,
142
double
& tumin,
143
double
& mu,
144
double
& radiusearthkm,
145
double
& xke,
146
double
& j2,
147
double
& j3,
148
double
& j4,
149
double
& j3oj2
150
);
151
153
DT_DLL_vrfutil
void
twoline2rv
154
(
155
char
longstr1[130],
char
longstr2[130],
156
char
typerun,
char
typeinput,
char
opsmode,
157
gravconsttype
whichconst,
158
double
& startmfe,
double
& stopmfe,
double
& deltamin,
159
elsetrec
& satrec
160
);
161
163
DT_DLL_vrfutil
double
gstime
164
(
165
double
jdut1
166
);
167
168
DT_DLL_vrfutil
double
sgn
169
(
170
double
x
171
);
172
173
DT_DLL_vrfutil
double
mag
174
(
175
double
x[3]
176
);
177
178
DT_DLL_vrfutil
void
cross
179
(
180
double
vec1[3],
double
vec2[3],
double
outvec[3]
181
);
182
183
DT_DLL_vrfutil
double
dot
184
(
185
double
x[3],
double
y[3]
186
);
187
188
DT_DLL_vrfutil
double
angle
189
(
190
double
vec1[3],
191
double
vec2[3]
192
);
193
194
DT_DLL_vrfutil
void
newtonnu
195
(
196
double
ecc,
double
nu,
197
double
& e0,
double
& m
198
);
199
200
DT_DLL_vrfutil
double
asinh
201
(
202
double
xval
203
);
204
205
DT_DLL_vrfutil
void
rv2coe
206
(
207
double
r[3],
double
v[3],
const
double
mu,
208
double
& p,
double
& a,
double
& ecc,
double
& incl,
double
& omega,
double
& argp,
209
double
& nu,
double
& m,
double
& arglat,
double
& truelon,
double
& lonper
210
);
211
212
DT_DLL_vrfutil
void
jday
213
(
214
int
year,
int
mon,
int
day,
int
hr,
int
minute,
double
sec,
215
double
& jd,
double
& jdFrac
216
);
217
218
DT_DLL_vrfutil
void
days2mdhms
219
(
220
int
year,
double
days,
221
int
& mon,
int
& day,
int
& hr,
int
& minute,
double
& sec
222
);
223
224
DT_DLL_vrfutil
void
invjday
225
(
226
double
jd,
double
jdFrac,
227
int
& year,
int
& mon,
int
& day,
228
int
& hr,
int
& minute,
double
& sec
229
);
230
231
DT_DLL_vrfutil
void
teme2ecef
(
double
rteme[3],
double
vteme[3],
double
jdut1,
double
recef[3],
double
vecef[3]);
232
233
}
234
235
#endif
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)