Skip to content

Commit 8b0c024

Browse files
authored
Merge pull request #31 from EarthObservationSimulator/vinay_dev
Mission Module Updates with examples, Dshield format converter, Classical Keplerian Orbit, Contact and Eclipse Validation
2 parents 9e2b24f + 65d5a82 commit 8b0c024

65 files changed

Lines changed: 32626 additions & 687 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ htmlcov/
1010
.coverage
1111

1212
# ignore output files of example scripts
13-
MissionOutput.json
13+
MissionOutput.json
14+
examples/cygnss_gnssr/results/*
15+
examples/planet_skysat/results/*

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ slowtest:
1010
coverage run -m unittest discover -s slowtests
1111

1212
lint:
13-
pylint --rcfile=pylintrc orbitpy tests examples # Use the pylintrc file from the Google Python Style Guide
13+
pylint --rcfile=pylintrc orbitpy tests slowtests examples # Use the pylintrc file from the Google Python Style Guide
1414

1515
format:
16-
black orbitpy tests examples
16+
black orbitpy tests slowtests examples
1717

1818
docs:
1919
sphinx-build -b html docs/source docs/build

bin/run_mission.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
""" Script to run a mission from a JSON configuration file.
2+
See the `orbitpy.mission` module for details on the mission configuration schema.
3+
4+
The script expects a user directory as input, which should contain a `MissionSpecs.json`
5+
file with the mission configuration. The script will execute the mission and write the results
6+
to `MissionOutput.json` in the same directory.
7+
8+
Example usage:
9+
python bin/run_mission.py <path_to_user_directory>
10+
"""
111
import os
212
import json
313
import argparse
@@ -8,7 +18,6 @@
818

919
from orbitpy.mission import Mission
1020

11-
1221
def main(user_dir: str) -> None:
1322
"""
1423
Executes a mission according to an input JSON configuration file.
@@ -35,7 +44,7 @@ def main(user_dir: str) -> None:
3544
mission = Mission.from_dict(mission_dict)
3645

3746
print("Start mission.")
38-
results = mission.execute_all() # Assuming results are handled internally
47+
results = mission.execute_all()
3948

4049
elapsed_time = time.process_time() - start_time
4150
print(f"Mission complete. Time taken to execute in seconds: {elapsed_time:.2f}")
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"start_time": {
3+
"time_format": "GREGORIAN_DATE",
4+
"calendar_date": "2025-01-08T07:00:00.00",
5+
"time_scale": "UTC"
6+
},
7+
"duration_days": 0.25,
8+
"spacecrafts": {
9+
"relative_file_path": "cygnss_spacecrafts.json"
10+
},
11+
"gnss_spacecrafts": {
12+
"relative_file_path": "gnss_spacecrafts.json"
13+
},
14+
"ground_stations": {
15+
"relative_file_path": "ground_stations.json"
16+
},
17+
"propagator": {
18+
"propagator_type": "SGP4_PROPAGATOR",
19+
"step_size": 60
20+
},
21+
"spatial_points": {
22+
"geographic_array": {
23+
"relative_file_path": "spatial_points.json"
24+
}
25+
},
26+
"settings": {
27+
"coverage_type": "SPECULAR_COVERAGE",
28+
"specular_radius_km": 25.0,
29+
"spacetrack_credentials_relative_path": "../spacetrack/credentials.json"
30+
}
31+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
[
2+
{
3+
"name": "CYGFM01",
4+
"norad_id": "41887",
5+
"local_orbital_frame_handler": {
6+
"frame_type": "LVLH_TYPE_1",
7+
"name": "LVLH_CYGFM01"
8+
},
9+
"sensor": [{
10+
"fov": {
11+
"fov_type": "CIRCULAR",
12+
"diameter": 107.35,
13+
"frame": "LVLH_CYGFM01",
14+
"boresight": [0.0, 0.0, 1.0]
15+
}
16+
}
17+
]
18+
},
19+
{
20+
"name": "CYGFM02",
21+
"norad_id": "41886",
22+
"local_orbital_frame_handler": {
23+
"frame_type": "LVLH_TYPE_1",
24+
"name": "LVLH_CYGFM02"
25+
},
26+
"sensor": [{
27+
"fov": {
28+
"fov_type": "CIRCULAR",
29+
"diameter": 107.35,
30+
"frame": "LVLH_CYGFM02",
31+
"boresight": [0.0, 0.0, 1.0]
32+
}
33+
}
34+
]
35+
},
36+
{
37+
"name": "CYGFM03",
38+
"norad_id": "41891",
39+
"local_orbital_frame_handler": {
40+
"frame_type": "LVLH_TYPE_1",
41+
"name": "LVLH_CYGFM03"
42+
},
43+
"sensor": [{
44+
"fov": {
45+
"fov_type": "CIRCULAR",
46+
"diameter": 107.35,
47+
"frame": "LVLH_CYGFM03",
48+
"boresight": [0.0, 0.0, 1.0]
49+
}
50+
}
51+
]
52+
},
53+
{
54+
"name": "CYGFM04",
55+
"norad_id": "41885",
56+
"local_orbital_frame_handler": {
57+
"frame_type": "LVLH_TYPE_1",
58+
"name": "LVLH_CYGFM04"
59+
},
60+
"sensor": [{
61+
"name": "GNSSR-B",
62+
"fov": {
63+
"fov_type": "CIRCULAR",
64+
"diameter": 107.35,
65+
"frame": "LVLH_CYGFM04",
66+
"boresight": [0.0, 0.0, 1.0]
67+
}
68+
}]
69+
},
70+
{
71+
"name": "CYGFM05",
72+
"norad_id": "41884",
73+
"local_orbital_frame_handler": {
74+
"frame_type": "LVLH_TYPE_1",
75+
"name": "LVLH_CYGFM05"
76+
},
77+
"sensor": [{
78+
"fov": {
79+
"fov_type": "CIRCULAR",
80+
"diameter": 107.35,
81+
"frame": "LVLH_CYGFM05",
82+
"boresight": [0.0, 0.0, 1.0]
83+
}
84+
}]
85+
},
86+
{
87+
"name": "CYGFM07",
88+
"norad_id": "41890",
89+
"local_orbital_frame_handler": {
90+
"frame_type": "LVLH_TYPE_1",
91+
"name": "LVLH_CYGFM07"
92+
},
93+
"sensor": [{
94+
"fov": {
95+
"fov_type": "CIRCULAR",
96+
"diameter": 107.35,
97+
"frame": "LVLH_CYGFM07",
98+
"boresight": [0.0, 0.0, 1.0]
99+
}
100+
}]
101+
},
102+
{
103+
"name": "CYGFM08",
104+
"norad_id": "41888",
105+
"local_orbital_frame_handler": {
106+
"frame_type": "LVLH_TYPE_1",
107+
"name": "LVLH_CYGFM08"
108+
},
109+
"sensor": [{
110+
"fov": {
111+
"fov_type": "CIRCULAR",
112+
"diameter": 107.35,
113+
"frame": "LVLH_CYGFM08",
114+
"boresight": [0.0, 0.0, 1.0]
115+
}
116+
}]
117+
}
118+
]

0 commit comments

Comments
 (0)