-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester_script_output.txt
293 lines (168 loc) · 9.4 KB
/
tester_script_output.txt
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
THIS IS THE OUTPUT OF ALL THE ROUTES IN THE 'iss_tracker.py' API
Using epoch variable: 1
*************************************************************************************
Testing Route: '/epochs/1'
{"EPOCH":"2023-067T12:00:00.000Z","X":{"#text":"943.80264099999999","@units":"km"},"X_DOT":{"#text":"4.9425251039999996","@units":"km/s"},"Y":{"#text":"-6604.9778539999998","@units":"km"},"Y_DOT":{"#text":"-0.45499505499999998","@units":"km/s"},"Z":{"#text":"1300.4429279999999","@units":"km"},"Z_DOT":{"#text":"-5.8346658140000001","@units":"km/s"}}
*************************************************************************************
Testing Route: '/epochs/1/speed'
{"speed (km/s)":7.660215405901125}
*************************************************************************************
Testing Route: '/epochs/1/position'
{"X":"943.80264099999999","Y":"-6604.9778539999998","Z":"1300.4429279999999"}
*************************************************************************************
Testing Route: '/epochs/1/velocity'}
["4.9425251039999996","-0.45499505499999998","-5.8346658140000001"]
*************************************************************************************
Testing Route: '/help'
HERE IS A HELP MESSAGE FOR EVERY FUNCTION/ROUTE IN "iss_tracker.py"
get_data:
Retrieves the data from the nasa published ISS location coordinates, converts from XML to a dictionary, and returns the
Valuable data concering the ISS position and velocity at different times.
Route: None, only used to retreive data for other routes
Args:
None
Returns:
data (dict): the ISS stateVectors at different epochs
get_all:
Returns all epochs for the entire data set of the ISS state vectors. Decorated with the app route "<baseURL>/"
Route: <baseURL>/
Args:
None
Returns:
dataSet (dict): Dictionary of all epochs and corresponding state Vectors of the ISS
get_epochs:
Returns all the epochs in the data set, without the state Vectors.
Route: <baseURL>/epochs
Optional Route: '<baseURL>/epochs?limit=<some_Int>&offset=<some_Int>'
Args:
None
Returns:
epochs (list): A list of all the epochs (time stamps) in the data set.
This function has query parameters 'limit' and 'offset' that affect the output by
changing the number of returned epochs and the starting point of the first returned epoch
get_entry:
Given an epoch, returns the state vectors associated with that specific epoch.
Decorated with the app route "<baseURL>/epochs/<epoch>"
Route: <baseURL>/epochs/<int:epoch>
Args:
epoch (string): returns a string representing the epoch entry index number as an int.
- Note: epoch is given as a string but is converted to and used as a integer to index a list.
Returns:
data[int(epoch)] (dict): returns the given index "epoch" of the data list from the full data set
speed_calc:
Given an epoch, returns the speed of the ISS at that specific epoch.
Speed is calculated from the X, Y, and Z velocities given in the data set.
Route: <baseURL>/epochs/<int:epoch>/speed
Args:
epoch (string): returns a string representing the epoch entry index number as an int.
- Note: epoch is given as a string but is converted to and used as a integer to index a list.
Returns:
{"speed (km/s)" : speed} (dict): returns the speed of a given index "epoch"
get_position:
Given an epoch, returns the position of the ISS at that specific epoch.
Position is given as the the X, Y, and Z positional coordinates.
Route: <baseURL>/epochs/<int:epoch>/position
Args:
epoch (string): returns a string representing the epoch entry index number as an int.
- Note: epoch is given as a string but is converted to and used as a integer to index a list.
Returns:
position (dict): returns the X, Y, and Z positional coordinates of a given index "epoch"
get_velocity:
Given an epoch, returns the velocity of the ISS at that specific epoch.
Velocity is given as the X, Y, and Z velocities.
Route: <baseURL>/epochs/<int:epoch>/velocity
Args:
epoch (string): returns a string representing the epoch entry index number as an int.
- Note: epoch is given as a string but is converted to and used as a integer to index a list.
Returns:
velo (list): returns the X, Y, and Z velocity of a given index "epoch"
get_help:
Returns a message of all the available routes and methods and how to use them
Route: <baseURL>/help
Args:
NONE
Returns:
help_message (string) : brief descriptions of all available routes and methods
delete_data:
Deletes all data from the data set
Route: <baseURL>/delete-data
example: 'curl -X DELETE localhost:5000/delete-data'
Args:
NONE
Returns:
(str) 'Data is deleted'
post_data:
Restores the data to the ISS dictionary
Route: <baseURL>/post-data
example 'curl -X POST localhost:5000/post-data'
Args:
NONE
Returns:
(str) 'Data is posted'
get_comment:
Returns the ‘comment’ list object from the ISS data
Route: <baseURL>/comment
Args:
NONE
Returns:
(list) comments: All the comments in the data set
get_header:
Returns the ‘header’ dictionary object from the ISS data
Route: <baseURL>/header
Args:
NONE
Returns:
header (list): the ‘header’ dictionary object from the ISS data
get_metadata:
Returns the 'metadata' dictionary object from the ISS data
Route: <baseURL>/metadata
Args:
NONE
Returns:
metadata (list): the 'metadata' dictionary object from the ISS data
get_location:
Returns latitude, longitude, altitude, and geoposition for a given epoch.
Route: <baseURL>/epochs/<epoch>/location
Args:
epoch (string): returns a string representing the epoch entry index number as an int.
- Note: epoch is given as a string but is converted to and used as a integer to index a list.
Returns:
outputDict (dict): A dictionary of the latitude, longitude, altitude, and geoposition of the given epoch.
recent_data:
Return latitude, longitude, altitude, and geoposition for Epoch that is nearest in time
Route: '<baseURL>/now'
Args:
NONE
Returns:
outputDict (dict): a dictionary containing the latitude, longitude, altitude, and geoposition
for the most recent Epoch.
outputDict Format:
{
"closest epoch": ------,
"seconds from now": -----,
"location": -----,
"speed (km/s)": -----,
"velocity (km/s) (X, Y, Z)": ------
}
*************************************************************************************
Testing Route: '/delete-data'
Data is deleted
Now Testing a function, assuming delete-data function worked this should output no data
Testing Route: '/epochs/1/velocity'}
OUTPUT: (should be 'Data Set is empty' )
Data Set is empty
*************************************************************************************
Testing Route: '/post-data'
Data has been posted
*************************************************************************************
Testing Route: '/comment'
["Units are in kg and m^2","MASS=473291.00","DRAG_AREA=1421.50","DRAG_COEFF=2.80","SOLAR_RAD_AREA=0.00","SOLAR_RAD_COEFF=0.00","Orbits start at the ascending node epoch","ISS first asc. node: EPOCH = 2023-03-08T12:50:10.295 $ ORBIT = 2617 $ LAN(DEG) = 108.61247","ISS last asc. node : EPOCH = 2023-03-23T11:58:44.947 $ ORBIT = 2849 $ LAN(DEG) = 32.65474","Begin sequence of events","TRAJECTORY EVENT SUMMARY:",null,"| EVENT | TIG | ORB | DV | HA | HP |","| | GMT | | M/S | KM | KM |","| | | | (F/S) | (NM) | (NM) |","=============================================================================","GMT067 Reboost 067:19:47:00.000 0.6 428.1 408.4","(2.0) (231.1) (220.5)",null,"Crew05 Undock 068:22:00:00.000 0.0 428.7 409.6","(0.0) (231.5) (221.2)",null,"SpX27 Launch 074:00:30:00.000 0.0 428.3 408.7","(0.0) (231.2) (220.7)",null,"SpX27 Docking 075:12:00:00.000 0.0 428.2 408.6","(0.0) (231.2) (220.6)",null,"=============================================================================","End sequence of events"]
*************************************************************************************
Testing Route: '/header'
{"CREATION_DATE":"2023-067T21:02:49.080Z","ORIGINATOR":"JSC"}
*************************************************************************************
Testing Route: '/metadata'
{"CENTER_NAME":"EARTH","OBJECT_ID":"1998-067-A","OBJECT_NAME":"ISS","REF_FRAME":"EME2000","START_TIME":"2023-067T12:00:00.000Z","STOP_TIME":"2023-082T12:00:00.000Z","TIME_SYSTEM":"UTC"}
*************************************************************************************
Testing Route: '/epochs/1/location'
{"Altitude":426.6207371384162,"Geoposition":"Over the Ocean","Latitude":11.029159199242079,"Longitude":-57.867905190541975}