🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
MSIS_Vers.h
1
// MSIS_Vers.h
2
/* ----------------------------------------------------------------
3
*
4
* MSIS_Vers.h
5
*
6
* this file contains routines for the msis-86, msis-90, and nrlmsise-00 atmospheric models.
7
*
8
* current :
9
* 30 sep 15 david vallado
10
* fix jd, jdfrac
11
* changes :
12
* 3 nov 14 david vallado
13
* update to msvs2013 c++
14
* 31 mar 08 david vallado
15
* misc updates
16
* 15 mar 07 david vallado
17
* 3rd edition baseline
18
* 6 aug 04 david vallado
19
* convert to c++
20
* 6 sep 03 david vallado
21
* fix low alt test cases (long in lpoly)
22
* 14 feb 03 david vallado
23
* misc updates
24
* 28 feb 02 david vallado
25
* finish double conversion
26
* 8 oct 88 nrl
27
* original baseline
28
* http://uap-www.nrl.navy.mil/models_web/msis/msis_home.htm
29
*
30
* ***************************************************************** */
31
32
#pragma once
33
#ifndef SWIG
34
35
#include <math.h>
36
#include <stdio.h>
37
#include <stdlib.h>
38
#include <memory.h>
39
#include "AstGlobal.h"
40
41
//using namespace System;
42
43
typedef
struct
gts3crecord
44
{
45
double
tlb, s, db04, db16, db28, db32, db40, db48, db01,
46
za, t0, z0, g0, rl, dd, db14, tr12;
47
}
gts3ctype
;
48
49
typedef
struct
datimerecord
50
{
51
char
isdate[10], istime[10], name[10];
52
}
datimetype
;
53
54
typedef
struct
cswrecord
55
{
56
int
sw[26], swc[26];
57
int
isw;
58
}
cswtype
;
59
60
typedef
struct
dmixrecord
61
{
62
double
dm04, dm16, dm28, dm32, dm40, dm01, dm14;
63
}
dmixtype
;
64
65
typedef
struct
parmbrecord
66
{
67
double
gsurf, re;
68
}
parmbtype
;
69
70
typedef
struct
metselrecord
71
{
72
int
imr;
73
}
metseltype
;
74
75
typedef
struct
lsqvrecord
76
{
77
double
qpb[51], dv[61];
78
int
mp, ii, jg, lt, ierr, ifun, n, j;
79
}
lsqvtype
;
80
81
typedef
struct
fitrecord
82
{
83
double
taf;
84
}
fittype
;
85
86
typedef
struct
lpolyrecord
87
{
88
double
plg[10][5], ctloc, stloc, c2tloc, s2tloc, c3tloc, s3tloc,
89
day, df, dfa, apd, apdf, apt[5], xlong,
90
clong, slong;
91
int
iyr;
92
}
lpolytype
;
93
94
typedef
struct
mesorecord
95
{
96
double
tn1[6], tn2[5], tn3[6], tgn1[3], tgn2[3], tgn3[3];
97
}
mesotype
;
98
99
typedef
struct
lowerrecord
100
{
101
double
ptm[11], pdm[11][9];
102
}
lowertype
;
103
104
typedef
struct
parmrecord
105
{
106
double
pt[151], pd[151][10], ps[151], pdl[26][3], ptl[101][5],
107
pma[101][11], sam[101],
108
// these added for function calls when a subarray needed.
109
// there is probably an easier way to do this!!!
110
pddav[10][151], ptldav[5][101], pmadav[11][101];
111
}
parmtype
;
112
113
// cdav i deleted this because it was just a string manipulation for titles
114
// typedef struct datim7record
115
// {
116
// int isd[3], ist[3], nam[3];
117
// } datim7type;
118
119
typedef
struct
mavgrecord
120
{
121
double
pavgm[11];
122
}
mavgtype
;
123
124
typedef
struct
msisrecord
125
{
126
gts3ctype
gts3c;
127
mesotype
meso;
128
lowertype
lower;
129
parmtype
parm;
130
datimetype
datime;
131
cswtype
csw;
132
mavgtype
mavg;
133
dmixtype
dmix;
134
parmbtype
parmb;
135
metseltype
metsel;
136
}
msistype
;
137
138
//
139
// this common does not get used in the fortran code.
140
// gb and rout are nebver used at all.
141
// tinfg is assigned in globe7, but the value is passed back through the
142
// function value.
143
// tt is set in glob7s, but again, it is passed back through the function value.
144
// typedef struct ttestrecord
145
// {
146
// double tinfg, gb, rout, t[16];
147
// } ttesttype;
148
//
149
150
151
namespace
MSIS_Vers {
152
153
// public ref class MSISClass
154
// {
155
156
// ---------------- MSIS-com ----------------
157
// ------- common to all MSIS models --------
158
AST_WEATHER_API
159
void
tselec
160
(
161
cswtype
&,
int
[]
162
);
163
164
double
dnet
165
(
166
double
,
double
,
double
,
double
,
double
167
);
168
169
double
ccor
170
(
171
double
,
double
,
double
,
double
172
);
173
174
double
ccor2
175
(
176
double
,
double
,
double
,
double
,
double
177
);
178
179
void
meters
180
(
181
metseltype
&
182
);
183
184
// ------- common to MSIS-86 and MSIS-00 models --------
185
186
double
g0
187
(
double
a,
double
p[151]);
188
189
double
sumex
190
(
double
ex);
191
192
double
sg0
193
(
double
ex,
double
p[151],
double
ap[8]);
194
195
// ------- common to MSIS-90 and MSIS-00 models --------
196
197
double
zeta
198
(
199
double
zz,
double
zl,
double
re
200
);
201
202
double
densu
203
(
204
parmbtype
&,
lsqvtype
&,
205
double
,
double
,
double
,
double
,
double
,
double
,
double
&,
double
,
206
double
,
int
,
double
[],
double
[],
double
[]
207
);
208
209
double
densm
210
(
211
parmbtype
&,
fittype
&,
lsqvtype
&,
212
double
,
double
,
double
,
double
&,
int
,
double
[],
double
[],
double
[],
int
,
213
double
[],
double
[],
double
[]
214
);
215
216
void
spline
217
(
218
double
[],
double
[],
int
,
double
,
double
,
double
[]
219
);
220
221
void
splint
222
(
223
double
[],
double
[],
double
[],
int
,
double
,
double
&
224
);
225
226
void
splini
227
(
228
double
[],
double
[],
double
[],
int
,
double
,
double
&
229
);
230
231
void
glatf
232
(
233
double
,
double
&,
double
&
234
);
235
236
double
vtst
237
(
238
cswtype
&,
239
int
,
double
,
double
,
double
,
double
,
double
,
double
,
240
double
ap[],
int
241
);
242
243
// ---------------- MSIS-86 model ----------------
244
AST_WEATHER_API
245
void
gts5
246
(
247
msistype
& msis86r,
248
lpolytype
& lpoly,
249
lsqvtype
& lsqv,
250
int
iyd,
double
sec,
double
alt,
double
glat,
double
glong,
double
stl,
double
f107a,
251
double
f107,
double
ap[8],
int
mass,
double
d[10],
double
t[3]
252
);
253
254
AST_WEATHER_API
255
void
msis86init
256
(
257
msistype
& msis86r
258
);
259
260
// ---------------- MSIS-90 model ----------------
261
AST_WEATHER_API
262
void
gtd6
263
(
264
msistype
& msis90r,
265
lpolytype
& lpoly,
266
fittype
& fit,
267
lsqvtype
& lsqv,
268
int
iyd,
double
sec,
double
alt,
double
glat,
double
glong,
double
stl,
269
double
f107a,
double
f107,
double
ap[8],
int
mass,
270
double
d[10],
double
t[3]
271
);
272
273
AST_WEATHER_API
274
void
gts6
275
(
276
msistype
& msis90r,
277
lpolytype
& lpoly,
278
lsqvtype
& lsqv,
279
int
iyd,
double
sec,
double
alt,
double
glat,
double
glong,
double
stl,
double
f107a,
280
double
f107,
double
ap[8],
int
mass,
double
d[10],
double
t[3]
281
);
282
283
AST_WEATHER_API
284
void
msis90init
285
(
286
msistype
& msis90r
287
);
288
289
// -------------- NRLMSISE-00 model --------------
290
AST_WEATHER_API
291
void
gtd7
292
(
293
msistype
& msis00r,
294
lpolytype
& lpoly,
295
fittype
& fit,
296
lsqvtype
& lsqv,
297
int
iyd,
double
sec,
double
alt,
double
glat,
double
glong,
double
stl,
298
double
f107a,
double
f107,
double
ap[8],
int
mass,
299
double
d[10],
double
t[3]
300
);
301
302
AST_WEATHER_API
303
void
gtd7d
304
(
305
msistype
& msis00r,
306
lpolytype
& lpoly,
307
fittype
& fit,
308
lsqvtype
& lsqv,
309
int
iyd,
double
sec,
double
alt,
double
glat,
double
glong,
310
double
stl,
double
f107a,
double
f107,
double
ap[8],
int
mass,
311
double
d[10],
double
t[3]
312
);
313
314
AST_WEATHER_API
315
void
msis00init
316
(
317
msistype
& msis00r
318
);
319
320
// }; // MSISClass
321
322
}
// namespace MSISFuncs
323
324
325
#endif
cswrecord
定义
MSIS_Vers.h:55
datimerecord
定义
MSIS_Vers.h:50
dmixrecord
定义
MSIS_Vers.h:61
fitrecord
定义
MSIS_Vers.h:82
gts3crecord
定义
MSIS_Vers.h:44
lowerrecord
定义
MSIS_Vers.h:100
lpolyrecord
定义
MSIS_Vers.h:87
lsqvrecord
定义
MSIS_Vers.h:76
mavgrecord
定义
MSIS_Vers.h:120
mesorecord
定义
MSIS_Vers.h:95
metselrecord
定义
MSIS_Vers.h:71
msisrecord
定义
MSIS_Vers.h:125
parmbrecord
定义
MSIS_Vers.h:66
parmrecord
定义
MSIS_Vers.h:105
src
AstWeather
Atmosphere
MSIS_Vers
MSIS_Vers.h
制作者
1.12.0