-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
1334 lines (1199 loc) · 42.9 KB
/
config.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
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Read/Set/Get/Convert configurations here.
Most of the setting is done here. Xml files are also created here.
Simulation files also get a database replication. it is easier then
to manage the results.
The results are managed by another module
mainly the simulator.
"""
import sys
import itertools
from time import gmtime, strftime
from logger import Logger
from config_dict import ConfigDict
import xml.etree.ElementTree as ET
from xml_pretty import prettify
from unit_converter import UnitConverter
from database import DB
from config_step import ConfigStep
class Config:
def __init__(self, db, log_level="ERROR"):
logger = Logger(log_level)
self.log = logger.get_logger()
self.conf = {}
self.db = db
self.db_id = 0
self.unit_lib = UnitConverter()
self.config_dict = ConfigDict()
def set_value(self, value, keyword):
"""
Set the value of different config options with the help
of the defined functions.
"""
if(keyword in ["Edge Length", "Edge length"]):
self.set_edge_length(value)
if(keyword in ["Model", "model"]):
self.set_model(value)
if(keyword in ["Mass", "mass"]):
self.set_mass(value)
if(keyword in ["Simulation duration", "Simulation Duration"]):
self.set_sim_dur(value)
if(keyword in ["Ephemeris step", "Ephemeris step"]):
self.set_ephemeris_step(value)
if(keyword in ["Difference between terrestrial and universal time",
"Difference between terrestrial and universal time"]):
self.set_diff_terrestrial_universal_time(value)
if(keyword in ["a (Semi major axis)", "A (Semi Major Axis)"]):
self.set_semi_major_axis(value)
if(keyword in ["lambdaEq"]):
self.set_lambdaEq(value)
if(keyword in ["Stela Version"]):
self.set_stela_version(value)
if(keyword in ["Author"]):
self.set_author(self)
if(keyword in ["Comment"]):
self.set_comment(value)
if(keyword in ["Integration Step", "Integration step"]):
self.set_int_step(value)
if(keyword in ["Atmospheric drag switch", "Atmospheric Drag Switch"]):
self.set_atmos_drag_switch(value)
if(keyword in ["Drag quadrature Points", "Drag Quadrature Points"]):
self.set_quad_points(value)
if(keyword in ["Atmospheric Drag Recompute step",
"Atmospheric Drag Recompute Step"]):
self.set_atmos_drag_recom_step(value)
if(keyword in ["Solar radiation pressure switch",
"Solar Radiation Pressure Switch"]):
self.set_solar_rad_pres_switch(value)
if(keyword in ["Solar radiation pressure quadrature Points",
"Solar Radiation Pressure Quadrature Points"]):
self.set_solar_rad_pres_quad_points(value)
if(keyword in ["Iterative Mode"]):
self.set_iter_method(value)
if(keyword in ["Sun switch", "Sun Switch"]):
self.set_sun_switch(value)
if(keyword in ["Moon switch", "Moon Switch"]):
self.set_moon_switch(value)
if(keyword in ["Zonal order", "Zonal Order"]):
self.set_zonal_order(value)
if(keyword in ["Earth Tesseral switch", "Earth Tesseral Switch"]):
self.set_earth_tesseral_switch(value)
if(keyword in ["Tesseral min period", "Tesseral Min Period"]):
self.set_tesseral_min_period(value)
if(keyword in ["Reentry Altitude", "Reentry altitude"]):
self.set_reentry_alt(value)
if(keyword in ["Drag Area", "Drag area"]):
self.set_drag_area(value)
if(keyword in ["Reflecting Area", "Reflecting area"]):
self.set_reflect_area(value)
if(keyword in ["Reflectivity Coefficient",
"Reflectivity coefficient"]):
self.set_reflect_coef(value)
if(keyword in ["Orbit Type", "Orbit type"]):
self.set_orbit_type(value)
if(keyword in ["Name"]):
self.set_space_object_name(value)
if(keyword in ["Date", "Initial Date"]):
self.set_initial_date(value)
if(keyword in ["Zp (Perigee altitude)",
"Zp (Perigee Altitude)", "Zp (Perigee)"]):
self.set_perigee_alt(value)
if(keyword in ["Za (Apogee altitude)", "Za (Apogee Altitude)",
"Za (Apogee)"]):
self.set_perigee_alt(value)
if(keyword in ["I (Inclination)"]):
self.set_incl(value)
if(keyword in ["RAAN (Right Ascension of Ascending Node)",
"RAAN (Right ascension of ascending Node)"]):
self.set_raan(value)
if(keyword in ["W (Argument Of Perigee)", "w (Argument Of Perigee)"]):
self.set_arg_perigee(value)
if(keyword in ["M (Mean Anomaly)", "M (Mean anomaly)"]):
self.set_mean_anomaly(value)
if(keyword in ["E (Eccentricity)", "e (Eccentricity)"]):
self.set_eccentricity(value)
if(keyword in ["Atmospheric model", "Atmospheric Model"]):
self.set_atoms_model(value)
if(keyword in ["longitudeTFE"]):
self.set_longitudeTFE(value)
if(keyword in ["epochTFE"]):
self.set_epochTFE(value)
if(keyword in ["eX"]):
self.set_eX(value)
if(keyword in ["eY"]):
self.set_eY(value)
if(keyword in ["iX"]):
self.set_iX(value)
if(keyword in ["iY"]):
self.set_iY(value)
if(keyword in ["x"]):
self.set_x(value)
if(keyword in ["y"]):
self.set_y(value)
if(keyword in ["z"]):
self.set_z(value)
if(keyword in ["vX"]):
self.set_vX(value)
if(keyword in ["vY"]):
self.set_vY(value)
if(keyword in ["vZ"]):
self.set_vZ(value)
if(keyword in ["Solar Activity Type"]):
self.set_solar_activity_type(value)
if(keyword in ["AP Constant Equivalent Solar Activity"]):
self.set_ap_constant_solar_act(value)
if(keyword in ["F10.7 Constant Equivalent Solar Activity"]):
self.set_f107(value)
if(keyword in ["Function Value Accuracy"]):
self.set_func_value_accu(value)
if(keyword in ["Simulation Minus Expiring Duration"]):
self.set_sim_minus_exp(value)
if(keyword in ["Iteration Method"]):
self.set_iter_method(value)
if(keyword in ["Expiring Duration"]):
self.set_exp_dur(value)
if(keyword in ["Iterative Mode"]):
self.set_iter_mode(value)
def set_abstract_item(self, section, option, value):
"""
Adds items to the config array
"""
if section in self.conf.keys():
self.conf[section][option] = value
else:
self.conf[section] = {}
self.conf[section][option] = value
def get_abstract_item(self, section, option):
"""
Gives the item value back.
"""
try:
return self.conf[section][option]
except KeyError as e:
self.log.warning("Key or value not found please try again ")
return None
def get_conf(self):
"""
Gives the conf dict back
"""
return self.conf
def set_conf(self, conf):
"""
Sets the conf file from the conf dict
"""
self.conf = conf
def get_config_general(self):
"""
Gives the General configuration back
"""
try:
return self.config["General"]
except KeyError as e:
self.log.error("Key General not existant.")
return None
def set_longitudeTFE(self, longi):
"""
Sets the longitudeTFE in km
"""
self.set_abstract_item("Initial Bulletin", "longitudeTFE", longi)
def get_longitudeTFE(self):
"""
Gets the longitudeTFE
"""
self.get_abstract_item("Initial Bulletin", "longitudeTFE")
def set_epochTFE(self, epoch):
"""
Sets the Epoch, which is same as date here
"""
self.set_abstract_item("Initial Bulletin", "epochTFE", epoch)
def get_epochTFE(self):
"""
Gets the Epoch
"""
self.set_abstract_item("Initial Bulletin", "epochTFE")
def get_tesseral_min_period(self):
"""
Gets the Tesseral Min Period
"""
return self.get_abstract_item("General", "Tesseral min period")
def set_tesseral_min_period(self, period):
"""
Sets the Tesseral Min Period
"""
self.set_abstract_item("General", "Tesseral min period")
def set_model(self, model):
"""
Set Model in General
"""
self.set_abstract_item("General", "Model", model)
def get_model(self):
"""
Gives Model back
"""
return self.get_abstract_item("General", "Model")
def get_author(self):
"""
Gives the Author back
"""
return self.get_abstract_item("General", "Author")
def set_author(self, author):
"""
Set the autor of config
"""
self.set_abstract_item("General", "Author", author)
def get_comment(self):
"""
Get the comment field
"""
return self.get_abstract_item("General", "Comment")
def set_comment(self, comment):
"""
Set the comment
"""
self.set_abstract_item("General", "Comment", comment)
def get_sim_dur(self):
"""
Get the Simulation duration in years.
"""
return self.get_abstract_item("General", "Simulation duration")
def set_sim_dur(self, dur):
"""
Set the Simulation durition in years.
"""
self.set_abstract_item("General", "Simulation duration", dur)
def get_ephemeris_step(self):
"""
Get ephemeris Step in seconds.
"""
return self.get_abstract_item("General", "Ephemeris step")
def set_ephemeris_step(self, step=86400):
"""
Sets ephemeris Step in seconds.
Default value is 86400, which is a day.
"""
self.set_abstract_item("General", "Ephemeris step", step)
def get_diff_terrestrial_universal_time(self):
"""
Get the difference Difference between
terrestrial and universal time in seconds
"""
return self.get_abstract_item(
"General",
"Difference between terrestrial and universal time")
def set_diff_terrestrial_universal_time(self, time):
"""
Set the difference Difference between
terrestrial and universal time in seconds
"""
self.set_abstract_item(
"General",
"Difference between terrestrial and universal time",
time)
def get_int_step(self):
"""
Get the integration step of the simulation config in seconds
"""
return self.get_abstract_item("General", "Integration Step")
def set_int_step(self, step=86400):
"""
Set the integration step of the simulation, per default 86400s, a day
"""
self.set_abstract_item("General", "Integration Setp")
def get_atmos_drag_switch(self):
"""
Get the atmospheric drag switch, Boolean.
"""
return self.get_abstract_item("General", "Atmospheric drag switch")
def set_atmos_drag_switch(self, switch=True):
"""
Set the atmospheric drag, default True
"""
self.set_abstract_item("General", "Atmospheric drag switch", switch)
def get_quad_points(self):
"""
Returns the Drag quadrature Points
"""
return self.get_abstract_item("General", "Drag quadrature Points")
def set_quad_points(self, points=33):
"""
Sets Drag quadrature Points, default value is 33
"""
self.set_abstract_item("General", "Drag quadrature Points", points)
def get_atmos_drag_recom_step(self):
"""
Retruns the Atmospheric Drag Recompute step
"""
return self.get_abstract_item(
"General",
"Atmospheric Drag Recompute step")
def set_atmos_drag_recom_step(self, step=1):
"""
Sets the Atmospheric Drag Recompute step, default is 1.
"""
self.set_atmos_drag_recom_step(
"General",
"Atmospheric Drag Recompute step",
step)
def get_solar_rad_pres_switch(self):
"""
Returns the Solar radiation pressure switch, Boolean
"""
return self.get_abstract_item(
"General",
"Solar radiation pressure switch")
def set_solar_rad_pres_switch(self, switch=True):
"""
Sets the Solar radiation pressure switch, Per default True
"""
self.set_abstract_item(
"General",
"Solar radiation pressure switch",
switch)
def get_solar_rad_pres_quad_points(self):
"""
Gets the Solar radiation pressure quadrature Points
"""
return self.get_abstract_item(
"General",
"Solar radiation pressure quadrature Points")
def set_solar_rad_pres_quad_points(self, points=11):
"""
Sets Solar radiation pressure quadrature Points, per default 11
"""
self.set_abstract_item(
"General",
"Solar radiation pressure quadrature Points",
points)
def get_sun_switch(self):
"""
Gets the Sun switch, Boolean.
"""
return self.get_abstract_item("General", "Sun Switch")
def set_sun_switch(self, switch=True):
"""
Sets the Sun switch value, per default True.
"""
self.set_abstract_item("General", "Sun switch", switch)
def get_moon_switch(self):
"""
Gets the Sun switch value, Boolean
"""
return self.get_abstract_item("General", "Moon switch")
def set_moon_switch(self, switch=True):
"""
Sets the Moon Switch, per default Boolean True
"""
self.set_abstract_item("General", "Moon switch", switch)
def get_zonal_order(self):
"""
Gets the Zonal order
"""
return self.get_abstract_item("General", "Zonal order")
def set_zonal_order(self, order=7):
"""
Sets the Zonal order, Per default 7
"""
self.set_abstract_item("General", "Zonal order", order)
def get_earth_tesseral_switch(self):
"""
Get the Earth Tesseral Switch, Boolean
"""
return self.get_abstract_item("General", "Earth Tesseral switch")
def set_earth_tesseral_switch(self, switch=False):
"""
Sets the Earth Tesseral switch, per default False
"""
self.set_abstract_item("General", "Earth Tesseral switch", switch)
def get_reentry_alt(self):
"""
Gets the Reentry Altitude
"""
return self.get_abstract_item("General", "Reentry Altitude")
def set_reentry_alt(self, alt=120):
"""
Sets the Reentry Altitude, default 120Km, can't be less than 80.
"""
while(alt < 80):
alt = raw_input("The Altitude must be between 140 - 80 KM")
self.set_abstract_item("General", "Reentry Altitude", alt)
def set_mass(self, mass):
"""
Set the mass of the space object in kilo grams
"""
self.set_abstract_item("Space Object", "Mass", mass)
def get_mass(self):
"""
Gives the Mass of the Object back.
"""
return self.get_abstract_item("Space Object", "Mass")
def get_edge_length(self):
"""
Gets the length of a Cube edge, in m
"""
return self.get_abstract_item("Space Object", "Edge Length")
def set_edge_length(self, length):
"""
Set the length of a the Cube Edge in m
"""
self.set_abstract_item("Space Object", "Edge Length", length)
self.db.update_value(
"spaceObject", "edgeLength", self.get_db_id(), length)
self.set_drag_area()
self.set_reflect_area()
def get_drag_area(self):
"""
Get the Drag area of a space object, in m^2
"""
result = self.get_abstract_item("Space Object", "Drag Area")
if(result):
return result
else:
self.set_drag_area()
return self.get_drag_area()
def get_reflect_area(self):
"""
Get the Reflecting area of the Cube
"""
result = self.get_abstract_item("Space Object", "Reflecting Area")
if(result):
return result
else:
self.set_reflect_area()
return self.get_reflect_area()
def set_reflect_area(self, number=6):
""""
Sets the refelcting area of the Cubesat.
The value would be calculated from the numbers
of the reflecting sides of the cubes.Default value of 6.
"""
if(number < 7):
self.set_abstract_item(
"Space Object",
"Reflecting Area",
float(self.calculate_drag_area(self.get_edge_length())))
else:
self.log.error("A cube had at most 6 Reflectable sides")
def get_reflect_coef(self):
"""
Gets the Reflectivity Coefficient
"""
result = self.get_abstract_item(
"Space Object",
"Reflectivity Coefficient")
if(result):
return result
else:
self.set_reflect_coef()
return self.get_reflect_coef()
def set_reflect_coef(self, coef=1.5):
"""
Sets the Reflectivity Coefficient, Default value 1.5.
Is Material connceted and a mean value should be set.
"""
self.set_abstract_item(
"Space Object",
"Reflectivity Coefficient",
coef)
def get_orbit_type(self):
"""
Gets the orbit type.
"""
result = self.get_abstract_item("Space Object", "Orbit Type")
if(result):
return result
else:
self.set_orbit_type()
return self.get_orbit_type()
def set_orbit_type(self, orbit="LEO"):
"""
Sets the orbit type. Default is LEO (Low Earth Orbit)
"""
self.set_abstract_item("Space Object", "Orbit Type", orbit)
def get_drag_coef_type(self):
"""
Gets the Drag Coefficent Type
"""
return self.get_abstract_item(
"Space Object",
"Drag Coefficent Type")
def set_drag_coef_type(self, coef="VARIABLE"):
"""
ets the Drag Coefficent Type
Per default VARIABLE the other value would be the CONSTANT
"""
self.set_abstract_item(
"Space Object",
"Drag Coefficent Type",
"Drag Coefficent Type " + coef)
def get_space_object_name(self):
"""
Returns the space objcet name.
"""
return self.get_abstract_item("Space Object", "Name")
def set_space_object_name(self, name):
"""
Sets the space object name it should be called in
satgen so the object get inserted to the table.
"""
self.set_abstract_item("Space Object", "Name", name)
def get_db_id(self):
"""
Returns the database id if not exisit 0
"""
return self.db_id
def set_db_id(self, db_id):
"""
Sets the database id of the configuration
"""
self.db_id = db_id
def calculate_drag_area(self, edge_tuple):
"""
Calculates the drag area with the given tuple
"""
step_conf = ConfigStep()
area = 0
for i in itertools.combinations(step_conf.convert_to_tuple(edge_tuple),
2):
area = ((i[0] * i[1]) * 2) + area
return area
def set_drag_area(self, mode="random"):
"""
Set the Drag area of space object, in m^2
The mode can be fixed, random
The default mode is the random, mode
before that the edge length must be set.
"""
area = self.calculate_drag_area(self.get_edge_length())
try:
if(self.get_edge_length()):
if (mode == "fixed"):
self.set_abstract_item(
"Space Object",
"Drag Area",
float(area))
elif (mode == "random"):
self.set_abstract_item(
"Space Object",
"Drag Area",
(float(area) / 4))
except:
self.log.error(
"The Cube Length is not set"
"Please set it with set_edge_length(l)")
def get_atmos_model(self):
"""
Get the Atmospheric model
"""
return self.get_abstract_item(
"Atmospheric Model",
"Atmospheric Model")
def set_atoms_model(self, model="NRLMSISE-00"):
"""
Sets the Atmospheric model, per default NRLMSISE-00
"""
self.get_abstract_item("Atmospheric Model", "Atmospheric model", model)
def get_solar_activity_type(self):
"""
Gets the Solar activiy type
"""
return self.get_abstract_item("Solar Activity", "Solar Activity Type")
def set_solar_activity_type(self, act_type="MEAN_CONSTANT"):
"""
Sets the Solar Activity Type, per default is the MEAN_CONSTANT
"""
self.set_abstract_item(
"Solar Activity",
"Solar Activity Type",
act_type)
def get_ap_constant_solar_act(self):
"""
Gets AP Constant Equivalent Solar Activity
"""
return self.get_abstract_item(
"Solar Activity",
"AP Constant Equivalent Solar Activity")
def set_ap_constant_solar_act(self, ap=15):
"""
Sets AP Constant Equivalent Solar Activity, default value is 15
"""
self.set_abstract_item(
"Solar Activity",
"AP Constant Equivalent Solar Activity",
ap)
def get_f107(self):
"""
Gets the F10.7 Constant Equivalent Solar Activity
"""
return self.get_abstract_item(
"Solar Activity",
"F10.7 Constant Equivalent Solar Activity")
def set_f107(self, f107=140):
"""
Sets F10.7 Constant Equivalent Solar Activity,
with default value of 140
"""
self.set_abstract_item(
"Solar Activity",
"F10.7 Constant Equivalent Solar Activity",
f107)
def get_initial_date(self):
"""
Gets the initail date of the simulation
"""
return self.get_abstract_item("Initial Bulletin", "Date")
def set_initial_date(self, date):
"""
Sets the date, the date can be dot or - splitted yyyy-mm-dd
internally it will be changed to yyyy-mm-ddT12:00:00:00.000
"""
return self.set_abstract_item("Initial Bulletin", "Date", date)
def get_type_of_sim(self):
"""
Gets the type of Simulation, paramater
"""
return self.get_abstract_item("Initial Bulletin", "Type")
def set_type_of_sim(self, sim_type="Perigee/Apogee"):
"""
Sets the type of simulation, per default Perigee/Apogee
"""
self.set_abstract_item("Initial Bulletin", "Type", sim_type)
def get_frame(self):
"""
Gets the Simulation Frame
"""
return self.get_abstract_item("Initial Bulletin", "Frame")
def set_frame(self, frame="CELESTIAL_MEAN_OF_DATE"):
"""
Sets the Simulation Frame, per default CELESTIAL_MEAN_OF_DATE
"""
self.set_abstract_item("Initial Bulletin", "Frame", frame)
def get_nature(self):
"""
Gets the Nature of Simulation
"""
return self.get_abstract_item("Initial Bulletin", "Nature")
def set_nature(self, nature="MEAN"):
"""
Sets the Nature of Simulation, per default MEAN
"""
self.set_abstract_item("Initial Bulletin", "Nature", nature)
def get_preigee_alt(self):
"""
Gets the Perigee Altitude in Km
"""
return self.get_abstract_item(
"Initial Bulletin",
"Zp (Perigee altitude)")
def set_perigee_alt(self, alt):
"""
Sets the perigee Altitude in Km
"""
self.set_abstract_item(
"Initial Bulletin",
"Zp (Perigee altitude)",
alt)
def get_apogee_alt(self):
"""
Gets the Apogee altitude in Km
"""
return self.get_abstract_item(
"Initial Bulletin",
"Za (Apogee altitude)")
def set_apogee_alt(self, alt):
"""
Sets the Apogee altitude in Km
"""
self.set_abstract_item(
"Initial Bulletin",
"Za (Apogee altitude)",
alt)
def get_incl(self):
"""
Gets the Inclination in Deg
"""
return self.get_abstract_item("Initial Bulletin", "I (Inclination)")
def set_incl(self, inclination):
"""
Sets the Inclination in Deg
"""
self.set_abstract_item(
"Initial Bulletin",
"I (Inclination)",
inclination)
def get_raan(self):
"""
Gets the RAAN (Right Ascension of Ascending Node) in Deg
"""
return self.get_abstract_item(
"Initial Bulletin",
"RAAN (Right Ascension of Ascending Node)")
def set_raan(self, rann):
"""
Sets RAAN (Right Ascension of Ascending Node) in Deg
"""
self.set_abstract_item(
"Initial Bulletin",
"RAAN (Right Ascension of Ascending Node)",
raan)
def get_arg_perigee(self):
"""
Gets the Argument of prigee in Deg
"""
return self.get_abstract_item(
"Initial Bulletin",
"w (Argument of perigee)")
def set_arg_perigee(self, arg):
"""
Sets the Argument of perigee in Deg
"""
self.set_abstract_item(
"Initial Bulletin",
"w (Argument of perigee)",
arg)
def get_mean_anomaly(self):
"""
Gets the Mean Anomaly in Deg
"""
return self.get_abstract_item("Initial Bulletin", "M (Mean anomaly)")
def set_mean_anomaly(self, anomaly):
"""
Sets the Mean Anomaly in Deg
"""
self.set_abstract_item(
"Initial Bulletin",
"M (Mean anomaly)",
anomaly)
def set_semi_major_axis(self, axis):
"""
Sets the SemiMajor Axis in km
"""
self.set_abstract_item(
"Initial Bulletin", "a (Semi major axis)".title(), axis)
def get_semi_major_axis(self):
"""
Gets the SemiMajor Axis in km
"""
return self.get_abstract_item("Initial Bulletin",
"a (Semi major axis)".title())
def get_eccentricity(self):
"""
Gets the Eccentricity
"""
return self.get_abstract_item("Initial Bulletin", "e (Eccentricity)")
def set_eccentricity(self, ecc):
"""
Sets the Eccentricity
"""
self.set_abstract_item("Initial Bulletin", "e (Eccentricity)", ecc)
def set_eX(self, eX):
"""
Sets the eX Orbital Parameter
"""
self.set_abstract_item("Initial Bulletin", "eX", eX)
def get_eX(self):
"""
Gets the eX Orbital Parameter
"""
return self.get_abstract_item("Initial Bulletin", "eX")
def set_eY(self, eY):
"""
Sets the eY Orbital Parameter
"""
self.set_abstract_item("Initial Bulletin", "eY", eY)
def get_eY(self):
"""
Gets the eY Orbital Parameter
"""
return self.get_abstract_item("Initial Bulletin", "eY")
def set_iX(self, iX):
"""
Sets the Orbital Parameter iX
"""
self.set_abstract_item("Initial Bulletin", "iX", iX)
def get_iX(self):
"""
Gets the Orbital Parameter iX
"""
return self.get_abstract_item("Initial Bulletin", "iX")
def set_iY(self, iY):
"""
Sets the Orbital Parameter iY
"""
self.set_abstract_item("Initial Bulletin", "iY", iY)
def get_iY(self):
"""
Gets the Orbital Parameter iY
"""
return self.get_abstract_item("Initial Bulletin", "iY")
def set_x(self, x):
"""
Sets the x value
"""
self.set_abstract_item("Initial Bulletin", "x", x)
def get_x(self):
"""
Gets the x value
"""
self.get_abstract_item("Initial Bulletin", "x")
def set_lambdaEq(self, lambdaEq):
"""
Sets the Orbital Parameter lambdaEq in Deg
"""
self.set_abstract_item("Initial Bulletin", "lambdaEq", lambdaEq)
def get_lambdaEq(self):
"""
Gets the Orbital Parameter lambdaEq in Deg
"""
return self.get_abstract_item("Initial Bulletin", "lambdaEq")
def set_epoch_tfe(self, date):
"""
Sets the epochTFE with the date
"""
self.set_abstract_item("Initial Bulletin", "epochTFE", date)
def get_eppch_tfe(self):
"""
Returns the epochTFE
"""
return self.get_abstract_item("Initial Bulletin", "epochTFE")
def set_func_value_accu(self, accu):
"""
Sets functional Value Accuracy of Iteration in days
"""
self.set_abstract_item(
"Iteration Data",
"Function Value Accuracy",
accu)
def get_func_value_accu(self):
"""
Gets the functional Value Accuracy of Iteration in days
"""
return self.get_abstract_item(
"Iteration Data",
"Function Value Accuracy")
def get_exp_dur(self):
"""
Gets the Expiring Duration in years
"""
return self.get_abstract_item(
"Iteration Data",
"Expiring Duration")