juice-simphony 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. juice_simphony-0.1.0/LICENSE.txt +212 -0
  2. juice_simphony-0.1.0/PKG-INFO +90 -0
  3. juice_simphony-0.1.0/README.md +71 -0
  4. juice_simphony-0.1.0/pyproject.toml +29 -0
  5. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/__init__.py +10 -0
  6. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/attitude/__init__.py +10 -0
  7. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/attitude/attitude.py +42 -0
  8. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/attitude/xml_attitude.py +157 -0
  9. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/__init__.py +10 -0
  10. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileHandle.py +69 -0
  11. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileHandleEps.py +43 -0
  12. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileHandleEps1.py +40 -0
  13. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileHandleTml.py +87 -0
  14. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileHandleXML.py +69 -0
  15. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileName.py +68 -0
  16. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/fileTemplate.py +67 -0
  17. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/common/utils.py +56 -0
  18. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/__init__.py +10 -0
  19. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/agmCfgFiles.py +30 -0
  20. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/agmIniFile.py +29 -0
  21. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/configuration.py +380 -0
  22. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/epsEvtDefFile.py +45 -0
  23. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/epsFile.py +29 -0
  24. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/config/mappsIniFile.py +29 -0
  25. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/definitions/__init__.py +10 -0
  26. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/definitions/definitions.py +110 -0
  27. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/definitions/toplevelObsDef.py +28 -0
  28. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/environment/__init__.py +10 -0
  29. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/environment/environment.py +310 -0
  30. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/environment/trajectory.py +206 -0
  31. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/graphicalPath.py +86 -0
  32. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/main.py +130 -0
  33. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/modelling/__init__.py +10 -0
  34. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/modelling/experiment/experiment.py +44 -0
  35. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/modelling/experiment/topLevelExpEdf.py +60 -0
  36. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/modelling/modelling.py +66 -0
  37. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/modelling/toplevelEdf.py +28 -0
  38. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/root/__init__.py +10 -0
  39. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/root/seg_conf.py +262 -0
  40. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/root/toplevelEvt.py +69 -0
  41. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/root/toplevelItl.py +75 -0
  42. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/scenario.py +281 -0
  43. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/__init__.py +10 -0
  44. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/inst_timeline.py +54 -0
  45. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/inst_top_timeline.py +45 -0
  46. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/juice_comms.py +89 -0
  47. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/plat_prof_timeline.py +66 -0
  48. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/segmentation.py +89 -0
  49. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/timeline.py +78 -0
  50. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/Scenario/timeline/timelineFile.py +51 -0
  51. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/SegmentationImporter.py +1469 -0
  52. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/__init__.py +10 -0
  53. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/__init__.py +11 -0
  54. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/common/fileHandle.py +69 -0
  55. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/common/fileHandleEps.py +55 -0
  56. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/common/fileName.py +56 -0
  57. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/instToplevelObsDef.py +41 -0
  58. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/obsDefinition.py +95 -0
  59. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/obsDefinitions.py +71 -0
  60. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/profileCsv.py +52 -0
  61. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/segDefinition.py +80 -0
  62. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/timeline.py +100 -0
  63. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/toplevelDefs.py +40 -0
  64. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/mapps_io/toplevelObsDef.py +41 -0
  65. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/restApiPlan.py +59 -0
  66. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/segmentation_profiles.py +851 -0
  67. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/SegmentationImporter/shtRestClient.py +576 -0
  68. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/__init__.py +10 -0
  69. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/.gitignore +10 -0
  70. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/CMakeLists.txt +34 -0
  71. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/CMakeLists.txt +48 -0
  72. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/EventsFile.cpp +139 -0
  73. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/EventsFile.hpp +17 -0
  74. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/OrbitDataFile.cpp +190 -0
  75. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/OrbitDataFile.hpp +57 -0
  76. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/OrbitDefFile.cpp +199 -0
  77. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/OrbitDefFile.hpp +58 -0
  78. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/TrajectoryEngine.cpp +142 -0
  79. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/FileGeneration/TrajectoryEngine.hpp +59 -0
  80. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/README.md +26 -0
  81. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/CMakeLists.txt +15 -0
  82. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/CommonTypes.hpp +37 -0
  83. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/Conversions.hpp +36 -0
  84. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/TimeUtils.cpp +1160 -0
  85. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/TimeUtils.hpp +196 -0
  86. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/Utils/rapidcsv.hpp +1431 -0
  87. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceCK.h +155 -0
  88. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceCel.h +441 -0
  89. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceDLA.h +260 -0
  90. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceDSK.h +903 -0
  91. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceDtl.h +251 -0
  92. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceEK.h +448 -0
  93. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceEll.h +115 -0
  94. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceErr.h +141 -0
  95. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceFrm.h +202 -0
  96. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceGF.h +345 -0
  97. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceOccult.h +147 -0
  98. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceOsc.h +86 -0
  99. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpicePln.h +106 -0
  100. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceSPK.h +128 -0
  101. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceSrf.h +94 -0
  102. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceUsr.h +278 -0
  103. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZad.h +209 -0
  104. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZdf.h +260 -0
  105. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZfc.h +13803 -0
  106. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZim.h +1677 -0
  107. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZmc.h +989 -0
  108. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZpl.h +117 -0
  109. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZpr.h +4725 -0
  110. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZrnm.h +82 -0
  111. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/SpiceZst.h +199 -0
  112. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/f2c.h +683 -0
  113. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/f2cMang.h +390 -0
  114. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/fio.h +107 -0
  115. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/fmt.h +100 -0
  116. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/fp.h +28 -0
  117. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/lio.h +74 -0
  118. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/rawio.h +41 -0
  119. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/signal1.h +118 -0
  120. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/zzalloc.h +133 -0
  121. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/include/zzerror.h +86 -0
  122. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/lib/linux/cspice.a +0 -0
  123. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/cspice/lib/mac/cspice.a +0 -0
  124. juice_simphony-0.1.0/src/juice_simphony/CompositionEngine/trajectory_engine/testStub.cpp +37 -0
  125. juice_simphony-0.1.0/src/juice_simphony/__init__.py +10 -0
  126. juice_simphony-0.1.0/src/juice_simphony/cli.py +46 -0
  127. juice_simphony-0.1.0/src/juice_simphony/commons/__init__.py +10 -0
  128. juice_simphony-0.1.0/src/juice_simphony/commons/commons.py +65 -0
  129. juice_simphony-0.1.0/src/juice_simphony/data/config_scenario.json +13 -0
  130. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/AGM/CFG_TPL0001A_AGM_CALLISTO.ini +292 -0
  131. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/AGM/CFG_TPL0001A_AGM_EUROPA.ini +292 -0
  132. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/AGM/CFG_TPL0001A_AGM_GANYMEDE.ini +292 -0
  133. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/AGM/CFG_TPL0001A_AGM_JUPITER.ini +309 -0
  134. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/EPS/planning_mtp_mapping.def +92 -0
  135. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/EPS/planning_period_def.xml +239 -0
  136. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/MAPPS/CFG_TPL0001A_CALLISTO_MAPPS.ini +7926 -0
  137. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/MAPPS/CFG_TPL0001A_EUROPA_MAPPS.ini +7926 -0
  138. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/MAPPS/CFG_TPL0001A_GANYMEDE_MAPPS.ini +7944 -0
  139. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/MAPPS/CFG_TPL0001A_JUPITER_MAPPS.ini +7895 -0
  140. juice_simphony-0.1.0/src/juice_simphony/data/templates/MAPPS_CONF/MAPPS/CFG_TPL0001A_MAPPS.ini +8554 -0
  141. juice_simphony-0.1.0/src/juice_simphony/data/templates/OBSERVATIONS/JUI/SCENARIO/ODF_JUI_COMMS_template_SXXPYY.def +152 -0
  142. juice_simphony-0.1.0/src/juice_simphony/data/templates/OBSERVATIONS/JUI/SCENARIO/ODF_NAV_OPNAV_BLOCK_template_SXXPYY.def +21 -0
  143. juice_simphony-0.1.0/src/juice_simphony/data/templates/OBSERVATIONS/JUI/SCENARIO/ODF_RAD_ON_template_SXXPYY.def +9 -0
  144. juice_simphony-0.1.0/src/juice_simphony/data/templates/OBSERVATIONS/JUI/SCENARIO/ODF_SCENARIO_JUI_template.def +10 -0
  145. juice_simphony-0.1.0/src/juice_simphony/data/templates/README.md +2 -0
  146. juice_simphony-0.1.0/src/juice_simphony/juice_simphony.py +98 -0
  147. juice_simphony-0.1.0/src/juice_simphony/libs/TrajectoryEngine.dll +0 -0
  148. juice_simphony-0.1.0/src/juice_simphony/libs/libTrajectoryEngine.dylib +0 -0
  149. juice_simphony-0.1.0/src/juice_simphony/libs/libTrajectoryEngine.so +0 -0
  150. juice_simphony-0.1.0/src/juice_simphony/poetry.lock +131 -0
  151. juice_simphony-0.1.0/src/juice_simphony/spice_interface/__init__.py +10 -0
  152. juice_simphony-0.1.0/src/juice_simphony/spice_interface/spice_interface.py +204 -0
@@ -0,0 +1,212 @@
1
+ https://essr.esa.int/license/european-space-agency-public-license-v2-4-permissive-type-3
2
+
3
+ European Space Agency Public License (ESA-PL) Permissive (Type 3) – v2.4
4
+
5
+ 1 Definitions
6
+
7
+ 1.1 "Contributor" means (a) the individual or legal entity that originally creates or later modifies the Software and
8
+ (b) each subsequent individual or legal entity that creates or contributes to the creation of Modifications.
9
+
10
+ 1.2 "Contributor Version" means the version of the Software on which the Contributor based its Modifications.
11
+
12
+ 1.3 "Distribution" and "Distribute" means any act of selling, giving, lending, renting, distributing, communicating,
13
+ transmitting, or otherwise making available, physically or electronically or by any other means, copies of the
14
+ Software or Modifications.
15
+
16
+ 1.4 "ESA" means the European Space Agency.
17
+
18
+ 1.5 "License" means this document.
19
+
20
+ 1.6 "Licensor" means the individual or legal entity that Distributes the Software under the License to You.
21
+
22
+ 1.7 "Modification" means any work or software created that is based upon or derived from the Software
23
+ (or portions thereof) or a modification of the Software (or portions thereof). For the avoidance of doubt,
24
+ linking a library to the Software results in a Modification.
25
+
26
+ 1.8 "Object Code" means any non-Source Code form of the Software and/or Modifications.
27
+
28
+ 1.9 "Patent Claims" (of a Contributor) means any patent claim(s), owned at the time of the Distribution or
29
+ subsequently acquired, including without limitation, method, process and apparatus claims, in any patent licensable
30
+ by a Contributor which would be infringed by making use of the rights granted under Sec. 2.1, including but not
31
+ limited to make, have made, use, sell, offer for sale or import of the Contributor Version and/or such
32
+ Contributor’s Modifications (if any), either alone or in combination with the Contributor Version. "Licensable"
33
+ means having the right to grant, whether at the time of the Distribution or subsequently acquired, the rights
34
+ conveyed herein.
35
+
36
+ 1.10 "Software" means the software Distributed under this License by the Licensor, in Source Code and/or
37
+ Object Code form.
38
+
39
+ 1.11 "Source Code" means the preferred, usually human readable form of the Software and/or Modifications in which
40
+ modifications are made and the associated documentation included in or with such code.
41
+
42
+ 1.12 "You" means an individual or legal entity exercising rights under this License (the licensee).
43
+
44
+
45
+ 2 Grant of Rights
46
+
47
+ 2.1 Copyright
48
+
49
+ The Licensor, and each Contributor in respect of such Contributor’s Modifications, hereby grants You a world-wide,
50
+ royalty-free, non-exclusive license under Copyright, subject to the terms and conditions of this License, to:
51
+
52
+ - use the Software;
53
+
54
+ - reproduce the Software by any or all means and in any or all form;
55
+
56
+ - Modify the Software and create works based on the Software;
57
+
58
+ - communicate to the public, including making available, display or perform the Software or copies thereof to the public;
59
+
60
+ - Distribute, sublicense, lend and rent the Software.
61
+
62
+ The license grant is perpetual and irrevocable, unless terminated pursuant to Sec. 8.
63
+
64
+ 2.2 Patents
65
+
66
+ Each Contributor in respect of such Contributor’s Modifications, hereby grants You a world-wide, royalty-free,
67
+ non-exclusive, sub-licensable license under Patent Claims to the extent necessary to make use of the rights granted
68
+ under Sec. 2.1, including but not limited to make, have made, use, sell, offer for sale, import, export and Distribute
69
+ such Contributor’s Modifications and the combination of such Contributor’s Modifications with the Contributor Version
70
+ (collectively called the "Patent Licensed Version" of the Software).
71
+
72
+ No patent license is granted for claims that are infringed:
73
+
74
+ - only as a consequence of further modification of the Patent Licensed Version; or
75
+
76
+ - by the combination of the Patent Licensed Version with other software or other devices or hardware, unless such
77
+ combination was an intended use case of the Patent Licensed Version (e.g. a general purpose library is intended to
78
+ be used with other software, a satellite navigation software is intended to be used with appropriate hardware); or
79
+
80
+ - by a Modification under Patent Claims in the absence of the Contributor’s Modifications or by a combination of the
81
+ Contributor’s Modifications with software other than the Patent Licensed Version or Modifications thereof.
82
+
83
+ 2.3 Trademark
84
+
85
+ This License does not grant permission to use trade names, trademarks, services marks, logos or names of the Licensor,
86
+ except as required for reasonable and customary use in describing the origin of the Software and as reasonable necessary
87
+ to comply with the obligations of this License (e.g. by reproducing the content of the notices). For the avoidance of
88
+ doubt, upon Distribution of Modifications You must not use the Licensor’s or ESA’s trademarks, names or logos in any way
89
+ that states or implies, or can be interpreted as stating or implying, that the final product is endorsed or created by
90
+ the Licensor or ESA.
91
+
92
+ 3 Distribution
93
+
94
+ 3.1 No Copyleft
95
+
96
+ You may Distribute the Software and/or Modifications, as Source Code or Object Code, under any license terms, provided
97
+ that
98
+
99
+ (a) notice is given of the use of the Software and the applicability of this License to the Software; and
100
+
101
+ (b) You make best efforts to ensure that further Distribution of the Software and/or Modifications (including further
102
+ Modifications) is subject to the obligations set forth in this Sec. 3.1 (a) and (b).
103
+
104
+ 4 Notices
105
+
106
+ The following obligations apply in the event of any Distribution of the Software and/or Modifications as Source Code
107
+ and/or Object Code:
108
+
109
+ 4.1 You must include a copy of this License and all of the notices set out in this Sec. 4.
110
+
111
+ 4.2 You may not remove or alter any copyright, patent, trademark and attribution notices nor any of the notices set out
112
+ in this Sec. 4, except as necessary for your compliance with this License or otherwise permitted by this License,
113
+ except for those notices that do not pertain to the Modifications You Distribute.
114
+
115
+ 4.3 Each Contributor must cause its Modification carrying prominent notices stating that the Software has been modified
116
+ and the date of modification and identify itself as the originator of its Modifications in a manner that reasonably
117
+ allows identification and contact with the Contributor. The aforementioned notices must at a minimum be in a text
118
+ file included with the Distribution titled "CHANGELOG".
119
+
120
+ 4.4 The Software may include a "NOTICE" text file containing general notices. Any Contributor can create such a NOTICE
121
+ file or add notices to it, alongside or as an addendum to the original text, provided that such notices cannot be
122
+ construed as modifying the License.
123
+
124
+ 4.5 Each Contributor must identify all of its Patent Claims by providing at a minimum the patent number and
125
+ identification and contact information in a text file included with the Distribution titled "LEGAL".
126
+
127
+ 5 Warranty and Liability
128
+
129
+ 5.1 Each Contributor warrants and represents that it has sufficient rights to grant the rights to its Modifications
130
+ conveyed by this License.
131
+
132
+ 5.2 Except as expressly set forth in this License, the Software is provided to You on an "as is" basis and without
133
+ warranties of any kind, including without limitation merchantability, fitness for a particular purpose, absence of
134
+ defects or errors, accuracy or non-infringement of intellectual property rights. Mandatory statutory warranty
135
+ claims, e.g. in the event of wilful deception or fraudulent misrepresentation, shall remain unaffected.
136
+
137
+ 5.3 Except as expressly set forth in this License, neither Licensor nor any Contributor shall be liable, including,
138
+ without limitation, for direct, indirect, incidental, or consequential damages (including without limitation
139
+ loss of profit), however caused and on any theory of liability, arising in any way out of the use or Distribution
140
+ of the Software or the exercise of any rights under this License, even if You have been advised of the possibility
141
+ of such damages. Mandatory statutory liability claims, e.g. in the event of wilful misconduct, wilful deception or
142
+ fraudulent misrepresentation, shall remain unaffected.
143
+
144
+ 6 Additional Agreements
145
+
146
+ While Distributing the Software or Modifications, You may choose to conclude additional agreements, for free or for
147
+ charge, regarding for example support, warranty, indemnity, liability or liability obligations and/or rights, provided
148
+ such additional agreements are consistent with this License and do not effectively restrict the recipient’s rights
149
+ under this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole
150
+ responsibility, not on behalf of any other Contributor or Licensor, and only if You agree to indemnify, defend, and hold
151
+ each Contributor or Licensor harmless for any liability incurred by, or claims asserted against, such Contributor or
152
+ Licensor by reason of your accepting any such warranty or additional liability.
153
+
154
+ 7 Infringements
155
+
156
+ You acknowledge that continuing to use the Software knowing that such use infringes third party rights (e.g. after
157
+ receiving a third party notification of infringement) would expose you to the risk of being considered as intentionally
158
+ infringing third party rights. In such event You should acquire the respective rights or modify the Software so that
159
+ the Modification is non-infringing.
160
+
161
+ 8 Termination
162
+
163
+ 8.1 This License and the rights granted hereunder will terminate automatically upon any breach by You with the terms of
164
+ this License if you fail to cure such breach within 30 days of becoming aware of the breach.
165
+
166
+ 8.2 If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
167
+ alleging that the Software constitutes direct or contributory patent infringement, then any patent and copyright
168
+ licenses granted to You under this License for the Software shall terminate as of the date such litigation is filed.
169
+
170
+ 8.3 Any licenses validly granted by You under the License prior to termination shall continue and survive termination.
171
+
172
+ 9 Applicable Law, Arbitration and Compliance
173
+
174
+ 9.1 This License is governed by the laws of the ESA Member State where the Licensor resides or has his registered
175
+ office. "Member States" are the members of the European Space Agency pursuant to Art. 1 of the ESA Convention[1].
176
+ This licence shall be governed by German law if a dispute arises with the ESA as a Licensor or if the Licensor has
177
+ no residence or registered office inside a Member State.
178
+
179
+ 9.2 Any dispute arising out of this License shall be finally settled in accordance with the Rules of Arbitration of the
180
+ International Chamber of Commerce by one or more arbitrators designated in conformity with those rules. Arbitration
181
+ proceedings shall take place in Cologne, Germany. The award shall be final and binding on the parties, no appeal
182
+ shall lie against it. The enforcement of the award shall be governed by the rules of procedure in force in the
183
+ state/country in which it is to be executed.
184
+
185
+ 9.3 For the avoidance of doubt, You are solely responsible for compliance with current applicable requirements of
186
+ national laws. The Software can be subject to export control laws. If You export the Software it is your
187
+ responsibility to comply with all export control laws. This may include different requirements, as e.g.
188
+ registering the Software with the local authorities.
189
+
190
+ 9.4 If it is impossible for You to comply with any of the terms of this License due to statute, judicial order or
191
+ regulation You must:
192
+
193
+ (a) comply with the terms of this License to the maximum extent possible; and
194
+
195
+ (b) describe the limitations and the Object Code and/or Source Code they affect. Such description must be included in
196
+ the LEGAL notice described in Section 4. Except to the extent prohibited by statute or regulation, such description
197
+ must be sufficiently detailed for an average recipient to be able to understand it.
198
+
199
+ 10 Miscellaneous
200
+
201
+ 10.1 Only ESA has the right to modify or publish new versions of this License. ESA may assign this right to other
202
+ individuals or legal entities. Each version will be given a distinguishing version number.
203
+
204
+ 10.2 This License represents the complete agreement concerning subject matter hereof.
205
+
206
+ 10.3 If any provision of this License is held invalid or unenforceable, the remaining provisions of
207
+ this License shall not be affected. The invalid or unenforceable provision shall be construed and/or
208
+ reformed to the extent necessary to make it enforceable and valid.
209
+
210
+ [1] As of January 2020 the Member States are Austria, Belgium, Czech Republic, Denmark, Estonia, Finland, France,
211
+ Germany, Greece, Hungary, Ireland, Italy, Luxembourg, The Netherlands, Norway, Poland, Portugal, Romania, Spain,
212
+ Sweden, Switzerland and the United Kingdom.
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: juice-simphony
3
+ Version: 0.1.0
4
+ Summary: JUICE Scenario Generator
5
+ License: ESA
6
+ Author: JUICE SOC Team
7
+ Requires-Python: >=3.10
8
+ Classifier: License :: Other/Proprietary License
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
14
+ Requires-Dist: python-dotenv (>=1.1.0,<2.0.0)
15
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
16
+ Requires-Dist: setuptools (>=80.3.1,<81.0.0)
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Symphony Web
20
+
21
+
22
+ ## Getting started
23
+
24
+
25
+ ## Project requirements
26
+
27
+ - Python 3.10
28
+
29
+ ## Install the package
30
+
31
+ ```
32
+ pip install juice-simphony
33
+ ```
34
+
35
+ ## Check spice kernels (for MAPPS products)
36
+
37
+ Ensure that the spice meta-kernel is aligned with that of the segmentation.
38
+ If not, perform a git checkout accordingly.
39
+
40
+
41
+ ## Run the script
42
+
43
+ Start by running the script with the -h option
44
+
45
+ ```
46
+ juice-simphony -h
47
+ ```
48
+ the following output is expected
49
+ ```
50
+ usage: juice-simphony [-h] [--config CONFIG] [--template] [--mapps]
51
+
52
+ Standalone Simphony Scenario Generator
53
+
54
+ options:
55
+ -h, --help show this help message and exit
56
+ --config CONFIG Path to JSON config file
57
+ --template Optional flag to dump template and exit
58
+ --mapps Enable MAPPS-specific behaviour
59
+ --zip Save the output as a ZIP file
60
+ ```
61
+
62
+ Get the template configuration file by executing
63
+ ```
64
+ juice-simphony --template
65
+ ```
66
+ which prints the configuration file in data/config_scenario.json.
67
+
68
+ ```
69
+ {
70
+ "juice_conf": "$HOME/juice_conf",
71
+ "output_folder": "$HOME/JUICE_PREOPS/PLANNING",
72
+ "kernel_abs_path": "$HOME/juice/kernels",
73
+ "scenario_id": "S008_01",
74
+ "shortDesc": "ORB17",
75
+ "trajectory": "CREMA_5_1_150lb_23_1_a3",
76
+ "mnemonic": "S008_ORB17_S13P00",
77
+ "startTime": "2032-12-18T17:32:33",
78
+ "endTime": "2033-01-08T21:05:31",
79
+ "main_target": "Jupiter",
80
+ "iniAbsolutePath": "SOFTWARE/MAPPS"
81
+ }
82
+ ```
83
+ Execute the package via
84
+ ```
85
+ juice-simphony --config yourpath/config_scenario.json (--mapps --zip)
86
+ ```
87
+ where the --mapps option allows the generation of MAPPS specific outputs, and the --zip option can be used to zip the output folder.
88
+
89
+ The output is folder created generated in the directory provided above in the configuration.
90
+
@@ -0,0 +1,71 @@
1
+ # Symphony Web
2
+
3
+
4
+ ## Getting started
5
+
6
+
7
+ ## Project requirements
8
+
9
+ - Python 3.10
10
+
11
+ ## Install the package
12
+
13
+ ```
14
+ pip install juice-simphony
15
+ ```
16
+
17
+ ## Check spice kernels (for MAPPS products)
18
+
19
+ Ensure that the spice meta-kernel is aligned with that of the segmentation.
20
+ If not, perform a git checkout accordingly.
21
+
22
+
23
+ ## Run the script
24
+
25
+ Start by running the script with the -h option
26
+
27
+ ```
28
+ juice-simphony -h
29
+ ```
30
+ the following output is expected
31
+ ```
32
+ usage: juice-simphony [-h] [--config CONFIG] [--template] [--mapps]
33
+
34
+ Standalone Simphony Scenario Generator
35
+
36
+ options:
37
+ -h, --help show this help message and exit
38
+ --config CONFIG Path to JSON config file
39
+ --template Optional flag to dump template and exit
40
+ --mapps Enable MAPPS-specific behaviour
41
+ --zip Save the output as a ZIP file
42
+ ```
43
+
44
+ Get the template configuration file by executing
45
+ ```
46
+ juice-simphony --template
47
+ ```
48
+ which prints the configuration file in data/config_scenario.json.
49
+
50
+ ```
51
+ {
52
+ "juice_conf": "$HOME/juice_conf",
53
+ "output_folder": "$HOME/JUICE_PREOPS/PLANNING",
54
+ "kernel_abs_path": "$HOME/juice/kernels",
55
+ "scenario_id": "S008_01",
56
+ "shortDesc": "ORB17",
57
+ "trajectory": "CREMA_5_1_150lb_23_1_a3",
58
+ "mnemonic": "S008_ORB17_S13P00",
59
+ "startTime": "2032-12-18T17:32:33",
60
+ "endTime": "2033-01-08T21:05:31",
61
+ "main_target": "Jupiter",
62
+ "iniAbsolutePath": "SOFTWARE/MAPPS"
63
+ }
64
+ ```
65
+ Execute the package via
66
+ ```
67
+ juice-simphony --config yourpath/config_scenario.json (--mapps --zip)
68
+ ```
69
+ where the --mapps option allows the generation of MAPPS specific outputs, and the --zip option can be used to zip the output folder.
70
+
71
+ The output is folder created generated in the directory provided above in the configuration.
@@ -0,0 +1,29 @@
1
+ [tool.poetry]
2
+ name = "juice-simphony"
3
+ version = "0.1.0"
4
+ description = "JUICE Scenario Generator"
5
+ authors = ["JUICE SOC Team"]
6
+ license = "ESA"
7
+ readme = "README.md"
8
+ packages = [{ include = "juice_simphony", from = "src" }]
9
+ include = [
10
+ { path = "src/juice_simphony/data", format = "wheel" },
11
+ { path = "src/juice_simphony/data", format = "sdist" }
12
+ ]
13
+ [tool.poetry.dependencies]
14
+ python = ">=3.10"
15
+
16
+ python-dotenv = "^1.1.0"
17
+ jinja2 = "^3.1.6"
18
+ setuptools = "^80.3.1"
19
+ requests = "^2.32.3"
20
+ [tool.poetry.group.dev.dependencies]
21
+ pytest = "^8.0.0"
22
+
23
+ [build-system]
24
+ requires = ["poetry-core"]
25
+ build-backend = "poetry.core.masonry.api"
26
+
27
+ [tool.poetry.scripts]
28
+ juice-simphony = "juice_simphony.cli:run"
29
+
@@ -0,0 +1,10 @@
1
+ # *************************************************************************** #
2
+ # This file is subject to the terms and conditions defined in the #
3
+ # file 'LICENSE.txt', which is part of this source code package. #
4
+ # #
5
+ # No part of the package, including this file, may be copied, modified, #
6
+ # propagated, or distributed except according to the terms contained in #
7
+ # the file 'LICENSE.txt'. #
8
+ # #
9
+ # (C) Copyright European Space Agency, 2025 #
10
+ # *************************************************************************** #
@@ -0,0 +1,10 @@
1
+ # *************************************************************************** #
2
+ # This file is subject to the terms and conditions defined in the #
3
+ # file 'LICENSE.txt', which is part of this source code package. #
4
+ # #
5
+ # No part of the package, including this file, may be copied, modified, #
6
+ # propagated, or distributed except according to the terms contained in #
7
+ # the file 'LICENSE.txt'. #
8
+ # #
9
+ # (C) Copyright European Space Agency, 2025 #
10
+ # *************************************************************************** #
@@ -0,0 +1,42 @@
1
+ # *************************************************************************** #
2
+ # This file is subject to the terms and conditions defined in the #
3
+ # file 'LICENSE.txt', which is part of this source code package. #
4
+ # #
5
+ # No part of the package, including this file, may be copied, modified, #
6
+ # propagated, or distributed except according to the terms contained in #
7
+ # the file 'LICENSE.txt'. #
8
+ # #
9
+ # (C) Copyright European Space Agency, 2025 #
10
+ # *************************************************************************** #
11
+ import juice_simphony.CompositionEngine.Scenario.common.utils as utils
12
+ from juice_simphony.CompositionEngine.Scenario.definitions.toplevelObsDef import toplevelObsDef
13
+ from juice_simphony.CompositionEngine.SegmentationImporter.SegmentationImporter import segmentationTimeline
14
+ from juice_simphony.CompositionEngine.Scenario.attitude import xml_attitude as xml_att
15
+
16
+
17
+ import os
18
+
19
+ class attitude:
20
+
21
+ def __init__(self, segmentationTimelineInst, root_path, parameters=0):
22
+ self.root_path = root_path
23
+ self.segTimeline = segmentationTimelineInst
24
+ self.parameters = parameters
25
+ self.mainFolderPath = ""
26
+ self.structure = {}
27
+
28
+ def build(self):
29
+ self.createMainFolder('POINTING')
30
+ self.structure["path"] = self.mainFolderPath;
31
+ self.structure["xmlAttitudeFile"] = self.addRootContent()
32
+ return self.structure
33
+
34
+ def createMainFolder(self, folderName):
35
+ self.mainFolderPath = utils.createFolder(self.root_path, folderName)
36
+
37
+ def addRootContent(self):
38
+ xml_seg_attitude = self.segTimeline.getXmlAttitude()
39
+ if xml_seg_attitude["valid"]:
40
+ xml_att_file = xml_att.xml_attitude(self.mainFolderPath, xml_seg_attitude["xml_tree"], self.parameters)
41
+ return xml_att_file.genFile()
42
+ return ""
@@ -0,0 +1,157 @@
1
+ # *************************************************************************** #
2
+ # This file is subject to the terms and conditions defined in the #
3
+ # file 'LICENSE.txt', which is part of this source code package. #
4
+ # #
5
+ # No part of the package, including this file, may be copied, modified, #
6
+ # propagated, or distributed except according to the terms contained in #
7
+ # the file 'LICENSE.txt'. #
8
+ # #
9
+ # (C) Copyright European Space Agency, 2025 #
10
+ # *************************************************************************** #
11
+ from jinja2 import Template
12
+ import os
13
+ from datetime import datetime
14
+ from xml.etree import ElementTree as et
15
+ import xml.etree.cElementTree as etree
16
+ from xml.dom import minidom
17
+ from copy import deepcopy
18
+
19
+ from juice_simphony.CompositionEngine.Scenario.common.fileHandleEps1 import fileHandleEps1
20
+ from juice_simphony.CompositionEngine.Scenario.common.fileName import fileName
21
+ from juice_simphony.CompositionEngine.Scenario.common.fileHandleXML import fileHandleXML
22
+
23
+ class xml_attitude(fileHandleXML):
24
+
25
+ def __init__(self, path, xml_att_struct, params = 0):
26
+ self.params = {}
27
+ if params!=0:
28
+ self.params.update(params)
29
+ self.path = path
30
+ self.rootPath = path
31
+ self.xml_att_struct = xml_att_struct
32
+ self.params["prefix"] = "PTR"
33
+ self.params["type"] = "SOC"
34
+ self.params["desc"] = ""
35
+ self.params["version"] = "SXXPYY"
36
+ self.params["ext"] = "ptx"
37
+ self.fileName = ""
38
+ self.template = 0
39
+ self.startTime = self.params["startTime"]
40
+ self.endTime = self.params["endTime"]
41
+ self.time_format = "%Y-%m-%dT%H:%M:%S"
42
+ fileName.__init__(self, self.params)
43
+
44
+ def indent(self, elem, level=0):
45
+ i = "\n" + level*" "
46
+ j = "\n" + (level-1)*" "
47
+ if len(elem):
48
+ if not elem.text or not elem.text.strip():
49
+ elem.text = i + " "
50
+ if not elem.tail or not elem.tail.strip():
51
+ elem.tail = i
52
+ for subelem in elem:
53
+ self.indent(subelem, level+1)
54
+ if not elem.tail or not elem.tail.strip():
55
+ elem.tail = j
56
+ else:
57
+ if level and (not elem.tail or not elem.tail.strip()):
58
+ elem.tail = j
59
+ return elem
60
+
61
+ def writeTimelineHeader(self):
62
+ self.writeHeader(self.params["scenarioID"], "JUICE SEGMENTATION ATTITUDE")
63
+ #comment = etree.Comment(' === Some Comment === ')
64
+ #root.insert(1, comment) # 1 is the index where comment is inserted
65
+ self.insertEmptyLine()
66
+
67
+ def write_xml_body(self):
68
+ #print (etree.tostring(self.xml_filtered_att, encoding='utf8', method='xml'))
69
+ #self.indent(self.xml_filtered_att)
70
+ xmlstr = minidom.parseString(etree.tostring(self.xml_filtered_att,encoding="unicode")).toprettyxml(indent = " ")
71
+ line_list = [s for s in xmlstr.splitlines() if s.strip("\r\n").strip()]
72
+ xmlstr = os.linesep.join(line_list)
73
+ # COMMENTED by PE
74
+ #print(xmlstr)
75
+ self.fileHdl.write(xmlstr)
76
+ # et.indent(self.xml_filtered_att, space=' ', level=0)
77
+ # self.fileHdl.write(et.tostring(self.xml_filtered_att,encoding="unicode"))
78
+
79
+ def writeContent(self):
80
+ self.writeTimelineHeader()
81
+ self.xml_filtered_att = self.filterPtr(self.xml_att_struct, self.startTime, self.endTime)
82
+ self.write_xml_body()
83
+
84
+ def filterPtr(self, xml_struct_att, start_time, end_time, cut_block = True):
85
+ start_time_dt = datetime.strptime(start_time, self.time_format)
86
+ end_time_dt = datetime.strptime(end_time, self.time_format)
87
+
88
+ # Get timeline node
89
+ timeline = next(xml_struct_att.iter("timeline"))
90
+ xml_block_list = list(xml_struct_att.iter("block"))
91
+ xml_block_list_out = []
92
+ #xml_block_list_len = len(xml_block_list)
93
+ num_of_filtered_blocks = 0
94
+ for index,xml_block in enumerate(xml_block_list):
95
+ if (xml_block.attrib["ref"] == "SLEW"): continue
96
+ # xml_seg = next(xml_block.iter("segmentation"), None)
97
+ # if not xml_seg == None:
98
+ xml_seg_start_time_dt = datetime.strptime(xml_block.find('startTime').text.strip(), self.time_format)
99
+ xml_seg_end_time_dt = datetime.strptime(xml_block.find('endTime').text.strip(), self.time_format)
100
+ intersect, cutted_block, xml_cut_start_time_dt, xml_cut_end_time_dt = self.intersectTimeRange(start_time_dt, end_time_dt, xml_seg_start_time_dt, xml_seg_end_time_dt, cut_block)
101
+ if intersect:
102
+ if num_of_filtered_blocks >= 1:
103
+ if xml_block_list[index-1].attrib["ref"] == "SLEW":
104
+ xml_block_list_out.append(xml_block_list[index-1])
105
+ num_of_filtered_blocks = num_of_filtered_blocks + 1
106
+ if cutted_block:
107
+ xml_block_start_time = next(xml_block.iter("startTime"), None)
108
+ if not xml_block_start_time == None:
109
+ xml_block_start_time.text = datetime.strftime(xml_cut_start_time_dt, "%Y-%m-%dT%H:%M:%S")
110
+ xml_block_end_time = next(xml_block.iter("endTime"), None)
111
+ if not xml_block_end_time == None:
112
+ xml_block_end_time.text = datetime.strftime(xml_cut_end_time_dt, "%Y-%m-%dT%H:%M:%S")
113
+ xml_block_list_out.append(xml_block)
114
+ last_block_end_time = xml_cut_end_time_dt
115
+ last_block = xml_block_list_out[-1]
116
+ xml_block_end_time = next(last_block.iter("endTime"), None)
117
+ if not xml_block_end_time == None:
118
+ xml_block_end_time.text = datetime.strftime(last_block_end_time, "%Y-%m-%dT%H:%M:%S")
119
+ else:
120
+ end_time_el = et.Element("endTime")
121
+ end_time_el.text = datetime.strftime(last_block_end_time, "%Y-%m-%dT%H:%M:%S")
122
+ last_block.append(end_time_el)
123
+ timeline.clear()
124
+ timeline.attrib["frame"] = "SC";
125
+ timeline.extend(xml_block_list_out)
126
+
127
+ return xml_struct_att
128
+
129
+ def intersectTimeRange(self, startTime, endTime, xml_seg_start_time, xml_seg_end_time, cut_block = True):
130
+ cutted_block = False
131
+ if endTime <= xml_seg_start_time: # st et xml_st xml_et
132
+ return (False, cutted_block, xml_seg_start_time, xml_seg_end_time)
133
+ else:
134
+ if xml_seg_end_time <= startTime: # xml_st xml_et st et
135
+ return (False, cutted_block, xml_seg_start_time, xml_seg_end_time)
136
+ else:
137
+ if cut_block:
138
+ if endTime < xml_seg_end_time: # xml_st et xml_et
139
+ # Cut block end time
140
+ xml_seg_end_time = endTime
141
+ cutted_block = True
142
+ if startTime > xml_seg_start_time: # xml_st st xml_et
143
+ # Cut block start time
144
+ xml_seg_start_time = startTime
145
+ cutted_block = True
146
+ return (True, cutted_block, xml_seg_start_time, xml_seg_end_time)
147
+
148
+ if __name__ == "__main__":
149
+ xml_doc = et.parse(R"Z:\VALIDATION\simphony\pcm\phs_pcm_test_004\input\TMP\CREMA_5_0.xml")
150
+ root = xml_doc.getroot()
151
+
152
+ params = {}
153
+ params["scenarioID"] = "SJS0003C30A"
154
+ params["startTime"] = "2032-09-01T01:00:00"
155
+ params["endTime"] = "2032-09-28T08:00:00"
156
+ #xml_att_file = xml_attitude(path="Z:\VALIDATION\simphony\pcm\phs_pcm_test_001\scenario_generator\output", xml_att_struct=xml_doc.getroot(), params=params)
157
+ #xml_att_file.genFile()
@@ -0,0 +1,10 @@
1
+ # *************************************************************************** #
2
+ # This file is subject to the terms and conditions defined in the #
3
+ # file 'LICENSE.txt', which is part of this source code package. #
4
+ # #
5
+ # No part of the package, including this file, may be copied, modified, #
6
+ # propagated, or distributed except according to the terms contained in #
7
+ # the file 'LICENSE.txt'. #
8
+ # #
9
+ # (C) Copyright European Space Agency, 2025 #
10
+ # *************************************************************************** #