Skip to content

Commit

Permalink
Merge pull request #73 from larshinueber/fix/minor-fixes
Browse files Browse the repository at this point in the history
Fix broken links in notebooks
  • Loading branch information
DominicDirkx authored Oct 29, 2024
2 parents b76c1dc + b3ce6d2 commit 2c08627
Show file tree
Hide file tree
Showing 24 changed files with 159 additions and 160 deletions.
26 changes: 14 additions & 12 deletions estimation/covariance_estimated_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"* how to **plot the correlation coefficients**;\n",
"* how to **plot the uncertainty ellipsoids**.\n",
"\n",
"For the **full estimation** of some selected parameteres, such as initial state, drag coefficient, and radiation pressure coefficient of a spacecraft, see [DELFI-C3 - Parameter Estimation Example](https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/notebooks/estimation/full_estimation_example.html).\n",
"For the **full estimation** of some selected parameters, such as initial state, drag coefficient, and radiation pressure coefficient of a spacecraft, see [DELFI-C3 - Parameter Estimation Example](full_estimation_example.ipynb).\n",
"\n",
"To simulate the orbit of a spacecraft, we will fall back and reiterate on all aspects of orbit propagation that are important within the scope of orbit estimation. Further, we will highlight all relevant features of modelling a tracking station on Earth. Using this station, we will simulate a tracking routine of the spacecraft using a series of instantaneous unbiased one-way Doppler range-rate measurements with uncertainty of 1 mm/s every 60 seconds. To assure an uninterrupted line-of-sight between the station and the spacecraft, a minimum elevation angle of more than 15 degrees above the horizon - as seen from the station - will be imposed as constraint on the simulation of observations.\n",
"\n",
Expand Down Expand Up @@ -67,7 +67,7 @@
"\n",
"Subsequently, the start and end epoch of the simulation and observations are defined.* Note that using `tudatpy`, the times are generally specified in seconds since J2000. Hence, setting the start epoch to `0` corresponds to the 1st of January 2000. The end epoch specifies a total duration of the simulation of four days.\n",
"\n",
"For more information on J2000 and the conversion between different temporal reference frames, please refer to the API documentation of the [`time_conversion module`](https://tudatpy.readthedocs.io/en/latest/time_conversion.html).\n",
"For more information on J2000 and the conversion between different temporal reference frames, please refer to the [API documentation](https://py.api.tudat.space/en/latest/time_conversion.html) of the `time_conversion` module.\n",
"\n",
"*Please note that it is always a good practice to separate the observation start and end epochs from the simulated ones. This way, we ensure that the times at which the observations are simulated all fall within the simulation timespan, especially given the geometry of the problem and the time difference at the two link ends (receiver and transmitter are separated by a certain distance). For this reason, we will set the first observation start epoch at one day after the simulation start epoch, and the observation end epoch at one day before the end of the simulation."
]
Expand Down Expand Up @@ -101,7 +101,7 @@
"### Create the main bodies\n",
"To create the systems of bodies for the simulation, one first has to define a list of strings of all bodies that are to be included. Note that the default body settings (such as atmosphere, body shape, rotation model) are taken from the `SPICE` kernel.\n",
"\n",
"These settings, however, can be adjusted. Please refer to the [Available Environment Models](https://tudat-space.readthedocs.io/en/latest/_src_user_guide/state_propagation/environment_setup/create_models/available.html#available-environment-models) in the user guide for more details."
"These settings, however, can be adjusted. Please refer to the [Available Environment Models](https://docs.tudat.space/en/latest/_src_user_guide/state_propagation/environment_setup/environment_models.html#available-model-types) in the user guide for more details."
]
},
{
Expand Down Expand Up @@ -335,7 +335,7 @@
"### Add a ground station\n",
"Trivially, the simulation of observations requires the extension of the current environment by at least one observer - a ground station. For this example, we will model a single ground station located in Delft, Netherlands, at an altitude of 0m, 52.00667°N, 4.35556°E.\n",
"\n",
"More information on how to use the `add_ground_station()` function can be found in the respective [API documentation](https://tudatpy.readthedocs.io/en/latest/environment_setup.html#tudatpy.numerical_simulation.environment_setup.add_ground_station)."
"More information on how to use the `add_ground_station()` function can be found in the respective [API documentation](https://py.api.tudat.space/en/latest/environment_setup.html#tudatpy.numerical_simulation.environment_setup.add_ground_station)."
]
},
{
Expand Down Expand Up @@ -472,10 +472,10 @@
"### Creating the Estimator object\n",
"Ultimately, the `Estimator` object consolidates all relevant information required for the estimation of any system parameter:\n",
" \n",
" 1) the environment (bodies)\n",
" 2) the parameter set (parameters_to_estimate)\n",
" 3) observation models (observation_settings_list)\n",
" 4) dynamical, numerical, and integrator setup (propagator_settings)\n",
"1) the environment (`bodies`)\n",
"2) the parameter set (`parameters_to_estimate`)\n",
"3) observation models (`observation_settings_list`)\n",
"4) dynamical, numerical, and integrator setup (`propagator_settings`)\n",
"\n",
"Underneath its hood, upon creation, the estimator automatically takes care of setting up the relevant Observation Simulator and Variational Equations which will subsequently be required for the simulation of observations and the estimation of parameters, respectively."
]
Expand Down Expand Up @@ -532,7 +532,7 @@
"metadata": {},
"source": [
"## Perform the covariance analysis\n",
"Having simulated the observations and created the `Estimator` object - containing the variational equations for the parameters to estimate - we have defined everything to conduct the actual estimation. Realise that up to this point, we have not yet specified whether we want to perform a covariance analysis or the full estimation of all parameters. It should be stressed that the general setup for either path to be followed is largely identical up to this point (see, for example, the [full estimation example](https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/tudatpy-examples/estimation/full_estimation_example.html)).\n",
"Having simulated the observations and created the `Estimator` object - containing the variational equations for the parameters to estimate - we have defined everything to conduct the actual estimation. Realise that up to this point, we have not yet specified whether we want to perform a covariance analysis or the full estimation of all parameters. It should be stressed that the general setup for either path to be followed is largely identical up to this point (see, for example, the [full estimation example](full_estimation_example.ipynb)).\n",
"\n",
"### Set up the inversion\n",
"To set up the inversion of the problem, we collect all relevant inputs in the form of a covariance input object and define some basic settings of the inversion. Most crucially, this is the step where we can account for different weights - if any - of the different observations, to give the estimator knowledge about the quality of the individual types of observations."
Expand Down Expand Up @@ -661,6 +661,7 @@
"source": [
"## Post-Processing Results\n",
"Perfect, we have got our results. Now it is time to make sense of them. To further process them, one can - exemplary - plot:\n",
"\n",
"1) the ellipsoidal confidence region defined by the covariance;\n",
"2) the behaviour of the simulated observations over time;\n",
"3) the history of the residuals;\n",
Expand Down Expand Up @@ -782,6 +783,7 @@
"Please note that, in our case, the space of parameters has dimension 8 (initial state + drag coefficient + gravitational parameter), but we will plot the ellipsoid obtained by restricting the problem to the **3 spatial dimensions only** (unless you can find a way to plot an 8D ellipsoid in python!)\n",
"\n",
"The plots will show, for each of the two matrices:\n",
"\n",
"1) the 3-sigma ellipsoid\n",
"2) the 1-sigma ellipsoid\n",
"3) the projections of both 1) and 2) on the x,y,z axes.\n",
Expand Down Expand Up @@ -960,9 +962,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "tudat-bundle",
"display_name": "Python 3",
"language": "python",
"name": "tudat-bundle"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -974,7 +976,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.10"
}
},
"nbformat": 4,
Expand Down
16 changes: 10 additions & 6 deletions estimation/covariance_propagation_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"# Covariance Propagation Using `Starlink-32101`\n",
"\n",
"## Objectives\n",
"This example will show you how to **propagate the covariance**. We will simulate a series of **one-way** open loop observing sessions of the ``Starlink-32101`` satellite, and we will see simulating a different number of observations affects the evolution of the **formal errors** over time. This example builds up on the [Starlink-32101 Covariance Analysis example](https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/notebooks/estimation/covariance_estimated_parameters.html), so go check that out if you haven't already! "
"This example will show you how to **propagate the covariance**. We will simulate a series of **one-way** open loop observing sessions of the ``Starlink-32101`` satellite, and we will see simulating a different number of observations affects the evolution of the **formal errors** over time. This example builds up on the [Starlink-32101 Covariance Analysis example](covariance_estimated_parameters.ipynb), so go check that out if you haven't already! "
]
},
{
Expand Down Expand Up @@ -66,7 +66,7 @@
"* **Single observation session**: from August 29, 2024 to `simulation_end_epoch`\n",
"\n",
"Please note that, in general, the satellite might not be visible during a full osbervation session. \n",
"For more information on J2000 and the conversion between different temporal reference frames, please refer to the API documentation of the [`time_conversion module`](https://tudatpy.readthedocs.io/en/latest/time_conversion.html)."
"For more information on J2000 and the conversion between different temporal reference frames, please refer to the API documentation of the [`time_conversion module`](https://py.api.tudat.space/en/latest/time_conversion.html)."
]
},
{
Expand Down Expand Up @@ -102,7 +102,7 @@
"### Create the main bodies\n",
"To create the systems of bodies for the simulation, one first has to define a list of strings of all bodies that are to be included. Note that the default body settings (such as atmosphere, body shape, rotation model) are taken from the `SPICE` kernel.\n",
"\n",
"These settings, however, can be adjusted. Please refer to the [Available Environment Models](https://tudat-space.readthedocs.io/en/latest/_src_user_guide/state_propagation/environment_setup/create_models/available.html#available-environment-models) in the user guide for more details."
"These settings, however, can be adjusted. Please refer to the [Available Environment Models](https://docs.tudat.space/en/latest/_src_user_guide/state_propagation/environment_setup/environment_models.html#available-model-types) in the user guide for more details."
]
},
{
Expand Down Expand Up @@ -199,12 +199,15 @@
"source": [
"### Create the acceleration model\n",
"Subsequently, all accelerations (and there settings) that act on ``Starlink-32101`` have to be defined. In particular, we will consider:\n",
"\n",
"* Gravitational acceleration using a spherical harmonic approximation up to 8th degree and order for Earth.\n",
"* Aerodynamic acceleration for Earth.\n",
"* Gravitational acceleration using a simple point mass model for:\n",
"\n",
" - The Sun\n",
" - The Moon\n",
" - Mars\n",
"\n",
"* Radiation pressure experienced by the spacecraft - shape-wise approximated as a spherical cannonball - due to the Sun.\n",
"\n",
"The defined acceleration settings are then applied to ``Starlink-32101`` by means of a dictionary, which is finally used as input to the propagation setup to create the acceleration models."
Expand Down Expand Up @@ -336,7 +339,7 @@
"### Add a ground station\n",
"Trivially, the simulation of observations requires the extension of the current environment by at least one observer - a ground station. For this example, we will model a single ground station located in Delft, Netherlands, at an altitude of 0m, 52.00667°N, 4.35556°E.\n",
"\n",
"More information on how to use the `add_ground_station()` function can be found in the respective [API documentation](https://tudatpy.readthedocs.io/en/latest/environment_setup.html#tudatpy.numerical_simulation.environment_setup.add_ground_station)."
"More information on how to use the `add_ground_station()` function can be found in the respective [API documentation](https://py.api.tudat.space/en/latest/environment_setup.html#tudatpy.numerical_simulation.environment_setup.add_ground_station)."
]
},
{
Expand Down Expand Up @@ -365,7 +368,7 @@
"metadata": {},
"source": [
"### Define Observation Links and Types\n",
"To establish the links between our ground station and ``Starlink-32101``, we will make use of the [observation module](https://py.api.tudat.space/en/latest/observation.html#observation) of tudat. In particular, we choose a one-way doppler observation mode, which means that the spacecraft effectively acts as a transmitter, while the antenna is the receiver. As already done in the [Starlink-32101 Covariance Analysis example](https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/notebooks/estimation/covariance_estimated_parameters.html), we will select an Earth Tracking Station located in Delft as a receiver. \n",
"To establish the links between our ground station and ``Starlink-32101``, we will make use of the [observation module](https://py.api.tudat.space/en/latest/observation.html#observation) of tudat. In particular, we choose a one-way doppler observation mode, which means that the spacecraft effectively acts as a transmitter, while the antenna is the receiver. As already done in the [Starlink-32101 Covariance Analysis example](covariance_estimated_parameters.ipynb), we will select an Earth Tracking Station located in Delft as a receiver. \n",
"\n",
"To fully define an observation model for a given link, we have to create a list of the observation model settings of all desired observable types and their associated links. This list will later be used as input to the actual estimator object.\n",
"\n",
Expand Down Expand Up @@ -400,6 +403,7 @@
"\n",
"#### 1 - Define Observation Simulation Settings\n",
"The observation simulation settings:\n",
"\n",
"1) allows for setting up of the **time intervals** at which observations are simulated (keep in mind the **three different observation scenarios** we want to simulate!);\n",
"2) allows for the definition of a noise level to simulate noisy observations\n",
"3) allows for the definition of the **viability criteria** and noise of the observation (we will set a minimum required elevation angle of **15 degrees**)\n",
Expand All @@ -414,7 +418,7 @@
"We collect all relevant inputs in the form of a covariance input, with the variance represented by the noise levels we chose earlier. This will be given as an input to the estimation process, to obtain `covariance_output = estimator.compute_covariance(covariance_input)`. The `covariance_output` will then become the initial covariance to be propagated by subsequent applications of the **state transition matrix**, initialized by the function `state_transition_interface` of the `estimator` object. \n",
"\n",
"#### 5 - Propagate the Covariances and the Formal Errors\n",
"Covariances and Formal Errors are propagated at the `output_times = simulation_times`, using the functions `propagate_covariance_split_output`, `propagate_formal_errors_split_output` (or `propagate_covariance`, `propagate_formal_errors`) of the estimation class, and through the above-defined state transition matrix. Please note that, in principle, one does not need to propagate the **formal errors** if the **propagated covariance** is already available. This is because the formal errors constitute the diagonal elements (**variances**) of the covariance matrix (to learn more about this, also check the [Starlink-32101 Parameter Estimation example](https://docs.tudat.space/en/latest/_src_getting_started/_src_examples/notebooks/estimation/full_estimation_example.html).)\n",
"Covariances and Formal Errors are propagated at the `output_times = simulation_times`, using the functions `propagate_covariance_split_output`, `propagate_formal_errors_split_output` (or `propagate_covariance`, `propagate_formal_errors`) of the estimation class, and through the above-defined state transition matrix. Please note that, in principle, one does not need to propagate the **formal errors** if the **propagated covariance** is already available. This is because the formal errors constitute the diagonal elements (**variances**) of the covariance matrix (to learn more about this, also check the [Starlink-32101 Parameter Estimation example](full_estimation_example.ipynb).)\n",
"\n",
"#### 6 - Append Results\n",
"We append the formal errors and the covariance obtained for each scenario to the respective lists: `formal_errors_list`, `covariances_list`."
Expand Down
Loading

0 comments on commit 2c08627

Please sign in to comment.