Skip to content

Commit 7710d6d

Browse files
authored
Merge pull request #124 from larshinueber/fix/sdbd-typo
Minor consistency updates
2 parents 516ef56 + 9fc9f0f commit 7710d6d

File tree

48 files changed

+394
-394
lines changed

Some content is hidden

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

48 files changed

+394
-394
lines changed

estimation/covariance_estimated_parameters.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
{
7575
"cell_type": "code",
76-
"execution_count": 2,
76+
"execution_count": null,
7777
"id": "e336516b",
7878
"metadata": {},
7979
"outputs": [],
@@ -82,11 +82,11 @@
8282
"spice.load_standard_kernels()\n",
8383
"\n",
8484
"# Set simulation start and end epochs\n",
85-
"simulation_start_epoch = DateTime(2000, 1, 1).epoch()\n",
86-
"simulation_end_epoch = DateTime(2000, 1, 5).epoch()\n",
85+
"simulation_start_epoch = DateTime(2000, 1, 1).to_epoch()\n",
86+
"simulation_end_epoch = DateTime(2000, 1, 5).to_epoch()\n",
8787
"\n",
88-
"observation_start_epoch = DateTime(2000, 1, 2).epoch()\n",
89-
"observation_end_epoch = DateTime(2000, 1, 4).epoch()"
88+
"observation_start_epoch = DateTime(2000, 1, 2).to_epoch()\n",
89+
"observation_end_epoch = DateTime(2000, 1, 4).to_epoch()"
9090
]
9191
},
9292
{
@@ -256,17 +256,17 @@
256256
},
257257
{
258258
"cell_type": "code",
259-
"execution_count": 7,
259+
"execution_count": null,
260260
"id": "12458abf",
261261
"metadata": {},
262262
"outputs": [],
263263
"source": [
264264
"# Retrieve the initial state of Delfi-C3 using Two-Line-Elements (TLEs)\n",
265-
"delfi_tle = environment.Tle(\n",
265+
"delfi_tle = environment_setup.ephemeris.sgp4(\n",
266266
" \"1 32789U 07021G 08119.60740078 -.00000054 00000-0 00000+0 0 9999\",\n",
267267
" \"2 32789 098.0082 179.6267 0015321 307.2977 051.0656 14.81417433 68\",\n",
268268
")\n",
269-
"delfi_ephemeris = environment.TleEphemeris(\"Earth\", \"J2000\", delfi_tle, False)\n",
269+
"delfi_ephemeris = environment_setup.create_body_ephemeris(delfi_tle, \"Delfi-C3\")\n",
270270
"initial_state = delfi_ephemeris.cartesian_state( simulation_start_epoch )"
271271
]
272272
},
@@ -975,7 +975,7 @@
975975
],
976976
"metadata": {
977977
"kernelspec": {
978-
"display_name": "Python 3 (ipykernel)",
978+
"display_name": "tudat-examples",
979979
"language": "python",
980980
"name": "python3"
981981
},
@@ -989,7 +989,7 @@
989989
"name": "python",
990990
"nbconvert_exporter": "python",
991991
"pygments_lexer": "ipython3",
992-
"version": "3.11.13"
992+
"version": "3.12.11"
993993
}
994994
},
995995
"nbformat": 4,

estimation/covariance_estimated_parameters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
spice.load_standard_kernels()
5757

5858
# Set simulation start and end epochs
59-
simulation_start_epoch = DateTime(2000, 1, 1).epoch()
60-
simulation_end_epoch = DateTime(2000, 1, 5).epoch()
59+
simulation_start_epoch = DateTime(2000, 1, 1).to_epoch()
60+
simulation_end_epoch = DateTime(2000, 1, 5).to_epoch()
6161

62-
observation_start_epoch = DateTime(2000, 1, 2).epoch()
63-
observation_end_epoch = DateTime(2000, 1, 4).epoch()
62+
observation_start_epoch = DateTime(2000, 1, 2).to_epoch()
63+
observation_end_epoch = DateTime(2000, 1, 4).to_epoch()
6464

6565

6666
"""
@@ -186,11 +186,11 @@
186186

187187

188188
# Retrieve the initial state of Delfi-C3 using Two-Line-Elements (TLEs)
189-
delfi_tle = environment.Tle(
189+
delfi_tle = environment_setup.ephemeris.sgp4(
190190
"1 32789U 07021G 08119.60740078 -.00000054 00000-0 00000+0 0 9999",
191191
"2 32789 098.0082 179.6267 0015321 307.2977 051.0656 14.81417433 68",
192192
)
193-
delfi_ephemeris = environment.TleEphemeris("Earth", "J2000", delfi_tle, False)
193+
delfi_ephemeris = environment_setup.create_body_ephemeris(delfi_tle, "Delfi-C3")
194194
initial_state = delfi_ephemeris.cartesian_state( simulation_start_epoch )
195195

196196

estimation/covariance_propagation_example.ipynb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"cell_type": "code",
73-
"execution_count": 2,
73+
"execution_count": null,
7474
"id": "e336516b",
7575
"metadata": {},
7676
"outputs": [],
@@ -79,14 +79,14 @@
7979
"spice.load_standard_kernels()\n",
8080
"\n",
8181
"# Set simulation start and end epochs\n",
82-
"simulation_start_epoch = DateTime(2024, 8, 28).epoch()\n",
83-
"simulation_end_epoch = DateTime(2024, 9, 5).epoch()\n",
84-
"observation_start_epoch_1 = DateTime(2024, 8, 30).epoch()\n",
85-
"observation_end_epoch_1 = DateTime(2024, 9, 1).epoch()\n",
86-
"observation_start_epoch_2 = DateTime(2024, 9, 3).epoch()\n",
87-
"observation_end_epoch_2 = DateTime(2024, 9, 4).epoch()\n",
88-
"\n",
89-
"observation_start_epoch_3 = DateTime(2024, 8, 29).epoch()\n",
82+
"simulation_start_epoch = DateTime(2024, 8, 28).to_epoch()\n",
83+
"simulation_end_epoch = DateTime(2024, 9, 5).to_epoch()\n",
84+
"observation_start_epoch_1 = DateTime(2024, 8, 30).to_epoch()\n",
85+
"observation_end_epoch_1 = DateTime(2024, 9, 1).to_epoch()\n",
86+
"observation_start_epoch_2 = DateTime(2024, 9, 3).to_epoch()\n",
87+
"observation_end_epoch_2 = DateTime(2024, 9, 4).to_epoch()\n",
88+
"\n",
89+
"observation_start_epoch_3 = DateTime(2024, 8, 29).to_epoch()\n",
9090
"observation_end_epoch_3 = simulation_end_epoch"
9191
]
9292
},
@@ -260,17 +260,17 @@
260260
},
261261
{
262262
"cell_type": "code",
263-
"execution_count": 7,
263+
"execution_count": null,
264264
"id": "12458abf",
265265
"metadata": {},
266266
"outputs": [],
267267
"source": [
268268
"# Retrieve the initial state of `Starlink-32101` using Two-Line-Elements (TLEs)\n",
269-
"Starlink_tle = environment.Tle(\n",
269+
"Starlink_tle = environment_setup.ephemeris.sgp4(\n",
270270
" \"1 60447U 24144Y 24239.91667824 -.00652022 00000-0 -25508-2 0 9990\",\n",
271271
" \"2 60447 53.1498 303.6008 0000548 88.4809 23.6264 15.87779028 3478\",\n",
272272
")\n",
273-
"Starlink_ephemeris = environment.TleEphemeris(\"Earth\", \"J2000\", Starlink_tle, False)\n",
273+
"Starlink_ephemeris = environment_setup.create_body_ephemeris(Starlink_tle, \"Starlink-32101\")\n",
274274
"initial_state = Starlink_ephemeris.cartesian_state( simulation_start_epoch )"
275275
]
276276
},
@@ -756,7 +756,7 @@
756756
],
757757
"metadata": {
758758
"kernelspec": {
759-
"display_name": "Python 3 (ipykernel)",
759+
"display_name": "tudat-examples",
760760
"language": "python",
761761
"name": "python3"
762762
},
@@ -770,7 +770,7 @@
770770
"name": "python",
771771
"nbconvert_exporter": "python",
772772
"pygments_lexer": "ipython3",
773-
"version": "3.11.13"
773+
"version": "3.12.11"
774774
}
775775
},
776776
"nbformat": 4,

estimation/covariance_propagation_example.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
spice.load_standard_kernels()
5454

5555
# Set simulation start and end epochs
56-
simulation_start_epoch = DateTime(2024, 8, 28).epoch()
57-
simulation_end_epoch = DateTime(2024, 9, 5).epoch()
58-
observation_start_epoch_1 = DateTime(2024, 8, 30).epoch()
59-
observation_end_epoch_1 = DateTime(2024, 9, 1).epoch()
60-
observation_start_epoch_2 = DateTime(2024, 9, 3).epoch()
61-
observation_end_epoch_2 = DateTime(2024, 9, 4).epoch()
62-
63-
observation_start_epoch_3 = DateTime(2024, 8, 29).epoch()
56+
simulation_start_epoch = DateTime(2024, 8, 28).to_epoch()
57+
simulation_end_epoch = DateTime(2024, 9, 5).to_epoch()
58+
observation_start_epoch_1 = DateTime(2024, 8, 30).to_epoch()
59+
observation_end_epoch_1 = DateTime(2024, 9, 1).to_epoch()
60+
observation_start_epoch_2 = DateTime(2024, 9, 3).to_epoch()
61+
observation_end_epoch_2 = DateTime(2024, 9, 4).to_epoch()
62+
63+
observation_start_epoch_3 = DateTime(2024, 8, 29).to_epoch()
6464
observation_end_epoch_3 = simulation_end_epoch
6565

6666

@@ -190,11 +190,11 @@
190190

191191

192192
# Retrieve the initial state of `Starlink-32101` using Two-Line-Elements (TLEs)
193-
Starlink_tle = environment.Tle(
193+
Starlink_tle = environment_setup.ephemeris.sgp4(
194194
"1 60447U 24144Y 24239.91667824 -.00652022 00000-0 -25508-2 0 9990",
195195
"2 60447 53.1498 303.6008 0000548 88.4809 23.6264 15.87779028 3478",
196196
)
197-
Starlink_ephemeris = environment.TleEphemeris("Earth", "J2000", Starlink_tle, False)
197+
Starlink_ephemeris = environment_setup.create_body_ephemeris(Starlink_tle, "Starlink-32101")
198198
initial_state = Starlink_ephemeris.cartesian_state( simulation_start_epoch )
199199

200200

estimation/estimation_dynamical_models.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
{
8585
"cell_type": "code",
86-
"execution_count": 2,
86+
"execution_count": null,
8787
"metadata": {},
8888
"outputs": [],
8989
"source": [
@@ -92,8 +92,8 @@
9292
"spice.load_kernel(current_directory + \"/ORMM_T19_031222180906_00052.BSP\")\n",
9393
"\n",
9494
"# Set simulation start (January 1st, 2004 - 00:00) and end epochs (January 11th, 2004 - 00:00)\n",
95-
"simulation_start_epoch = DateTime(2004, 1, 1).epoch()\n",
96-
"simulation_end_epoch = DateTime(2004, 1, 11).epoch()\n",
95+
"simulation_start_epoch = DateTime(2004, 1, 1).to_epoch()\n",
96+
"simulation_end_epoch = DateTime(2004, 1, 11).to_epoch()\n",
9797
"\n",
9898
"### CELESTIAL BODIES ###\n",
9999
"# Create default body settings for \"Mars\", \"Phobos\", \"Deimos\", \"Sun\", \"Jupiter\", \"Earth\"\n",

estimation/estimation_dynamical_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
spice.load_kernel(current_directory + "/ORMM_T19_031222180906_00052.BSP")
5353

5454
# Set simulation start (January 1st, 2004 - 00:00) and end epochs (January 11th, 2004 - 00:00)
55-
simulation_start_epoch = DateTime(2004, 1, 1).epoch()
56-
simulation_end_epoch = DateTime(2004, 1, 11).epoch()
55+
simulation_start_epoch = DateTime(2004, 1, 1).to_epoch()
56+
simulation_end_epoch = DateTime(2004, 1, 11).to_epoch()
5757

5858
### CELESTIAL BODIES ###
5959
# Create default body settings for "Mars", "Phobos", "Deimos", "Sun", "Jupiter", "Earth"

estimation/estimation_with_mpc.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"### Setting some constants\n",
8080
"Let's setup some constants that are used throughout the tutorial. The **MPC code** for Eros is 433. We also set a start and end date for our observations, the number of iterations for our estimation, a timestep for our integrator and a 1 month buffer to avoid interpolation errors in our analysis.\n",
8181
"\n",
82-
"We use a spice kernel to get a guess for our initial state and to check our estimation afterwards. The default spice kernel `codes_300ast_20100725.bsp` contains many popular asteroids, however they are not all identified by name (433 Eros is `\"Eros\"` but 16 Psyche is `\"2000016\"` etc.). To ensure this example works dynamically, for any single MPC code as input we use the SDBD to retrieve the name and SPK-ID used for the spice kernel.\n",
82+
"We use a spice kernel to get a guess for our initial state and to check our estimation afterwards. The default spice kernel `codes_300ast_20100725.bsp` contains many popular asteroids, however they are not all identified by name (433 Eros is `\"Eros\"` but 16 Psyche is `\"2000016\"` etc.). To ensure this example works dynamically, for any single MPC code as input we use the SBDB to retrieve the name and SPK-ID used for the spice kernel.\n",
8383
"\n",
8484
"For our frame origin we use the Solar System Barycenter. The data from MPC is presented in the J2000 reference frame, currently BatchMPC does not support conversion to other reference frames and as such we match it in our environment. "
8585
]

estimation/estimation_with_mpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
### Setting some constants
5656
Let's setup some constants that are used throughout the tutorial. The **MPC code** for Eros is 433. We also set a start and end date for our observations, the number of iterations for our estimation, a timestep for our integrator and a 1 month buffer to avoid interpolation errors in our analysis.
5757
58-
We use a spice kernel to get a guess for our initial state and to check our estimation afterwards. The default spice kernel `codes_300ast_20100725.bsp` contains many popular asteroids, however they are not all identified by name (433 Eros is `"Eros"` but 16 Psyche is `"2000016"` etc.). To ensure this example works dynamically, for any single MPC code as input we use the SDBD to retrieve the name and SPK-ID used for the spice kernel.
58+
We use a spice kernel to get a guess for our initial state and to check our estimation afterwards. The default spice kernel `codes_300ast_20100725.bsp` contains many popular asteroids, however they are not all identified by name (433 Eros is `"Eros"` but 16 Psyche is `"2000016"` etc.). To ensure this example works dynamically, for any single MPC code as input we use the SBDB to retrieve the name and SPK-ID used for the spice kernel.
5959
6060
For our frame origin we use the Solar System Barycenter. The data from MPC is presented in the J2000 reference frame, currently BatchMPC does not support conversion to other reference frames and as such we match it in our environment.
6161
"""

estimation/full_estimation_example.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@
9797
},
9898
{
9999
"cell_type": "code",
100-
"execution_count": 4,
100+
"execution_count": null,
101101
"id": "baedd9b2",
102102
"metadata": {},
103103
"outputs": [],
104104
"source": [
105105
"# Set simulation start and end epochs\n",
106106
"time_buffer = 10\n",
107-
"simulation_start_epoch = DateTime(2000, 1, 1).epoch() - time_buffer\n",
108-
"simulation_end_epoch = DateTime(2000, 1, 4).epoch() + time_buffer"
107+
"simulation_start_epoch = DateTime(2000, 1, 1).to_epoch() - time_buffer\n",
108+
"simulation_end_epoch = DateTime(2000, 1, 4).to_epoch() + time_buffer"
109109
]
110110
},
111111
{
@@ -391,19 +391,19 @@
391391
},
392392
{
393393
"cell_type": "code",
394-
"execution_count": 19,
394+
"execution_count": null,
395395
"id": "e381be97",
396396
"metadata": {
397397
"lines_to_next_cell": 2
398398
},
399399
"outputs": [],
400400
"source": [
401401
"# Retrieve the initial state of Delfi-C3 using Two-Line-Elements (TLEs)\n",
402-
"delfi_tle = environment.Tle(\n",
402+
"delfi_tle = environment_setup.ephemeris.sgp4(\n",
403403
" \"1 32789U 07021G 08119.60740078 -.00000054 00000-0 00000+0 0 9999\",\n",
404404
" \"2 32789 098.0082 179.6267 0015321 307.2977 051.0656 14.81417433 68\",\n",
405405
")\n",
406-
"delfi_ephemeris = environment.TleEphemeris(\"Earth\", \"J2000\", delfi_tle, False)\n",
406+
"delfi_ephemeris = environment_setup.create_body_ephemeris(delfi_tle, \"Delfi-C3\")\n",
407407
"initial_state = delfi_ephemeris.cartesian_state( simulation_start_epoch )"
408408
]
409409
},

estimation/full_estimation_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060

6161
# Set simulation start and end epochs
6262
time_buffer = 10
63-
simulation_start_epoch = DateTime(2000, 1, 1).epoch() - time_buffer
64-
simulation_end_epoch = DateTime(2000, 1, 4).epoch() + time_buffer
63+
simulation_start_epoch = DateTime(2000, 1, 1).to_epoch() - time_buffer
64+
simulation_end_epoch = DateTime(2000, 1, 4).to_epoch() + time_buffer
6565

6666

6767
"""
@@ -215,11 +215,11 @@
215215

216216

217217
# Retrieve the initial state of Delfi-C3 using Two-Line-Elements (TLEs)
218-
delfi_tle = environment.Tle(
218+
delfi_tle = environment_setup.ephemeris.sgp4(
219219
"1 32789U 07021G 08119.60740078 -.00000054 00000-0 00000+0 0 9999",
220220
"2 32789 098.0082 179.6267 0015321 307.2977 051.0656 14.81417433 68",
221221
)
222-
delfi_ephemeris = environment.TleEphemeris("Earth", "J2000", delfi_tle, False)
222+
delfi_ephemeris = environment_setup.create_body_ephemeris(delfi_tle, "Delfi-C3")
223223
initial_state = delfi_ephemeris.cartesian_state( simulation_start_epoch )
224224

225225

0 commit comments

Comments
 (0)