-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_dict.py
254 lines (245 loc) · 10.1 KB
/
config_dict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A dict for all the cfg xml transition names
STELA is sortsenstive, how the xml items are sorted play a role
"""
class ConfigDict:
def get_sort_space_object(self):
"""
Returns the sorting way of space object
"""
return {
"Mass": 1,
"Drag Area": 2,
"Reflecting Area": 3,
"Reflectivity Coefficient": 4,
"Orbit Type": 5,
"Drag Coefficent Type": 6,
"Drag Coefficent Type VARIABLE": 6,
"Drag Coefficent Type CONSTANT": 7,
"Constant Drag Coef": 8,
"Name": 9}
def get_sort_general(self):
"""
Returns the sorting way for the general params
"""
return {
"Author": 1,
"Comment": 2,
"Simulation Duration": 3,
"Simulation duration": 3,
"Ephemeris Step": 4,
"Ephemeris step": 4,
"Difference Between Terrestrial And Universal Time": 5,
"Difference between terrestrial and universal time": 5,
"Solar radiation pressure switch": 6,
"Solar Radiation Pressure Switch": 6,
"Sun Switch": 7,
"Sun switch": 7,
"Moon Switch": 8,
"Moon switch": 8,
"Warning Flag": 9,
"Iterative Mode": 10,
"Model": 11,
"Model": 11,
"Atmospheric Model": 12,
"Atmospheric model": 12,
"Solar Activity Type": 13,
"Integration Step": 14,
"Integration step": 14,
"Atmospheric drag switch": 15,
"Atmospheric Drag Switch": 15,
"Drag Quadrature Points": 16,
"Drag quadrature Points": 16,
"Atmospheric Drag Recompute Step": 17,
"Atmospheric drag Recompute Step": 17,
"Solar radiation pressure quadrature Points": 18,
"Solar Radiation Pressure Quadrature Points": 18,
"Reentry Altitude": 19,
"Reentry altitude": 19,
"Iteration Data": 20,
"Iteration data": 20,
"Tesseral Min Period": 21,
"Zonal Order": 22,
"Zonal order": 22}
def get_sort_iteration_data(self):
"""
Returns the Sorted list of Iteration data
"""
return {
"Function Value Accuracy": 1,
"Expiring Duration": 2,
"Simulation Minus Expiring Duration": 3,
"Iteration Method": 4}
def get_sort_solar_act(self):
"""
Returns the sorting list for the solar activity
"""
return {
"Solar Activity Type": 1,
"AP Constant Equivalent Solar Activity": 2,
"F10.7 Constant Equivalent Solar Activity": 3}
def get_unit_dict(self):
"""
Returns the Dictionary needed for the Units
"""
unit_dict = {
"Mass": "kg",
"Simulation duration": "years",
"Simulation Duration": "years",
"Ephemeris step": "s",
"Ephemeris Step": "s",
"Difference between terrestrial and universal time": "s",
"Difference Between Terrestrial And Universal Time": "s",
"a (Semi major axis)": "m",
"A (Semi Major Axis)": "m",
"lambdaEq": "rad",
"Integration Step": "s",
"Reentry Altitude": "m",
"Function Value Accuracy": "days",
"Expiring Duration": "years",
"Simulation Minus Expiring Duration": "years",
"Zp (Perigee altitude)": "m",
"Za (Apogee altitude)": "m",
"Zp (Perigee Altitude)": "m",
"Za (Apogee Altitude)": "m",
"Inclination": "rad",
"I (Inclination)": "rad",
"RAAN (Right Ascension of Ascending Node)": "rad",
"M (Mean anomaly)": "rad",
"w (Argument of perigee)": "rad",
"RAAN (Right Ascension Of Ascending Node)": "rad",
"M (Mean Anomaly)": "rad",
"W (Argument Of Perigee)": "rad"}
return unit_dict
def get_dict(self):
"""
Returns the Dictionary needed for the
XML
"""
config_dict = {
"Stela Version": "STELAVersion",
"Model": "modelType",
"Author": "author",
"Comment": "comment",
"Simulation duration": "simulationDuration",
"Simulation Duration": "simulationDuration",
"Ephemeris step": "ephemerisStep",
"Ephemeris Step": "ephemerisStep",
"Difference between terrestrial and universal time": "ttMinusUT1",
"Difference Between Terrestrial And Universal Time": "ttMinusUT1",
"Integration Step": "integrationStep",
"Atmospheric drag switch": "dragSwitch",
"Atmospheric Drag Switch": "dragSwitch",
"Drag quadrature Points": "dragQuadPoints",
"Drag Quadrature Points": "dragQuadPoints",
"Atmospheric Drag Recompute step": "atmosDragRecomputeStep",
"Atmospheric Drag Recompute Step": "atmosDragRecomputeStep",
"Solar radiation pressure switch": "srpSwitch",
"Solar Radiation Pressure Switch": "srpSwitch",
"Solar radiation pressure quadrature Points": "srpQuadPoints",
"Solar Radiation Pressure Quadrature Points": "srpQuadPoints",
"Iterative Mode": "IterativeMode",
"Sun switch": "sunSwitch",
"Sun Switch": "sunSwitch",
"Moon switch": "moonSwitch",
"Moon Switch": "moonSwitch",
"Zonal order": "zonalOrder",
"Zonal Order": "zonalOrder",
"Earth Tesseral switch": "tesseralSwitch",
"Earth Tesseral Switch": "tesseralSwitch",
"Tesseral order": "Tesseralorder",
"Tesseral min period": "nbIntegrationStepTesseral",
"Tesseral Min Period": "nbIntegrationStepTesseral",
"Reentry Altitude": "reentryAltitude",
"Mass": "mass",
"Warning Flag": "warningFlag",
"Drag Area": "dragArea",
"Reflecting Area": "reflectingArea",
"Reflectivity Coefficient": "reflectivityCoefficient",
"Orbit Type": "orbitType",
"Drag Coefficent Type CONSTANT": "ConstantDragCoef",
"Drag Coefficent Type VARIABLE": "VariableDragCoef",
"Drag Coefficent Type COOK": "CookDragCoef",
"Constant Drag Coef": "cstDragCoef",
"Space Object": "SpaceObject",
"SpaceObject": "SpaceObject",
"General": "simGeneral",
"iterationData": "iterationData",
"LEOSimulation": "simGeneral",
"Name": "name",
"Initial": "initState",
"Bulletin": "bulletin",
"Edge Length": "EdgeLength",
"Date": "date",
"Type Perigee/Apogee": "Type0PosVel",
"Type Cartesian": "Type1PosVel",
"Type Keplerian": "Type2PosVel",
"Type Equinoctial": "Type8PosVel",
"Frame": "frame",
"Nature": "nature",
"Zp (Perigee altitude)": "perigeeAltitude",
"Za (Apogee altitude)": "apogeeAltitude",
"I (Inclination)": "inclination",
"RAAN (Right Ascension of Ascending Node)": "rAAN",
"Raan (Right Ascension Of Ascending Node)": "rAAN",
"W (Argument Of Perigee)": "argOfPerigee",
"w (Argument of perigee)": "argOfPerigee",
"M (Mean Anomaly)": "meanAnomaly",
"M (Mean anomaly)": "meanAnomaly",
"A (Semi Major Axis)": "semiMajorAxis",
"a (Semi major axis)": "semiMajorAxis",
"E (Eccentricity)": "eccentricity",
"e (Eccentricity)": "eccentricity",
"lambdaEq": "lambdaEq",
"Atmospheric model": "atmosModel",
"Atmospheric Model": "atmosModel",
"longitudeTFE": "longitudeTFE",
"epochTFE": "epochTFE",
"eX": "eX",
"eY": "eY",
"iX": "iX",
"iY": "iY",
"x": "x",
"y": "y",
"z": "z",
"vX": "vX",
"vY": "vY",
"vZ": "vZ",
"Solar Activity Type MEAN_CONSTANT": "ConstantEquivalentSolarActivity",
"Solar Activity Type VARIABLE": "VariableSolarActivity",
"Solar Activity Type CONSTANT": "ConstantSolarActivity",
"Solar Activity Type": "solActType",
"AP Constant Equivalent Solar Activity": "constantAP",
"F10.7 Constant Equivalent Solar Activity": "constantF107",
"Function Value Accuracy": "funcValueAccuracy",
"Iteration Data": "iterationData",
"Simulation Minus Expiring Duration": "simMinusExpDuration",
"Iteration Method": "iterationMethod",
"Expiring Duration": "expDuration",
"Iterative Mode": "iterativeMode"}
return config_dict
def get_conf_sim(self, type_of_sim):
"""
Gives an array of paramaters that are possible for everry Simulation
Type Input: Type0PosVel, Type1PosVel, Type8PosVel and Type2PosVel
"""
result = []
if(type_of_sim == "Type0PosVel"):
result = ["Frame", "Nature", "Zp (Perigee altitude)",
"Za (Apogee altitude)", "I (Inclination)",
"RAAN (Right Ascension of Ascending Node)",
"w (Argument of perigee)", "M (Mean anomaly)"]
if(type_of_sim == "Type8PosVel"):
result = [
"Frame", "Nature", "a (Semi major axis)", "lambdaEq", "eX",
"eY", "iX", "iY"]
if(type_of_sim == "Type2PosVel"):
result = ["Frame", "Nature", "a (Semi major axis)",
"e (Eccentricity)", "I (Inclination)",
"RAAN (Right Ascension of Ascending Node)",
"w (Argument of perigee)", "M (Mean anomaly)"]
if(type_of_sim == "Type1PosVel"):
result = ["Frame", "Nature", "x", "y", "z", "vX", "vY", "vZ"]
return result