├── docs ├── source │ ├── _snippets │ │ ├── astrodynamics │ │ │ ├── two_body_dynamics │ │ │ │ ├── gravity_assist.py │ │ │ │ ├── req_gravity_assist_beginner.py │ │ │ │ ├── req_capture_escape_beginner.py │ │ │ │ ├── req_lambert_targeter_beginner.py │ │ │ │ ├── lambert_targeter.py │ │ │ │ ├── req_gravity_assist_advanced.py │ │ │ │ ├── req_capture_escape_advanced.py │ │ │ │ ├── req_lambert_targeter_advanced.py │ │ │ │ └── capture_escape.py │ │ │ └── manual_node_leg_settings.py │ │ ├── simulation │ │ │ ├── integrator_setup │ │ │ │ ├── req_integrator_setup_after.py │ │ │ │ ├── req_integrator_setup.py │ │ │ │ ├── euler.py │ │ │ │ ├── runge_kutta_4.py │ │ │ │ ├── adams_bashforth_moulton.py │ │ │ │ ├── bulirsch_stoer.py │ │ │ │ └── runge_kutta_fehlberg.py │ │ │ ├── environment_setup │ │ │ │ ├── environment_models │ │ │ │ │ ├── req_environment_models.py │ │ │ │ │ ├── tabulated_rotation_model.py │ │ │ │ │ ├── req_environment_models_after.py │ │ │ │ │ ├── custom_wind_model.py │ │ │ │ │ ├── multi_arc_ephemeris.cpp │ │ │ │ │ ├── nrlmsise-00.py │ │ │ │ │ ├── multi_arc_ephemeris.py │ │ │ │ │ ├── nrlmsise-00.cpp │ │ │ │ │ ├── spherical_body_shape_model_spice.py │ │ │ │ │ ├── custom_wind_model.cpp │ │ │ │ │ ├── point_mass_gravity_spice.py │ │ │ │ │ ├── point_mass_gravity_spice.cpp │ │ │ │ │ ├── spherical_body_shape_model_spice.cpp │ │ │ │ │ ├── spherical_body_shape_model.py │ │ │ │ │ ├── approximate_planet_positions_ephemeris_alt.py │ │ │ │ │ ├── spherical_body_shape_model.cpp │ │ │ │ │ ├── custom_wind_model.py.autosave │ │ │ │ │ ├── point_mass_gravity.py │ │ │ │ │ ├── point_mass_gravity.cpp │ │ │ │ │ ├── custom_ephemeris.py │ │ │ │ │ ├── approximate_planet_positions_ephemeris.py │ │ │ │ │ ├── approximate_planet_positions_ephemeris.cpp │ │ │ │ │ ├── custom_ephemeris.cpp │ │ │ │ │ ├── direct_spice_ephemeris.py │ │ │ │ │ ├── oblate_spherical_body_shape_model.py │ │ │ │ │ ├── tabulated_rotation_model.cpp │ │ │ │ │ ├── spice_rotation_model.py │ │ │ │ │ ├── direct_spice_ephemeris.cpp │ │ │ │ │ ├── gravity_field_tides_simple.py │ │ │ │ │ ├── oblate_spherical_body_shape_model.cpp │ │ │ │ │ ├── spice_rotation_model.cpp │ │ │ │ │ ├── gravity_field_tides_multiple_degrees.py │ │ │ │ │ ├── tabulated_ephemeris.py │ │ │ │ │ ├── gravity_field_tides_multiple_orders.py │ │ │ │ │ ├── constant_ephemeris.py │ │ │ │ │ ├── direct_spice_ephemeris_alt.py │ │ │ │ │ ├── scaled_atmosphere.py │ │ │ │ │ ├── gcrs_to_itrs_rotation_model.cpp │ │ │ │ │ ├── constant_rotation_model.py │ │ │ │ │ ├── scaled_ephemeris.py │ │ │ │ │ ├── synchronous_rotation_model.py │ │ │ │ │ ├── syncrhonous_rotation_model.py │ │ │ │ │ ├── gcrs_to_itrs_rotation_model.py │ │ │ │ │ ├── constant_ephemeris.cpp │ │ │ │ │ ├── tabulated_ephemeris.cpp │ │ │ │ │ ├── interpolated_spice_ephemeris.py │ │ │ │ │ ├── simple_spice_rotation_model.py │ │ │ │ │ ├── exponential_atmosphere.py │ │ │ │ │ ├── exponential_atmosphere_simple.py │ │ │ │ │ ├── simple_rotation_model.py │ │ │ │ │ ├── constant_aerodynamic_coefficients.cpp │ │ │ │ │ ├── exponential_atmosphere.cpp │ │ │ │ │ ├── interpolated_spice_ephemeris.cpp │ │ │ │ │ ├── constant_aerodynamic_coefficients.py │ │ │ │ │ ├── custom_constant_temperature_atmosphere.py │ │ │ │ │ ├── tabulate_gravity_variations.py │ │ │ │ │ ├── kepler_ephemeris_spice.py │ │ │ │ │ ├── simple_rotation_model.cpp │ │ │ │ │ ├── spherical_harmonic_triaxial_body.py │ │ │ │ │ ├── cannonball_radiation_pressure.py │ │ │ │ │ ├── kepler_ephemeris.py │ │ │ │ │ ├── cannonball_radiation_pressure.cpp │ │ │ │ │ ├── kepler_ephemeris.cpp │ │ │ │ │ ├── spherical_harmonics_gravity.py │ │ │ │ │ ├── spherical_harmonics_gravity.cpp │ │ │ │ │ ├── panelled_radiation_pressure.py │ │ │ │ │ ├── radiation_source_point.cpp │ │ │ │ │ ├── custom_constant_temperature_atmosphere.cpp │ │ │ │ │ ├── solar_sail_radiation_pressure.py │ │ │ │ │ ├── radiation_pressure_target_cannonball.cpp │ │ │ │ │ ├── solar_sail_radiation_pressure.cpp │ │ │ │ │ ├── radiation_pressure_target_paneled.cpp │ │ │ │ │ ├── panelled_radiation_pressure.cpp │ │ │ │ │ └── radiation_source_extended.cpp │ │ │ │ ├── add_body.py │ │ │ │ ├── req_finalize_bodies.py │ │ │ │ ├── finalize_bodies.cpp │ │ │ │ ├── create_system_of_bodies.py │ │ │ │ ├── req_create_vehicle.py │ │ │ │ ├── override_default_parameters.py │ │ │ │ ├── req_finalize_bodies.cpp │ │ │ │ ├── override_default.py │ │ │ │ ├── req_create_bodies.cpp │ │ │ │ ├── req_create_bodies.py │ │ │ │ ├── body_list_settings_manual.py │ │ │ │ ├── req_create_vehicle.cpp │ │ │ │ ├── adding_inertia_tensor.py │ │ │ │ ├── thrust_refactor │ │ │ │ │ ├── guidance_class_old_linking.py │ │ │ │ │ ├── guidance_class_new.py │ │ │ │ │ ├── guidance_class_old.py │ │ │ │ │ ├── guidance_class_new_linking.py │ │ │ │ │ ├── thrust_acceleration_old.py │ │ │ │ │ └── thrust_acceleration_new.py │ │ │ │ ├── create_bodies_1.py │ │ │ │ ├── custom_atmosphere_example_use.py │ │ │ │ ├── default_bodies.py │ │ │ │ ├── create_vehicle.cpp │ │ │ │ ├── add_new_body_settings.py │ │ │ │ ├── adding_wind.py │ │ │ │ ├── add_ground_station.py │ │ │ │ ├── add_new_vehicle_settings.py │ │ │ │ ├── create_bodies_1.cpp │ │ │ │ ├── override_default_parameters_sh.py │ │ │ │ ├── full_multitype_setup.py │ │ │ │ ├── create_vehicle.py │ │ │ │ ├── default_bodies_time_interval.py │ │ │ │ ├── basic_translational_setup.py │ │ │ │ ├── custom_atmosphere_example.py │ │ │ │ ├── basic_multi_translational_setup.py │ │ │ │ ├── basic_multi_hierarchy_translational_setup.py │ │ │ │ ├── custom_class_single.py │ │ │ │ ├── custom_thrust_magnitude_example.py │ │ │ │ ├── torque_example.py │ │ │ │ ├── acceleration_example.py │ │ │ │ ├── aero_update_example.py │ │ │ │ ├── acceleration_example_multi_vehicle.py │ │ │ │ ├── coupled_thrust_aerodynamics_example.py │ │ │ │ ├── acceleration_example_multi.py │ │ │ │ ├── custom_ephemeris_example_class.py │ │ │ │ ├── add_body_properties.py │ │ │ │ ├── custom_ephemeris_example.py │ │ │ │ ├── custom_class_simple_aero_angles.py │ │ │ │ ├── custom_class_multiple.py │ │ │ │ ├── full_mass_setup.py │ │ │ │ ├── full_translational_setup.py │ │ │ │ └── full_rotational_setup.py │ │ │ ├── propagation_setup │ │ │ │ ├── thrust │ │ │ │ │ ├── thrust_mass_rate.cpp │ │ │ │ │ ├── thrust_vs_aero_orientation.cpp │ │ │ │ │ ├── custom_thrust_direction.cpp │ │ │ │ │ ├── thrust_orientation_body_fixed.cpp │ │ │ │ │ ├── custom_thrust_orientation.cpp │ │ │ │ │ ├── constant_magnitude.cpp │ │ │ │ │ ├── from_existing_orientation.cpp │ │ │ │ │ ├── custom_thrust_orientation.py │ │ │ │ │ ├── from_existing_orientation.py │ │ │ │ │ ├── thrust_direction_from_state_guidance.cpp │ │ │ │ │ ├── custom_magnitude.cpp │ │ │ │ │ ├── thrust_direction_from_state_guidance.py │ │ │ │ │ ├── constant_magnitude.py │ │ │ │ │ ├── thrust_accelerations_basic_syntax.cpp │ │ │ │ │ ├── custom_thrust_direction.py │ │ │ │ │ ├── custom_magnitude.py │ │ │ │ │ ├── thrust_mass_rate.py │ │ │ │ │ ├── thrust_accelerations_basic_syntax.py │ │ │ │ │ ├── thrust_orientation_body_fixed.py │ │ │ │ │ └── thrust_vs_aero_orientation.py │ │ │ │ ├── torque_models │ │ │ │ │ ├── custom_torque_example.py │ │ │ │ │ ├── aerodynamic_torque_example.py │ │ │ │ │ ├── seconddegree_torque_example.py │ │ │ │ │ ├── sphericalharmonics_torque_example.py │ │ │ │ │ ├── torque_setup_multi_vehicle.py │ │ │ │ │ ├── torque_setup.py │ │ │ │ │ └── torque_setup_multi.py │ │ │ │ ├── acceleration_models │ │ │ │ │ ├── aerodynamic.py │ │ │ │ │ ├── solar_sailing.py │ │ │ │ │ ├── point_mass_gravity.py │ │ │ │ │ ├── cannonball_radiation_pressure.py │ │ │ │ │ ├── panelled_radiation_pressure.py │ │ │ │ │ ├── relativistic_1.py │ │ │ │ │ ├── aerodynamic.cpp │ │ │ │ │ ├── solar_sailing.cpp │ │ │ │ │ ├── point_mass_gravity.cpp │ │ │ │ │ ├── relativistic_3.py │ │ │ │ │ ├── cannonball_radiation_pressure.cpp │ │ │ │ │ ├── panelled_radiation_pressure.cpp │ │ │ │ │ ├── spherical_harmonic_gravity.py │ │ │ │ │ ├── spherical_harmonic_gravity_zonal.py │ │ │ │ │ ├── direct_tidal_dissipation.py │ │ │ │ │ ├── req_acceleration_models_after.py │ │ │ │ │ ├── relativistic_2.py │ │ │ │ │ ├── direct_tidal_dissipation.cpp │ │ │ │ │ ├── spherical_harmonic_gravity.cpp │ │ │ │ │ ├── empirical.py │ │ │ │ │ ├── mutual_spherical_harmonic_gravity.py │ │ │ │ │ ├── mutual_spherical_harmonic_gravity.cpp │ │ │ │ │ ├── relativistic.py │ │ │ │ │ ├── empirical.cpp │ │ │ │ │ ├── quasi_impulsive_shot.py │ │ │ │ │ ├── mutual_third_body_spherical_harmonic_gravity.py │ │ │ │ │ ├── mutual_third_body_spherical_harmonic_gravity.cpp │ │ │ │ │ ├── relativistic.cpp │ │ │ │ │ ├── quasi_impulsive_shot.cpp │ │ │ │ │ ├── acceleration_example.py │ │ │ │ │ ├── acceleration_example_multi_vehicle.py │ │ │ │ │ └── acceleration_example_multi.py │ │ │ │ └── mass_models │ │ │ │ │ └── from_thrust_mass_rate.py │ │ │ ├── sensitivity_analysis │ │ │ │ ├── state_only_parameters.py │ │ │ │ └── full_parameter_settings.py │ │ │ ├── headers │ │ │ │ └── python │ │ │ │ │ └── import_statements.txt │ │ │ └── parallelization │ │ │ │ ├── general_bfe_example.py │ │ │ │ ├── mc_bfe_run.py │ │ │ │ ├── pygmo_batch_fitness.py │ │ │ │ ├── pg_bfe_evolve.py │ │ │ │ └── pg_archi.py │ │ ├── math │ │ │ └── interpolators │ │ │ │ ├── interpolator_import.py │ │ │ │ ├── basic_interpolation.py │ │ │ │ └── hermite_interpolation.py │ │ └── spice_interface │ │ │ └── test.py │ ├── _static │ │ ├── cover.png │ │ ├── cover_crop.png │ │ ├── cover_dark.png │ │ ├── pygmo_example_thumbnail.png │ │ ├── asteroid_example_thumbnail.png │ │ ├── estimation_example_thumbnail.png │ │ ├── propagation_example_thumbnail.png │ │ ├── mission_design_example_thumbnail.png │ │ ├── icons │ │ │ ├── README.md │ │ │ ├── code-solid.svg │ │ │ ├── rocket-solid.svg │ │ │ ├── laptop-code-solid.svg │ │ │ └── user-astronaut-solid.svg │ │ └── custom.css │ ├── user-guide │ │ ├── _static │ │ │ ├── flowchart.png │ │ │ ├── flowchart_var_eq.png │ │ │ ├── estimation_diagram.png │ │ │ ├── tudatpy_high_level.png │ │ │ └── tudatpy_high_level.drawio │ │ ├── advanced-topics │ │ │ └── _static │ │ │ │ ├── contour_himmelblau.png │ │ │ │ ├── fitness_himmelblau.png │ │ │ │ ├── one_minimum_himmelblau.png │ │ │ │ ├── pygmo_population.py │ │ │ │ ├── pygmo_problem.py │ │ │ │ ├── pygmo_algorithm.py │ │ │ │ ├── pygmo_evolution.py │ │ │ │ └── himmelblau_udp.py │ │ ├── state-propagation │ │ │ ├── _static │ │ │ │ └── tudatpy_environment.png │ │ │ ├── propagation-setup │ │ │ │ ├── _static │ │ │ │ │ ├── tudatpy_propagation_settings.png │ │ │ │ │ └── tudatpy_propagation_settings.drawio │ │ │ │ ├── translational │ │ │ │ │ └── _static │ │ │ │ │ │ └── gravitational_acceleration_general.png │ │ │ │ ├── dependent-variables.rst │ │ │ │ └── termination-settings.rst │ │ │ ├── propagating-variational-equations │ │ │ │ ├── single-arc-variational-propagation.rst │ │ │ │ └── parameter-settings.rst │ │ │ ├── propagating-variational-simulation.rst │ │ │ └── environment-setup │ │ │ │ └── environment-architecture.rst │ │ ├── prelim-mission-design │ │ │ └── _static │ │ │ │ └── MGA_legs_and_nodes.jpg │ │ ├── prelim-mission-design.rst │ │ ├── mathematics.rst │ │ └── state-propagation.rst │ ├── getting-started │ │ ├── _static │ │ │ ├── Pandas_Cheat_Sheet.pdf │ │ │ ├── quickstart_delfi-c3_trajectory.png │ │ │ ├── quickstart_delfi-c3_ground_track.png │ │ │ ├── environment.yaml │ │ │ ├── environment-dev.yaml │ │ │ ├── uninstall-osx.sh │ │ │ └── install-osx.sh │ │ ├── use-of-tools │ │ │ └── _static │ │ │ │ ├── forkingExample.png │ │ │ │ ├── gitAddExample.png │ │ │ │ ├── newRepository.png │ │ │ │ ├── conda-cheatsheet.pdf │ │ │ │ ├── gitStatusExample.png │ │ │ │ ├── jupyter_notebook.png │ │ │ │ ├── jupyterlab_launch.png │ │ │ │ ├── wsl_pycharm_conda.png │ │ │ │ ├── jupyterlab_notebook.png │ │ │ │ ├── pycharm_interpreter.png │ │ │ │ ├── pycharm_new_project.png │ │ │ │ ├── urlRepositoryImport.png │ │ │ │ ├── wsl_create_project.png │ │ │ │ ├── wsl_select_project.png │ │ │ │ ├── newRepositoryPrivate.png │ │ │ │ ├── wsl_vscode_connected.png │ │ │ │ ├── wsl_vscode_python_file.png │ │ │ │ ├── pycharm_set_environment.png │ │ │ │ ├── wsl_pycharm_interpreter.png │ │ │ │ ├── wsl_vscode_open_project.png │ │ │ │ ├── wsl_vscode_conda_environment.png │ │ │ │ └── wsl_vscode_install_extension.png │ │ └── using-source.rst │ ├── examples │ │ ├── doppler-data-analysis │ │ │ ├── output │ │ │ │ ├── GRAIL-Residuals-per-obs.png │ │ │ │ ├── GRAIL-Residuals-RMS-Mean.png │ │ │ │ ├── GRAIL-SPICE-fit-2012-04-06.png │ │ │ │ ├── GRAIL-SPICE-fit-2012-04-09.png │ │ │ │ ├── GRAIL-SPICE-fit-2012-04-10.png │ │ │ │ ├── GRAIL-SPICE-fit-2012-04-11.png │ │ │ │ ├── GRAIL-SPICE-fit-2012-04-12.png │ │ │ │ ├── GRAIL-Estimation-2012-04-06.png │ │ │ │ ├── GRAIL-Estimation-2012-04-09.png │ │ │ │ ├── GRAIL-Estimation-2012-04-10.png │ │ │ │ ├── GRAIL-Estimation-2012-04-11.png │ │ │ │ ├── GRAIL-Estimation-2012-04-12.png │ │ │ │ ├── MRO-Residuals-Averaged-Doppler.png │ │ │ │ ├── MRO-Residuals-Sequential-Range.png │ │ │ │ ├── MRO-Residuals-Averaged-Doppler-Overview.png │ │ │ │ ├── MRO-Residuals-Sequential-Range-Overview.png │ │ │ │ ├── MRO-Residuals-Averaged-Doppler-Residuals-one-day.png │ │ │ │ └── MRO-Residuals-Sequential-Range-Residuals-one-day.png │ │ │ ├── grail-residuals.rst │ │ │ ├── grail-odf-estimation.rst │ │ │ ├── grail-spice-fit.rst │ │ │ └── mro-residuals-analysis.rst │ │ ├── pygmo.rst │ │ ├── pygmo │ │ │ └── asteroid-orbit-optimization.rst │ │ ├── mission-design.rst │ │ ├── propagation.rst │ │ └── estimation.rst │ ├── index-about.rst │ ├── index-getting-started.rst │ └── index-examples.rst ├── environment.yaml ├── Makefile └── make.bat ├── cover.png ├── Tudat_mathematical_model_definition.pdf ├── .gitignore ├── .gitmodules ├── .readthedocs.yml ├── .bumpversion.cfg ├── CHANGELOG.rst └── README.md /docs/source/_snippets/astrodynamics/two_body_dynamics/gravity_assist.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/cover.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/req_integrator_setup_after.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_gravity_assist_beginner.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/req_environment_models.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/tabulated_rotation_model.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/req_environment_models_after.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/math/interpolators/interpolator_import.py: -------------------------------------------------------------------------------- 1 | from tudatpy.math import interpolators 2 | -------------------------------------------------------------------------------- /docs/source/_static/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/cover.png -------------------------------------------------------------------------------- /docs/source/_static/cover_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/cover_crop.png -------------------------------------------------------------------------------- /docs/source/_static/cover_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/cover_dark.png -------------------------------------------------------------------------------- /Tudat_mathematical_model_definition.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/Tudat_mathematical_model_definition.pdf -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_mass_rate.cpp: -------------------------------------------------------------------------------- 1 | // Oops, this snippet still has to be implemented... %! 2 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/add_body.py: -------------------------------------------------------------------------------- 1 | # Add empty body to simulation 2 | body_system.create_empty_body( "Vehicle" ) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_finalize_bodies.py: -------------------------------------------------------------------------------- 1 | # required import statements 2 | from tudatpy import environment_setup 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_vs_aero_orientation.cpp: -------------------------------------------------------------------------------- 1 | // Oops, this snippet still has to be implemented... %! 2 | -------------------------------------------------------------------------------- /docs/source/user-guide/_static/flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/_static/flowchart.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_thrust_direction.cpp: -------------------------------------------------------------------------------- 1 | CustomThrustDirectionSettings( 2 | thrustDirectionFunction ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_orientation_body_fixed.cpp: -------------------------------------------------------------------------------- 1 | // Oops, this snippet still has to be implemented... %! 2 | -------------------------------------------------------------------------------- /docs/source/_static/pygmo_example_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/pygmo_example_thumbnail.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/req_integrator_setup.py: -------------------------------------------------------------------------------- 1 | # import statements required 2 | from tudatpy.dynamics import propagation_setup 3 | -------------------------------------------------------------------------------- /docs/source/_static/asteroid_example_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/asteroid_example_thumbnail.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_wind_model.py: -------------------------------------------------------------------------------- 1 | environment_setup.set_custom_wind_model( bodies, "Earth", wind_function ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/finalize_bodies.cpp: -------------------------------------------------------------------------------- 1 | // finalize body creation 2 | setGlobalFrameBodyEphemerides(bodyMap, "SSB", "ECLIPJ2000"); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_thrust_orientation.cpp: -------------------------------------------------------------------------------- 1 | CustomThrustOrientationSettings( 2 | thrustOrientationFunction ); -------------------------------------------------------------------------------- /docs/source/_static/estimation_example_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/estimation_example_thumbnail.png -------------------------------------------------------------------------------- /docs/source/user-guide/_static/flowchart_var_eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/_static/flowchart_var_eq.png -------------------------------------------------------------------------------- /docs/source/_static/propagation_example_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/propagation_example_thumbnail.png -------------------------------------------------------------------------------- /docs/source/user-guide/_static/estimation_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/_static/estimation_diagram.png -------------------------------------------------------------------------------- /docs/source/user-guide/_static/tudatpy_high_level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/_static/tudatpy_high_level.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/multi_arc_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Earth" ]->ephemerisSettings-> resetMakeMultiArcEphemeris( true ); -------------------------------------------------------------------------------- /docs/source/_static/mission_design_example_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/_static/mission_design_example_thumbnail.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /docs/build/ 2 | 3 | 4 | .idea 5 | .DS_Store 6 | .vscode/ 7 | 8 | # Jupyter notebook checkpoints 9 | .ipynb_checkpoints/* 10 | */.ipynb_checkpoints/* 11 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/nrlmsise-00.py: -------------------------------------------------------------------------------- 1 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.nrlmsise00() -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/custom_torque_example.py: -------------------------------------------------------------------------------- 1 | #torque_settings_vehicle = dict( 2 | # Earth = [ propagation_setup.torque. ] 3 | #) -------------------------------------------------------------------------------- /docs/source/getting-started/_static/Pandas_Cheat_Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/_static/Pandas_Cheat_Sheet.pdf -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/multi_arc_ephemeris.py: -------------------------------------------------------------------------------- 1 | body_settings.get( "Earth" ).ephemeris_settings = environment_setup.ephemeris.multi_arc( ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/constant_magnitude.cpp: -------------------------------------------------------------------------------- 1 | ConstantThrustMagnitudeSettings( 2 | thrustMagnitude, specificImpulse, bodyFixedThrustDirection ): -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/sensitivity_analysis/state_only_parameters.py: -------------------------------------------------------------------------------- 1 | parameter_settings = dynamics.parameters_setup.initial_states( 2 | propagator_settings, bodies ) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/nrlmsise-00.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Earth" ]->atmosphereSettings = std::make_shared< AtmosphereSettings >( nrlmsise00 ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/from_existing_orientation.cpp: -------------------------------------------------------------------------------- 1 | ThrustDirectionGuidanceSettings( 2 | thrust_direction_from_existing_body_orientation, "" ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_body_shape_model_spice.py: -------------------------------------------------------------------------------- 1 | body_settings.get( "Earth" ).shape_settings = environment_setup.shape.spherical_spice( ) -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/forkingExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/forkingExample.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/gitAddExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/gitAddExample.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/newRepository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/newRepository.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_wind_model.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Earth" ]->atmosphereSettings = std::make_shared< CustomWindModelSettings >( windFunction ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/aerodynamic_torque_example.py: -------------------------------------------------------------------------------- 1 | torque_settings_vehicle = dict( 2 | Earth = [ propagation_setup.torque.aerodynamic() ] 3 | ) 4 | -------------------------------------------------------------------------------- /docs/source/getting-started/_static/quickstart_delfi-c3_trajectory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/_static/quickstart_delfi-c3_trajectory.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/conda-cheatsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/conda-cheatsheet.pdf -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/gitStatusExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/gitStatusExample.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/jupyter_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/jupyter_notebook.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/jupyterlab_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/jupyterlab_launch.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_pycharm_conda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_pycharm_conda.png -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/contour_himmelblau.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/advanced-topics/_static/contour_himmelblau.png -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/fitness_himmelblau.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/advanced-topics/_static/fitness_himmelblau.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs/source/examples/tudatpy-examples"] 2 | path = docs/source/examples/tudatpy-examples 3 | url = https://github.com/tudat-team/tudatpy-examples.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/create_system_of_bodies.py: -------------------------------------------------------------------------------- 1 | # Create system of bodies from the body settings 2 | bodies = environment_setup.create_system_of_bodies(body_settings) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/point_mass_gravity_spice.py: -------------------------------------------------------------------------------- 1 | body_settings.get( "Earth" ).gravity_field_settings = environment_setup.gravity_field.central_spice( ) -------------------------------------------------------------------------------- /docs/source/getting-started/_static/quickstart_delfi-c3_ground_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/_static/quickstart_delfi-c3_ground_track.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/jupyterlab_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/jupyterlab_notebook.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/pycharm_interpreter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/pycharm_interpreter.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/pycharm_new_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/pycharm_new_project.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/urlRepositoryImport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/urlRepositoryImport.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_create_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_create_project.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_select_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_select_project.png -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/_static/tudatpy_environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/state-propagation/_static/tudatpy_environment.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/point_mass_gravity_spice.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Earth" ]->gravityFieldSettings = std::make_shared< GravityFieldSettings >( central_spice ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_create_vehicle.py: -------------------------------------------------------------------------------- 1 | # required import statements 2 | from tudatpy import environment_setup 3 | 4 | # prerequisite api steps 5 | # 1.1 create bodies 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/seconddegree_torque_example.py: -------------------------------------------------------------------------------- 1 | torque_settings_vehicle = dict( 2 | Earth = [ propagation_setup.torque.second_degree_gravitational() ] 3 | ) -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/newRepositoryPrivate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/newRepositoryPrivate.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_vscode_connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_vscode_connected.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_vscode_python_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_vscode_python_file.png -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/one_minimum_himmelblau.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/advanced-topics/_static/one_minimum_himmelblau.png -------------------------------------------------------------------------------- /docs/source/user-guide/prelim-mission-design/_static/MGA_legs_and_nodes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/prelim-mission-design/_static/MGA_legs_and_nodes.jpg -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_body_shape_model_spice.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Earth" ]->shapeModelSettings = std::make_shared< BodyShapeSettings >( spherical_spice ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/aerodynamic.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Earth = [ propagation_setup.acceleration.aerodynamic() ] 3 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/solar_sailing.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Sun = [ propagation_setup.acceleration.solar_sail() ] 3 | ) -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Residuals-per-obs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Residuals-per-obs.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/pycharm_set_environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/pycharm_set_environment.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_pycharm_interpreter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_pycharm_interpreter.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_vscode_open_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_vscode_open_project.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_thrust_orientation.py: -------------------------------------------------------------------------------- 1 | # Define thrust orientation settings based on a function of time 2 | thrust.custom_thrust_orientation(thrust_orientation_function) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/from_existing_orientation.py: -------------------------------------------------------------------------------- 1 | # Define thrust orientation settings based on the orientation of the body at hand 2 | thrust.thrust_from_existing_body_orientation() -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Residuals-RMS-Mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Residuals-RMS-Mean.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-06.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-09.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-10.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-11.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-SPICE-fit-2012-04-12.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/override_default_parameters.py: -------------------------------------------------------------------------------- 1 | # Modify the gravity field of the Sun 2 | body_settings.get( "Sun" ).gravity_field_settings.gravitational_parameter = 1.32712440042E20 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_finalize_bodies.cpp: -------------------------------------------------------------------------------- 1 | // required include statements 2 | #include 3 | 4 | // required using-declarations 5 | using namespace tudat; 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/point_mass_gravity.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Earth = [ propagation_setup.acceleration.point_mass_gravity( ) ] ) 3 | -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-06.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-09.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-10.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-11.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/GRAIL-Estimation-2012-04-12.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_vscode_conda_environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_vscode_conda_environment.png -------------------------------------------------------------------------------- /docs/source/getting-started/use-of-tools/_static/wsl_vscode_install_extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/getting-started/use-of-tools/_static/wsl_vscode_install_extension.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_body_shape_model.py: -------------------------------------------------------------------------------- 1 | body_radius = 6378.0E3 2 | 3 | body_settings.get( "Earth" ).shape_settings = environment_setup.shape.spherical( body_radius ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/override_default.py: -------------------------------------------------------------------------------- 1 | # Modify the gravity field of the Sun 2 | body_settings.get( "Sun" ).gravity_field_settings = environment_setup.gravity_field.central( 1.32712440042E20 ) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_direction_from_state_guidance.cpp: -------------------------------------------------------------------------------- 1 | ThrustDirectionFromStateGuidanceSettings( 2 | centralBodyName, isThurstInVelocityDirection, directionIsOppositeToVector ); -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/approximate_planet_positions_ephemeris_alt.py: -------------------------------------------------------------------------------- 1 | body_settings.get( 'Jupiter' ).ephemeris_settings = environment_setup.ephemeris.approximate_planet_positions( ) 2 | -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_capture_escape_beginner.py: -------------------------------------------------------------------------------- 1 | # required internal imports 2 | from tudatpy.astro import two_body_dynamics 3 | 4 | EARTH_R = 6371008.366666666 5 | EARTH_GM = 398600435436095.94 6 | -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/pygmo_population.py: -------------------------------------------------------------------------------- 1 | # Set population size 2 | pop_size = 1000 3 | # Set seed 4 | current_seed = 171015 5 | # Create population 6 | pop = pygmo.population(prob, size=pop_size, seed=current_seed) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_body_shape_model.cpp: -------------------------------------------------------------------------------- 1 | double bodyRadius = 6378.0E3; 2 | 3 | bodySettings[ "Earth" ]->shapeModelSettings = std::make_shared< SphericalBodyShapeSettings >( bodyRadius ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_create_bodies.cpp: -------------------------------------------------------------------------------- 1 | // required include statements 2 | #include 3 | 4 | // required using-declarations 5 | using tudat::simulation_setup; 6 | using tudat; 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/cannonball_radiation_pressure.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Sun = [ propagation_setup.acceleration.cannonball_radiation_pressure() ] 3 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/panelled_radiation_pressure.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Sun = [ propagation_setup.acceleration.panelled_radiation_pressure_() ] 3 | ) -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler-Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler-Overview.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range-Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range-Overview.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/relativistic_1.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Mars = [ propagation_setup.acceleration.relativistic_correction( 3 | use_schwarzschild = True ) ] ) 4 | -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/pygmo_problem.py: -------------------------------------------------------------------------------- 1 | import pygmo 2 | 3 | # Instantiation of the UDP problem 4 | udp = HimmelblauOptimization(-5.0, 5.0, -5.0, 5.0) 5 | 6 | # Creation of the pygmo problem object 7 | prob = pygmo.problem(udp) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_wind_model.py.autosave: -------------------------------------------------------------------------------- 1 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.exponential( 2 | density_scale_height, density_at_zero_altitude) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/point_mass_gravity.py: -------------------------------------------------------------------------------- 1 | gravitational_parameter = ... 2 | 3 | body_settings.get( "Earth" ).gravity_field_settings = environment_setup.gravity_field.central( gravitational_parameter ) 4 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagation-setup/_static/tudatpy_propagation_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/state-propagation/propagation-setup/_static/tudatpy_propagation_settings.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/point_mass_gravity.cpp: -------------------------------------------------------------------------------- 1 | double gravitationalParameter = ... 2 | 3 | bodySettings[ "Earth" ]->gravityFieldSettings = std::make_shared< CentralGravityFieldSettings >( gravitationalParameter ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_create_bodies.py: -------------------------------------------------------------------------------- 1 | # import statements required 2 | from tudatpy.dynamics import environment_setup 3 | from tudatpy.interface import spice 4 | 5 | # load spice kernels 6 | spice.load_standard_kernels() 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/aerodynamic.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | accelerationSettings[ "Apollo" ][ "Earth" ].push_back( 4 | std::make_shared< AccelerationSettings >( aerodynamic ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_magnitude.cpp: -------------------------------------------------------------------------------- 1 | FromFunctionThrustMagnitudeSettings( 2 | thrustMagnitudeFunction, specificImpulseFunction, 3 | isEngineOnFunction, bodyFixedThrustDirection, customUpdateFunction ); -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler-Residuals-one-day.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Averaged-Doppler-Residuals-one-day.png -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range-Residuals-one-day.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/examples/doppler-data-analysis/output/MRO-Residuals-Sequential-Range-Residuals-one-day.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/solar_sailing.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | accelerationSettings[ "Apollo" ][ "Sun" ].push_back( std::make_shared< AccelerationSettings >( solar_sail_acceleration ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/point_mass_gravity.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | accelerationSettings[ "Apollo" ][ "Earth" ].push_back( 4 | std::make_shared< AccelerationSettings >( central_gravity ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_ephemeris.py: -------------------------------------------------------------------------------- 1 | custom_state_function = ... 2 | 3 | body_settings.get( "Earth" ).ephemeris_settings = environment_setup.ephemeris.custom( 4 | custom_state_function, frame_origin, frame_orientation) 5 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/euler.py: -------------------------------------------------------------------------------- 1 | integrator_settings = propagation_setup.integrator.euler( 2 | initial_time, 3 | fixed_step_size, 4 | save_frequency = 1, 5 | assess_termination_on_minor_steps = false 6 | ) 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/approximate_planet_positions_ephemeris.py: -------------------------------------------------------------------------------- 1 | body_name_to_use = 'Jupiter' 2 | body_settings.get( 'CustomBody' ).ephemeris_settings = environment_setup.ephemeris.approximate_planet_positions( body_name_to_use ) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/relativistic_3.py: -------------------------------------------------------------------------------- 1 | acceleration_settings_on_vehicle = dict( 2 | Mars = [ propagation_setup.acceleration.relativistic_correction( 3 | use_de_sitter = True, de_sitter_central_body = 'Sun' ) ] ) 4 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_direction_from_state_guidance.py: -------------------------------------------------------------------------------- 1 | # Define thrust direction settings from state guidance 2 | thrust.thrust_direction_from_state_guidance(central_body, is_colinear_with_velocity=True, direction_is_opposite_to_vector=True) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/body_list_settings_manual.py: -------------------------------------------------------------------------------- 1 | # Manually create (empty) settings for a list of bodies, with origin/orientation Earth/J2000 2 | body_settings = environment_setup.BodyListSettings( frame_origin = "Earth", frame_orientation = "J2000" ) 3 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/approximate_planet_positions_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< ApproximatePlanetPositionSettings >( 2 | ephemerides::ApproximatePlanetPositionsBase::jupiter, false ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | std::shared_ptr< EphemerisSettings > customEphemerisSettings = 2 | std::make_shared< CustomEphemerisSettings >( 3 | customBoostFunction, frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/direct_spice_ephemeris.py: -------------------------------------------------------------------------------- 1 | frame_origin = 'SSB' 2 | frame_orientation = 'J2000' 3 | body_settings.get( 'Jupiter' ).ephemeris_settings = environment_setup.ephemeris.direct_spice( 4 | frame_origin, frame_orientation) 5 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/oblate_spherical_body_shape_model.py: -------------------------------------------------------------------------------- 1 | body_radius = 6378.0E3 2 | body_flattening = 1.0 / 300.0 3 | 4 | body_settings.get( "Earth" ).shape_settings = environment_setup.shape.oblate_spherical( body_radius, body_flattening ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/tabulated_rotation_model.cpp: -------------------------------------------------------------------------------- 1 | std::shared_ptr< TabulatedRotationalEphemeris< double, double > > tabulatedEphemeris = 2 | std::make_shared< TabulatedRotationalEphemeris< double, double > >( rotationInterpolator ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/runge_kutta_4.py: -------------------------------------------------------------------------------- 1 | integrator_settings = propagation_setup.integrator.runge_kutta_4( 2 | initial_time, 3 | fixed_step_size, 4 | save_frequency = 1, 5 | assess_termination_on_minor_steps = false 6 | ) 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/sphericalharmonics_torque_example.py: -------------------------------------------------------------------------------- 1 | maximum_degree = 8 2 | maximum_order = 8 3 | torque_settings_moon = dict( 4 | Earth = [ propagation_setup.torque.spherical_harmonic_gravitational(maximum_degree, maximum_order) ] 5 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spice_rotation_model.py: -------------------------------------------------------------------------------- 1 | original_frame = "J2000" 2 | target_frame = "IAU_Earth" 3 | 4 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.spice( 5 | original_frame, target_frame) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/cannonball_radiation_pressure.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | accelerationSettings[ "Apollo" ][ "Sun" ].push_back( 4 | std::make_shared< AccelerationSettings >( cannon_ball_radiation_pressure ) ); -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagation-setup/translational/_static/gravitational_acceleration_general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudat-team/tudat-space/HEAD/docs/source/user-guide/state-propagation/propagation-setup/translational/_static/gravitational_acceleration_general.png -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/panelled_radiation_pressure.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | accelerationSettings[ "Apollo" ][ "Sun" ].push_back( 4 | std::make_shared< AccelerationSettings >( panelled_radiation_pressure_acceleration ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/req_create_vehicle.cpp: -------------------------------------------------------------------------------- 1 | // required standard library include statements 2 | #include 3 | 4 | // required tudat include statements 5 | #include 6 | 7 | // required namespace exposition 8 | using namespace tudat; 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/direct_spice_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | std::string frameOrigin = "SSB"; 2 | std::string frameOrientation = "J2000"; 3 | 4 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< DirectSpiceEphemerisSettings >( frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/gravity_field_tides_simple.py: -------------------------------------------------------------------------------- 1 | tide_raising_body = 'Sun' 2 | love_number = 0.3 3 | degree = 2 4 | gravity_field_variations.append( environment_setup.gravity_field_variation.solid_body_tide( 5 | tide_raising_body, love_number, degree ) ) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/spherical_harmonic_gravity.py: -------------------------------------------------------------------------------- 1 | maximum_degree = 12 2 | maximum_order = 12 3 | acceleration_settings_on_vehicle = dict( 4 | Earth = [ propagation_setup.acceleration.spherical_harmonic_gravity(maximum_degree, maximum_order) ] ) 5 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/oblate_spherical_body_shape_model.cpp: -------------------------------------------------------------------------------- 1 | double bodyRadius = 6378.0E3; 2 | double bodyFlattening = 1.0 / 300.0; 3 | 4 | bodySettings[ "Earth" ]->shapeModelSettings = std::make_shared< OblateSphericalBodyShapeSettings >( bodyRadius, bodyFlattening ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/spherical_harmonic_gravity_zonal.py: -------------------------------------------------------------------------------- 1 | maximum_degree = 4 2 | maximum_order = 0 3 | acceleration_settings_on_vehicle = dict( 4 | Earth = [ propagation_setup.acceleration.spherical_harmonic_gravity(maximum_degree, maximum_order) ] ) 5 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/headers/python/import_statements.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # IMPORT STATEMENTS ############################################################ 3 | ################################################################################ -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/direct_tidal_dissipation.py: -------------------------------------------------------------------------------- 1 | love_number = 0.1 2 | time_lag = 100.0 3 | 4 | acceleration_settings_on_Io = dict( 5 | Jupiter = [ propagation_setup.acceleration.direct_tidal_dissipation(love_number, time_lag, False, False) ] 6 | ) -------------------------------------------------------------------------------- /docs/environment.yaml: -------------------------------------------------------------------------------- 1 | name: tudat-docs 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.12 6 | - sphinx=7.4 7 | - pydata-sphinx-theme 8 | - sphinx-design=0.6 9 | - sphinx-copybutton=0.5 10 | - nbsphinx=0.9 11 | - ipython 12 | - ipykernel 13 | - pandoc 14 | - sphinx-codeautolink -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spice_rotation_model.cpp: -------------------------------------------------------------------------------- 1 | std::string originalFrame = "J2000"; 2 | std::string targetFrame = "IAU_Earth"; 3 | 4 | bodySettings[ "Earth" ]->rotationModelSettings = std::make_shared< RotationModelSettings >( spice_rotation_model, 5 | originalFrame, targetFrame ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/mass_models/from_thrust_mass_rate.py: -------------------------------------------------------------------------------- 1 | mass_rate_settings = dict(Vehicle=[propagation_setup.mass_rate.from_thrust()]) 2 | mass_rate_models = propagation_setup.create_mass_rate_models( 3 | system_of_bodies, 4 | mass_rate_settings, 5 | acceleration_models 6 | ) 7 | 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/adding_inertia_tensor.py: -------------------------------------------------------------------------------- 1 | # Add gravity field model settings to body of spherical harmonic type 2 | body_settings.get( "Mars" ).gravity_field = ... 3 | 4 | # Add setting for moment of inertia 5 | body_settings.get( "Mars" ).gravity_field.scaled_mean_moment_of_inertia = 0.365 6 | 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/gravity_field_tides_multiple_degrees.py: -------------------------------------------------------------------------------- 1 | tide_raising_body = 'Sun' 2 | love_numbers=thisdict = { 3 | 2: 0.3, 4 | 3: 0.1 } 5 | gravity_field_variations.append( environment_setup.gravity_field_variation.solid_body_tide( 6 | tide_raising_body, love_numbers ) ) 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/tabulated_ephemeris.py: -------------------------------------------------------------------------------- 1 | body_state_history = ... 2 | 3 | frame_origin = "SSB" 4 | frame_orientation = "J2000" 5 | 6 | body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.tabulated( body_state_history, 7 | frame_origin, frame_orientation ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/req_acceleration_models_after.py: -------------------------------------------------------------------------------- 1 | acceleration_settings = {"Apollo": acceleration_settings_on_vehicle} 2 | 3 | acceleration_models = propagation_setup.create_acceleration_models_dict( 4 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/pygmo_algorithm.py: -------------------------------------------------------------------------------- 1 | # Define number of generations 2 | number_of_generations = 1 3 | # Create Differential Evolution object by passing the number of generations as input 4 | de_algo = pygmo.de(gen=number_of_generations) 5 | # Create pygmo algorithm object 6 | algo = pygmo.algorithm(de_algo) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/gravity_field_tides_multiple_orders.py: -------------------------------------------------------------------------------- 1 | tide_raising_body = 'Sun' 2 | love_numbers = [ 0.31, 0.305, 0.308 ] 3 | degree = 2 4 | gravity_field_variations.append( environment_setup.gravity_field_variation.solid_body_tide( 5 | tide_raising_body, love_numbers, degree ) ) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/constant_ephemeris.py: -------------------------------------------------------------------------------- 1 | constant_cartesian_state = ... 2 | 3 | frame_origin = "SSB" 4 | frame_orientation = "J2000" 5 | 6 | body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.constant( constant_cartesian_state, 7 | frame_origin, frame_orientation) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/direct_spice_ephemeris_alt.py: -------------------------------------------------------------------------------- 1 | frame_origin = 'SSB' 2 | frame_orientation = 'J2000' 3 | body_name_to_use = 'Jupiter' 4 | body_settings.get( "CustomBody" ).ephemeris_settings = environment_setup.ephemeris.direct_spice( 5 | frame_origin, frame_orientation, body_name_to_use ) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/scaled_atmosphere.py: -------------------------------------------------------------------------------- 1 | scaling_constant = 1.5 2 | unscaled_atmosphere_settings = body_settings.get( 'Earth' ).atmosphere_settings; 3 | 4 | body_settings.get( 'Earth' ).atmosphere_settings = environment_setup.atmosphere.scaled( 5 | unscaled_atmosphere_settings, scaling_constant ) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/relativistic_2.py: -------------------------------------------------------------------------------- 1 | angular_momentum_vector = ... # 3D vector 2 | acceleration_settings_on_vehicle = dict( 3 | Mars = [ propagation_setup.acceleration.relativistic_correction( 4 | use_lense_thirring=True, lense_thirring_angular_momentum = angular_momentum_vector) ] ) 5 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: "ubuntu-22.04" 5 | tools: 6 | python: "mambaforge-22.9" 7 | 8 | conda: 9 | environment: docs/environment.yaml 10 | 11 | sphinx: 12 | builder: html 13 | configuration: docs/source/conf.py 14 | fail_on_warning: false 15 | 16 | submodules: 17 | include: all 18 | recursive: true -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/gcrs_to_itrs_rotation_model.cpp: -------------------------------------------------------------------------------- 1 | IAUConventions precessionNutationTheory = iau_2006; 2 | 3 | std::string originalFrame = "J2000"; 4 | 5 | bodySettings[ "Earth" ]->rotationModelSettings = boost::make_shared< GcrsToItrsRotationModelSettings >( 6 | precessionNutationTheory, originalFrame ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/direct_tidal_dissipation.cpp: -------------------------------------------------------------------------------- 1 | double loveNumber = 0.1; 2 | double timeLag = 100.0; 3 | 4 | SelectedAccelerationMap accelerationSettings; 5 | accelerationSettings[ "Io" ][ "Jupiter" ] = std::make_shared< DirectTidalDissipationAccelerationSettings >( 6 | loveNumber, timeLag, false, false ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/constant_rotation_model.py: -------------------------------------------------------------------------------- 1 | 2 | original_frame = "ECLIPJ2000" 3 | target_frame = "Earth_fixed" 4 | constant_orientation = ... 5 | 6 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.constant( 7 | original_frame, target_frame, constant_orientation ) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/scaled_ephemeris.py: -------------------------------------------------------------------------------- 1 | scaling_constant = 1.001 2 | unscaled_ephemeris_settings = body_settings.get( 'Jupiter' ).ephemeris_settings 3 | 4 | body_settings.get( 'Jupiter' ).ephemeris_settings = environment_setup.ephemeris.scaled( 5 | unscaled_ephemeris_settings, scaling_constant ) 6 | 7 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/synchronous_rotation_model.py: -------------------------------------------------------------------------------- 1 | 2 | original_frame = "ECLIPJ2000" 3 | target_frame = "Phobos_Fixed" 4 | central_body_name = "Mars" 5 | 6 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.synchronous( 7 | original_frame, target_frame, central_body_name) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/syncrhonous_rotation_model.py: -------------------------------------------------------------------------------- 1 | 2 | original_frame = "ECLIPJ2000" 3 | target_frame = "Phobos_Fixed" 4 | central_body_name = "Mars" 5 | 6 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.synchronous( 7 | original_frame, target_frame, central_body_name) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/spherical_harmonic_gravity.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | int maximumDegree = 12; 4 | int maximumOrder = 12; 5 | 6 | accelerationSettings[ "Apollo" ][ "Earth" ].push_back( 7 | std::make_shared< SphericalHarmonicAccelerationSettings >( maximumDegree, maximumOrder ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/constant_magnitude.py: -------------------------------------------------------------------------------- 1 | # Define constant thrust magnitude settings of 1.5kN, an Isp of 315s, and a deviation from the body-fixed x-axis of 0.1 rad. 2 | thrust.constant_thrust_magnitude( 3 | thrust_magnitude=1.5e3, 4 | specific_impulse=315, 5 | body_fixed_thrust_direction=[np.cos(0.1), np.sin(0.1), 0] 6 | ) -------------------------------------------------------------------------------- /docs/source/user-guide/prelim-mission-design.rst: -------------------------------------------------------------------------------- 1 | .. _prelim_mission_design: 2 | 3 | ************************** 4 | Preliminary Mission Design 5 | ************************** 6 | 7 | Different tools are available for preliminary mission design. These are discussed here. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | prelim-mission-design/mga-transfer 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/gcrs_to_itrs_rotation_model.py: -------------------------------------------------------------------------------- 1 | precession_nutation_theory = environment_setup.rotation_model.IAUConventions.iau_2006 2 | original_frame = "J2000" 3 | 4 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.gcrs_to_itrs( 5 | precession_nutation_theory, original_frame) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/constant_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | Eigen::Vector6d constantCartesianState = ... 2 | 3 | std::string frameOrigin = "SSB"; 4 | std::string frameOrientation = "J2000"; 5 | 6 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< ConstantEphemerisSettings >( 7 | constantCartesianState, frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/guidance_class_old_linking.py: -------------------------------------------------------------------------------- 1 | # Create the aerodynamic guidance object 2 | guidance_object = STSAerodynamicGuidance(bodies) 3 | 4 | # Set aerodynamic guidance (this line links the STSAerodynamicGuidance settings with the propagation) 5 | environment_setup.set_aerodynamic_guidance(guidance_object, bodies.get_body("STS")) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/tabulated_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | std::map< double, Eigen::Vector6d > bodyStateHistory ... 2 | 3 | std::string frameOrigin = "SSB" 4 | std::string frameOrientation = "J2000" 5 | 6 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< TabulatedEphemerisSettings >( 7 | bodyStateHistory, frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/empirical.py: -------------------------------------------------------------------------------- 1 | constant_acceleration = ... #3D vector 2 | sine_acceleration = ... #3D vector 3 | cosine_acceleration = ... #3D vector 4 | 5 | acceleration_settings_on_vehicle = dict( 6 | Vehicle = [ propagation_setup.acceleration.empirical( 7 | constant_acceleration, sine_acceleration, cosine_acceleration ) ] ) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/interpolated_spice_ephemeris.py: -------------------------------------------------------------------------------- 1 | initial_time = 0.0 2 | final_time = 1.0E8 3 | time_step = 3600.0 4 | 5 | frame_origin = "SSB" 6 | frame_orientation = "J2000" 7 | 8 | body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.interpolated_spice( 9 | initial_time, final_time, time_step, frame_origin, frame_orientation ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/create_bodies_1.py: -------------------------------------------------------------------------------- 1 | 2 | # define bodies in simulation 3 | bodies_to_create = ["Sun", "Earth", "Moon"] 4 | 5 | # create body settings dictionary 6 | body_settings = environment_setup.get_default_body_settings( 7 | bodies_to_create, "SSB", "J2000") 8 | 9 | # create body system 10 | bodies = environment_setup.create_system_of_bodies(body_settings) 11 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/simple_spice_rotation_model.py: -------------------------------------------------------------------------------- 1 | 2 | initial_time = ... 3 | original_frame = "J2000" 4 | target_frame = "IAU_Earth_Simplified" 5 | target_frame_spice = "IAU_Earth" 6 | 7 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.simple_from_spice( 8 | original_frame, target_frame, target_frame_spice, initial_time) 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_atmosphere_example_use.py: -------------------------------------------------------------------------------- 1 | density_function = ... 2 | constant_temperature = 250.0 3 | specific_gas_constant = 300.0 4 | ratio_of_specific_heats = 1.4 5 | 6 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.custom_constant_temperature( 7 | density_function, constant_temperature, specific_gas_constant, ratio_of_specific_heats) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/default_bodies.py: -------------------------------------------------------------------------------- 1 | # define bodies in simulation 2 | bodies_to_create = ["Sun", "Earth", "Moon", "Mars", "Jupiter"] 3 | 4 | # create body settings dictionary 5 | global_frame_origin = "SSB" 6 | global_frame_orientation = "J2000" 7 | body_settings = environment_setup.get_default_body_settings( 8 | bodies_to_create, global_frame_origin, global_frame_orientation) 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/exponential_atmosphere.py: -------------------------------------------------------------------------------- 1 | density_scale_height = 7.2E3 2 | constant_temperature = 290 3 | density_at_zero_altitude = 1.225 4 | specific_gas_constant = 287.06 5 | 6 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.exponential( 7 | density_scale_height, constant_temperature, density_at_zero_altitude, specific_gas_constant) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/create_vehicle.cpp: -------------------------------------------------------------------------------- 1 | // set vehicle mass variable 2 | double vehicleMass = 5.0E3; 3 | 4 | // set vehicle name variable 5 | std::string vehicleName = "Vehicle" 6 | 7 | // assign trivial body as vehicle 8 | bodyMap[vehicleName] = std::make_shared(); 9 | 10 | // set constant vehicle mass 11 | bodyMap[vehicleName]->setConstantBodyMass(vehicleMass); 12 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/exponential_atmosphere_simple.py: -------------------------------------------------------------------------------- 1 | density_scale_height = 7.2E3 2 | constant_temperature = 290 3 | density_at_zero_altitude = 1.225 4 | specific_gas_constant = 287.06 5 | 6 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.exponential( 7 | density_scale_height, constant_temperature, density_at_zero_altitude, specific_gas_constant) 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/simple_rotation_model.py: -------------------------------------------------------------------------------- 1 | initial_orientation = ... 2 | initial_time = ... 3 | rotation_rate = ... 4 | original_frame = "J2000" 5 | target_frame = "Earth_Fixed_Simplified" 6 | 7 | body_settings.get( "Earth" ).rotation_model_settings = environment_setup.rotation_model.simple( 8 | original_frame, target_frame, initial_orientation, initial_time, rotation_rate) 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/constant_aerodynamic_coefficients.cpp: -------------------------------------------------------------------------------- 1 | double referenceArea = 20.0; 2 | 3 | Eigen::Vector3d constantCoefficients; 4 | constantCoefficients( 0 ) = 1.5; 5 | constantCoefficients( 2 ) = 0.3; 6 | 7 | bodySettings[ "TestVehicle" ]->aerodynamicCoefficientSettings = std::make_shared< ConstantAerodynamicCoefficientSettings >( 8 | referenceArea, constantCoefficients, true, true ); -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/pygmo_evolution.py: -------------------------------------------------------------------------------- 1 | # Set number of evolutions 2 | number_of_evolutions = 100 3 | # Initialize empty containers 4 | individuals_list = [] 5 | fitness_list = [] 6 | # Evolve population multiple times 7 | for i in range(number_of_evolutions): 8 | pop = algo.evolve(pop) 9 | individuals_list.append(pop.get_x()[pop.best_idx()]) 10 | fitness_list.append(pop.get_f()[pop.best_idx()]) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/exponential_atmosphere.cpp: -------------------------------------------------------------------------------- 1 | double densityScaleHeight = 7.2E3; 2 | double constantTemperature = 290.0; 3 | double densityAtZeroAltitude = 1.225; 4 | double specificGasConstant = 287.06; 5 | 6 | bodySettings[ "Earth" ]->atmosphereSettings = std::make_shared< ExponentialAtmosphereSettings >( 7 | densityScaleHeight, constantTemperature, densityAtZeroAltitude, specificGasConstant ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/interpolated_spice_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | double initialTime = 0.0; 2 | double finalTime = 1.0E8; 3 | double timeStep = 3600.0; 4 | 5 | std::string frameOrigin = "SSB"; 6 | std::string frameOrientation = "J2000"; 7 | 8 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< InterpolatedSpiceEphemerisSettings >( 9 | initialTime, finalTime, timeStep, frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_accelerations_basic_syntax.cpp: -------------------------------------------------------------------------------- 1 | std::shared_ptr< ThrustDirectionGuidanceSettings > thrustDirectionSettings; 2 | std::shared_ptr< ThrustMagnitudeSettings > thrustMagnitudeSettings; 3 | 4 | SelectedAccelerationMap accelerationSettingsMap; 5 | accelerationSettingsMap[ "Vehicle" ][ "Vehicle" ].push_back( std::make_shared< ThrustAccelerationSettings >( thrustDirectionSettings, thrustMagnitudeSettings ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/constant_aerodynamic_coefficients.py: -------------------------------------------------------------------------------- 1 | reference_area = 20.0 2 | drag_coefficient = 1.5 3 | lift_coefficient = 0.3 4 | 5 | aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( 6 | reference_area, [ drag_coefficient, 0, lift_coefficient ] 7 | ) 8 | environment_setup.add_aerodynamic_coefficient_interface( 9 | bodies, "Spacecraft", aero_coefficient_settings ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/sensitivity_analysis/full_parameter_settings.py: -------------------------------------------------------------------------------- 1 | parameter_settings = dynamics.parameters_setup.initial_states( 2 | propagator_settings, bodies ) 3 | parameter_settings.append( dynamics.parameters_setup.gravitational_parameter("Earth") ) 4 | parameter_settings.append( dynamics.parameters_setup.constant_drag_coefficient("Delfi-C3") ) 5 | parameter_settings.append( dynamics.parameters_setup.radiation_pressure_coefficient("Delfi-C3") ) 6 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_constant_temperature_atmosphere.py: -------------------------------------------------------------------------------- 1 | density_function = ... 2 | constant_temperature = 250.0 3 | specific_gas_constant = 300.0 4 | ratio_of_specific_heats = 1.4 5 | 6 | body_settings.get( "Earth" ).atmosphere_settings = environment_setup.atmosphere.custom_constant_temperature( 7 | density_function, constant_temperature, specific_gas_constant, ratio_of_specific_heats) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/source/_static/icons/README.md: -------------------------------------------------------------------------------- 1 | # Icons 2 | All icons were retrieved from [FontAwesome](https://fontawesome.com/). 3 | Only free icons are used. 4 | According to their FAQ, these can be used and distributed in open source projects, see [their support page](https://fontawesome.com/support#can-i-use-font-awesome-free-in-open-source-projects). 5 | The license attribution is given in the meta data of the files, see the [free license](https://fontawesome.com/license/free). -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_lambert_targeter_beginner.py: -------------------------------------------------------------------------------- 1 | # required internal imports 2 | from tudatpy.astro import two_body_dynamics 3 | from tudatpy import constants 4 | 5 | INITIAL_EPOCH = 0.0 6 | FINAL_EPOCH = 600.0 * constants.JULIAN_DAY 7 | SUN_GM = 1.327124400419393e+20 8 | EARTH_POS_INITIAL_EPOCH = [8.13198928e+10, -1.16357658e+11, -5.04299080e+10], 9 | MARS_POS_FINAL_EPOCH = [2.49345342e+10, -1.93910554e+11, -8.96297815e+10], 10 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/tabulate_gravity_variations.py: -------------------------------------------------------------------------------- 1 | cosine_variations_table = ... 2 | sine_variations_table = ... 3 | minimum_degree = 2 4 | minimum_degree = 0 5 | interpolator_settings = interpolators.linear_interpolation( ) 6 | 7 | gravity_field_variations.append( environment_setup.gravity_field_variation.tabulated( 8 | cosine_variations_table, sine_variations_table, minimum_degree, minimum_order, interpolator_settings ) ) 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_thrust_direction.py: -------------------------------------------------------------------------------- 1 | # Define a function for the thrust orientation as a function of time 2 | def thrust_direction_function(time): 3 | thrust_direction = np.array([0, np.sin(time*np.pi/1000), -np.cos(time*np.pi/1000)]) 4 | return thrust_direction/np.linalg.norm(thrust_direction) 5 | 6 | # Define thrust direction settings based on a function of time 7 | thrust.custom_thrust_direction(thrust_direction_function) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/add_new_body_settings.py: -------------------------------------------------------------------------------- 1 | # Add empty body settings for body Oumuamua, and add to existing list of settings 2 | body_settings.add_empty_settings( "Oumuamua" ) 3 | 4 | # Manually create and assign environment model settings to new body settings 5 | body_settings.get( "Oumuamua" ).ephemeris_settings = ... 6 | body_settings.get( "Oumuamua" ).gravity_field_settings = ... 7 | body_settings.get( "Oumuamua" ).rotation_model_settings = ... 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/adding_wind.py: -------------------------------------------------------------------------------- 1 | # Add atmosphere settings to body (if body does not yet have amosphere settings) 2 | body_settings.get( "Mars" ).atmosphere_settings = ... 3 | 4 | # Define settings for wind 5 | wind_frame = environment.vertical_frame 6 | wind_velocity = np.ndarray([0.0, 0.0, 10.0]) 7 | body_settings.get( "Mars" ).atmosphere_settings.wind_settings = environment_setup.atmosphere.constant_wind_model( wind_velocity, wind_frame ) 8 | 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/kepler_ephemeris_spice.py: -------------------------------------------------------------------------------- 1 | 2 | body_name = 'Jupiter' 3 | initial_state_epoch = ... 4 | central_body_gravitational_parameter = ... 5 | 6 | frame_origin = 'SSB' 7 | frame_orientation = 'J2000' 8 | 9 | body_settings.get( 'Jupiter' ).ephemeris_settings = environment_setup.ephemeris.keplerian_from_spice( 10 | body_name, initial_state_epoch, central_body_gravitational_parameter, frame_origin, frame_orientation ) 11 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/simple_rotation_model.cpp: -------------------------------------------------------------------------------- 1 | Eigen::Quaterniond initialOrientation = ... 2 | 3 | double initialTime = ... 4 | double rotationRate = ... 5 | 6 | std::string originalFrame = "J2000"; 7 | std::string targetFrame = "IAU_Earth"; 8 | 9 | bodySettings[ "Earth" ]->rotationModelSettings = std::make_shared< SimpleRotationModelSettings >( 10 | originalFrame, targetFrame , initialOrientation, initialTime, rotationRate ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_harmonic_triaxial_body.py: -------------------------------------------------------------------------------- 1 | axis_a = ... 2 | axis_b = ... 3 | axis_c = ... 4 | density = ... 5 | maximum_degree = ... 6 | maximum_order = ... 7 | associated_reference_frame = ... 8 | 9 | body_settings.get( "Earth" ).gravity_field_settings = environment_setup.gravity_field.spherical_harmonic_triaxial_body( 10 | gravitational_parameter, axis_a, axis_b, axis_c, density, maximum_degree, maximum_order) 11 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/mutual_spherical_harmonic_gravity.py: -------------------------------------------------------------------------------- 1 | maximum_degree_of_io = 12 2 | maximum_order_of_io = 12 3 | maximum_degree_of_jupiter = 4 4 | maximum_order_of_jupiter = 4 5 | 6 | acceleration_settings_on_io = dict( 7 | Jupiter = [ propagation_setup.acceleration.mutual_spherical_harmonic_gravity( 8 | maximum_degree_of_jupiter, maximum_order_of_jupiter, maximum_degree_of_io, maximum_order_of_io) ] 9 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/cannonball_radiation_pressure.py: -------------------------------------------------------------------------------- 1 | reference_area_radiation = 4.0 2 | radiation_pressure_coefficient = 1.2 3 | occulting_bodies = [ "Earth" ] 4 | 5 | radiation_pressure_settings = environment_setup.radiation_pressure.cannonball( 6 | "Sun", reference_area_radiation, radiation_pressure_coefficient, occulting_bodies ) 7 | 8 | environment_setup.add_radiation_pressure_interface( 9 | bodies, "Spacecraft", radiation_pressure_settings ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/add_ground_station.py: -------------------------------------------------------------------------------- 1 | # Create ground station settings 2 | ground_station_settings = environment_setup.ground_station.basic_station( 3 | "TrackingStation", 4 | [station_altitude, delft_latitude, delft_longitude], 5 | element_conversion.geodetic_position_type) 6 | 7 | # Add the ground station to the environment 8 | environment_setup.add_ground_station( 9 | bodies.get_body("Earth"), 10 | ground_station_settings )s 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/mutual_spherical_harmonic_gravity.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | int maximumDegreeOfIo = 12; 4 | int maximumOrderOfIo = 12; 5 | int maximumDegreeOfJupiter = 4; 6 | int maximumOrderOfJupiter = 4; 7 | 8 | accelerationSettings[ "Io" ][ "Jupiter" ].push_back( std::make_shared< MutualSphericalHarmonicAccelerationSettings >( 9 | maximumDegreeOfJupiter, maximumOrderOfJupiter, maximumDegreeOfIo, maximumOrderOfIo ) ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/add_new_vehicle_settings.py: -------------------------------------------------------------------------------- 1 | # Add empty body settings for body Oumuamua, and add to existing list of settings 2 | body_settings.add_empty_settings( "Spacecraft" ) 3 | 4 | # Manually create and assign environment model settings to new body settings 5 | body_settings.get( "Spacecraft" ).radiation_pressure_target_settings = ... 6 | body_settings.get( "Spacecraft" ).aerodynamic_coefficient_settings = ... 7 | body_settings.get( "Spacecraft" ).constant_mass = 500.0; 8 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/create_bodies_1.cpp: -------------------------------------------------------------------------------- 1 | // load spice kernels 2 | spice_interface::load_standard_spice_kernels() 3 | 4 | // define bodies in simulation 5 | std::vector bodiesToCreate = {"Sun", "Earth", "Moon"}; 6 | 7 | // create body settings map 8 | std::map> bodySettings = 9 | getDefaultBodySettings(bodiesToCreate); 10 | 11 | // create body system object 12 | NamedBodyMap bodyMap = createBodies(bodySettings); 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/kepler_ephemeris.py: -------------------------------------------------------------------------------- 1 | initial_state_in_keplerian_elements = ... 2 | initial_state_epoch = ... 3 | central_body_gravitational_parameter = ... 4 | 5 | frame_origin = "SSB" 6 | frame_orientation = "J2000" 7 | 8 | body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.keplerian( initial_state_in_keplerian_elements, 9 | initial_state_epoch, central_body_gravitational_parameter, frame_origin, frame_orientation ) 10 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/override_default_parameters_sh.py: -------------------------------------------------------------------------------- 1 | # Get the current cosine coefficients of the Earth 2 | cosine_coefficients = body_settings.get('Earth').gravity_field_settings.normalized_cosine_coefficients 3 | 4 | # Modify the C_{2,0} coefficient of the Earth 5 | cosine_coefficients[ 2, 0 ] = cosine_coefficients[ 2, 0 ] + 1.0E-12 6 | 7 | # Reset the coefficients of the Earth 8 | body_settings.get('Earth').gravity_field_settings.normalized_cosine_coefficients = cosine_coefficients 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/relativistic.py: -------------------------------------------------------------------------------- 1 | use_schwarzschild = True 2 | use_lense_thirring = True 3 | use_de_sitter = True 4 | 5 | de_sitter_central_body = "Sun" 6 | lense_thirring_angular_momentum = ... # 3D vector 7 | 8 | acceleration_settings_on_vehicle = dict( 9 | Mars = [ propagation_setup.acceleration.relativistic_correction( 10 | use_schwarzschild, use_lense_thirring, use_de_sitter, 11 | de_sitter_central_body, lense_thirring_angular_momentum) ] ) 12 | -------------------------------------------------------------------------------- /docs/source/user-guide/mathematics.rst: -------------------------------------------------------------------------------- 1 | .. _mathematics: 2 | 3 | *********** 4 | Mathematics 5 | *********** 6 | 7 | Tudat contains various pieces of functionality of a purely mathematical nature, which are used to support the astrodynamics calculations. The setup of numerical integrators is discussed in the context of :ref:`numerical state propagation `. Below, additional mathematical functionality is documented. 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | 12 | mathematics/interpolators 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/cannonball_radiation_pressure.cpp: -------------------------------------------------------------------------------- 1 | std::string sourceBody = "Sun"; 2 | 3 | double area = 20.0; 4 | const double radiationPressureCoefficient = 1.2; 5 | 6 | std::vector< std::string > occultingBodies; 7 | occultingBodies.push_back( "Earth" ); 8 | 9 | bodySettings[ "TestVehicle" ]->radiationPressureSettings[ sourceBody ] = std::make_shared< CannonBallRadiationPressureInterfaceSettings >( 10 | sourceBody, area, radiationPressureCoefficient, occultingBodies ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/guidance_class_new.py: -------------------------------------------------------------------------------- 1 | class STSAerodynamicGuidance: 2 | 3 | def __init__(self, bodies: environment.SystemOfBodies): 4 | ... 5 | 6 | # Function that is called at each simulation time step to update the ideal bank angle of the vehicle 7 | def getAerodynamicAngles(self, current_time: float): 8 | 9 | self.angle_of_attack = ... 10 | self.bank_angle = ... 11 | return np.array([self.angle_of_attack, 0.0, self.bank_angle]) 12 | 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/kepler_ephemeris.cpp: -------------------------------------------------------------------------------- 1 | Eigen::Vector6d initialStateInKeplerianElements = ... 2 | 3 | double epochOfInitialState = ... 4 | double centralBodyGravitationalParameter = ... 5 | 6 | std::string frameOrigin = "SSB"; 7 | std::string frameOrientation = "J2000"; 8 | 9 | bodySettings[ "Jupiter" ]->ephemerisSettings = std::make_shared< KeplerEphemerisSettings >( 10 | initialStateInKeplerianElements, epochOfInitialState, centralBodyGravitationalParameter, frameOrigin, frameOrientation ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/full_multitype_setup.py: -------------------------------------------------------------------------------- 1 | # Create list of propagator settings 2 | propagator_settings_list =[ 3 | translational_propagator_settings, rotational_propagator_settings, mass_propagator_settings ] 4 | 5 | # Define settings for multi-type propagator 6 | propagator_settings = propagation_setup.propagator.multitype( 7 | propagator_settings_list, 8 | integrator_settings, 9 | simulation_start_epoch, 10 | termination_condition, 11 | output_variables = dependent_variables_to_save ) 12 | -------------------------------------------------------------------------------- /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.3.3 3 | commit = True 4 | tag = True 5 | parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? 6 | serialize = 7 | {major}.{minor}.{patch}.{release}{dev} 8 | {major}.{minor}.{patch} 9 | 10 | [bumpversion:part:release] 11 | optional_value = gamma 12 | values = 13 | dev 14 | gamma 15 | 16 | [bumpversion:part:dev] 17 | 18 | [bumpversion:file:./docs/source/conf.py] 19 | search = release = '{current_version}' 20 | replace = release = '{new_version}' 21 | -------------------------------------------------------------------------------- /docs/source/getting-started/_static/environment.yaml: -------------------------------------------------------------------------------- 1 | name: tudat-space 2 | channels: 3 | - conda-forge 4 | - tudat-team 5 | dependencies: 6 | - python=3.10 7 | - tudatpy 8 | - matplotlib=3.9.2 9 | - notebook 10 | - scipy 11 | - pandas 12 | - astropy 13 | - tqdm 14 | - astropy-healpix 15 | - spiceypy # for automatic data downloader and kernel converter 16 | - tabulate 17 | - colorama 18 | - numpy<2.0.0 19 | - pip 20 | - pip: 21 | - astroquery>=0.4.8.dev9306 22 | - git+https://github.com/NASA-PDS/PyTrk234.git 23 | 24 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/empirical.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | Eigen::Vector3d constantAcceleration = ( Eigen::Vector3d( ) << 0.4, -0.1, 0.05 ).finished( ); 4 | Eigen::Vector3d sineAcceleration = ( Eigen::Vector3d( ) << 0.0, 0.02, 0.0 ).finished( ); 5 | Eigen::Vector3d cosineAcceleration = ( Eigen::Vector3d( ) << -0.01, 0.0, 0.0 ).finished( ); 6 | 7 | accelerationSettings[ "Orbiter" ][ "Mars" ] = std::make_shared< EmpiricalAccelerationSettings >( 8 | constantAcceleration, sineAcceleration, cosineAcceleration ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/quasi_impulsive_shot.py: -------------------------------------------------------------------------------- 1 | thrust_mid_times = [ 1.0 * 3600.0, 2.0 * 3600.0, 3.0 * 3600.0 ] 2 | delta_v_values [ [ 0.3E-3, -2.5E-3, 3.4E-3 ], 3 | [ 2.0E-3, 5.9E-3, -0.5E-3 ], 4 | [ -1.6E-3, 4.4E-3, -5.8E-3] ] 5 | 6 | total_maneuver_time = 90.0 7 | maneuver_rise_time = 15.0 8 | 9 | 10 | acceleration_settings_on_vehicle = dict( 11 | Apollo = [ propagation_setup.acceleration.quasi_impulsive_shot( thrust_mid_times, delta_v_values, total_maneuver_time, maneuver_rise_time) ] 12 | ) 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/guidance_class_old.py: -------------------------------------------------------------------------------- 1 | class STSAerodynamicGuidance(propagation.AerodynamicGuidance): 2 | 3 | def __init__(self, bodies: environment.SystemOfBodies): 4 | # Call the base class constructor 5 | propagation.AerodynamicGuidance.__init__(self) 6 | ... 7 | 8 | # Function that is called at each simulation time step to update the ideal bank angle of the vehicle 9 | def updateGuidance(self, current_time: float): 10 | 11 | self.angle_of_attack = ... 12 | self.bank_angle = ... 13 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/create_vehicle.py: -------------------------------------------------------------------------------- 1 | # assign trivial body as vehicle 2 | body_system.create_empty_body( "Vehicle" ) 3 | 4 | # set constant vehicle mass 5 | bodies.get( "Vehicle").mass = 5.0E3 6 | 7 | # Create aerodynamic coefficient interface settings, and add to vehicle 8 | aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( 9 | reference_area = 50.0, 10 | constant_force_coefficient = [1.2,0,0] ) 11 | environment_setup.add_aerodynamic_coefficient_interface( 12 | bodies, "Vehicle", aero_coefficient_settings ) 13 | 14 | -------------------------------------------------------------------------------- /docs/source/getting-started/_static/environment-dev.yaml: -------------------------------------------------------------------------------- 1 | name: tudat-space-dev 2 | channels: 3 | - conda-forge 4 | - tudat-team/label/dev 5 | - tudat-team 6 | dependencies: 7 | - python=3.11 8 | - tudatpy 9 | - matplotlib=3.9.2 10 | - notebook 11 | - scipy 12 | - pandas 13 | - astropy 14 | - tqdm 15 | - astropy-healpix 16 | - spiceypy # for automatic data downloader and kernel converter 17 | - tabulate 18 | - colorama 19 | - numpy<2.0.0 20 | - pip 21 | - pip: 22 | - astroquery>=0.4.8.dev9306 23 | - git+https://github.com/NASA-PDS/PyTrk234.git 24 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/default_bodies_time_interval.py: -------------------------------------------------------------------------------- 1 | # define bodies in simulation 2 | bodies_to_create = ["Sun", "Earth", "Moon", "Mars", "Jupiter"] 3 | 4 | # create body settings dictionary 5 | global_frame_origin = "SSB" 6 | global_frame_orientation = "J2000" 7 | initial_time = 2.0 * constants.JULIAN_YEAR 8 | final_time = 4.0 * constants.JULIAN_YEAR 9 | time_step = 300.0 10 | body_settings = environment_setup.get_default_body_settings_time_limited( 11 | bodies_to_create, initial_time, final_time, global_frame_origin, global_frame_orientation, time_step) 12 | -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/grail-residuals.rst: -------------------------------------------------------------------------------- 1 | ============================================================================================= 2 | GRAIL - Comparing Doppler measurements from ODF files to simulated observables 3 | ============================================================================================= 4 | 5 | .. literalinclude:: /examples/tudatpy-examples/estimation/grail_residuals.py 6 | :language: python 7 | 8 | ------ 9 | Output 10 | ------ 11 | 12 | .. figure:: output/GRAIL-Residuals-RMS-Mean.png 13 | 14 | .. figure:: output/GRAIL-Residuals-per-obs.png 15 | -------------------------------------------------------------------------------- /docs/source/_snippets/math/interpolators/basic_interpolation.py: -------------------------------------------------------------------------------- 1 | # Generate data to interpolate 2 | data_to_interpolate = dict( ) 3 | data_to_interpolate = ... 4 | 5 | # Create settings for interpolation 6 | linear_interpolation_settings = interpolators.linear_interpolation( ) 7 | 8 | # Create interpolator 9 | interpolator = interpolators.create_one_dimensional_scalar_interpolator( data_to_interpolate, linear_interpolation_settings ) 10 | 11 | # Interpolate data set in data_to_interpolate at t=100 12 | independent_variable = 100 13 | interpolated_value = interpolator.interpolate( independent_variable ) 14 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/guidance_class_new_linking.py: -------------------------------------------------------------------------------- 1 | # Create the aerodynamic guidance object 2 | aerodynamic_guidance_object = STSAerodynamicGuidance(bodies) 3 | 4 | # Link getAerodynamicAngles function of aerodynamic_guidance_object to rotation model settings 5 | rotation_model_settings = environment_setup.rotation_model.aerodynamic_angle_based( 6 | 'Earth', '', 'STS_Fixed', aerodynamic_guidance_object.getAerodynamicAngles ) 7 | 8 | # Create rotation model from rotation model settings 9 | environment_setup.add_rotation_model( bodies, 'STS', rotation_model_settings ) 10 | -------------------------------------------------------------------------------- /docs/source/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 1000px !important; 3 | } 4 | 5 | .sphinx-codeautolink-a { 6 | border-bottom-color: rgb(63, 177, 197); 7 | border-bottom-style: solid; 8 | border-bottom-width: 1px; 9 | } 10 | 11 | .sphinx-codeautolink-a:hover { 12 | color: rgb(255, 139, 139); 13 | } 14 | 15 | .sd-card .sd-card-img-top { 16 | height: 60px; 17 | width: 60px; 18 | margin-left: auto; 19 | margin-right: auto; 20 | margin-top: 10px; 21 | } 22 | 23 | html[data-theme=dark] .sd-card img[src*='.svg'] { 24 | filter: invert(0.82) brightness(0.8) contrast(1.2); 25 | } -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/basic_translational_setup.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated. 2 | bodies_to_propagate = ["Vehicle"] 3 | 4 | # Define central bodies. 5 | central_bodies = ["Earth"] 6 | 7 | # Define settings for propagator 8 | termination_condition = propagation_setup.propagator.time_termination( 9 | simulation_end_epoch ) 10 | propagator_settings = propagation_setup.propagator.translational( 11 | central_bodies, 12 | acceleration_models, 13 | bodies_to_propagate, 14 | initial_state, 15 | simulation_start_epoch, 16 | integrator_settings, 17 | termination_condition ) 18 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_atmosphere_example.py: -------------------------------------------------------------------------------- 1 | # Custom function to compute density (https://www.grc.nasa.gov/www/k-12/airplane/atmosmrm.html) 2 | def compute_mars_density( altitude ): 3 | 4 | # Compute pressure 5 | pressure = 0.699 * math.exp( -0.00009 * altitude ) 6 | 7 | # Compute altitude-dependent temperature 8 | if( altitude > 7.0E3 ): 9 | temperature -23.4 - 0.00222 * altitude 10 | 11 | else: 12 | temperature -31.0 - 0.000998 * altitude 13 | 14 | # Compute and return density from equation of state 15 | density = pressure / (.1921 * (temperature + 273.1)) 16 | return density 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/mutual_third_body_spherical_harmonic_gravity.py: -------------------------------------------------------------------------------- 1 | maximum_degree_of_io = 12 2 | maximum_order_of_io = 12 3 | maximum_degree_of_ganymede = 4 4 | maximum_order_of_ganymede = 4 5 | maximum_degree_of_jupiter = 4 6 | maximum_order_of_jupiter = 4 7 | 8 | acceleration_settings_on_io = dict( 9 | Earth = [ propagation_setup.acceleration.mutual_spherical_harmonic_gravity( 10 | maximum_degree_of_jupiter, maximum_order_of_jupiter, maximum_degree_of_ganymede, maximum_order_of_ganymede 11 | maximum_degree_of_io, maximum_order_of_io) ] 12 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_harmonics_gravity.py: -------------------------------------------------------------------------------- 1 | gravitational_parameter = ... 2 | reference_radius = ... 3 | normalized_cosine_coefficients = ... # NOTE: entry (i,j) denotes coefficient at degree i and order j 4 | normalized_sine_coefficients = ... # NOTE: entry (i,j) denotes coefficient at degree i and order j 5 | associated_reference_frame = ... 6 | 7 | body_settings.get( "Earth" ).gravity_field_settings = environment_setup.gravity_field.spherical_harmonic( gravitational_parameter, 8 | reference_radius, normalized_cosine_coefficients, normalized_sine_coefficients, associated_reference_frame ) 9 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/mutual_third_body_spherical_harmonic_gravity.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | int maximumDegreeOfIo = 12; 4 | int maximumOrderOfIo = 12; 5 | int maximumDegreeOfGanymede = 4; 6 | int maximumOrderOfGanymede = 4; 7 | int maximumDegreeOfJupiter = 4; 8 | int maximumOrderOfJupiter = 4; 9 | 10 | accelerationSettings[ "Io" ][ "Jupiter" ].push_back( std::make_shared< MutualSphericalHarmonicAccelerationSettings >( 11 | maximumDegreeOfJupiter, maximumOrderOfJupiter, maximumDegreeOfGanymede, maximumOrderOfGanymede, maximumDegreeOfIo, maximumOrderOfIo ) ); -------------------------------------------------------------------------------- /docs/source/index-about.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description lang=en: 3 | Some information about the history, applications and plans of the open-source TU Delft Astrodynamics toolbox (Tudat) 4 | 5 | ****************************** 6 | About 7 | ****************************** 8 | 9 | This section provides information on the history of Tudat(Py), how to contribute to the project, and the research output that has been produced using Tudat(Py). 10 | 11 | .. toctree:: 12 | 13 | /about/history 14 | /about/research-output 15 | /about/contribute-to-tudat 16 | Developer documentation -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/adams_bashforth_moulton.py: -------------------------------------------------------------------------------- 1 | initial_time = 86400 # seconds since J2000 2 | initial_time_step = 10 # seconds 3 | minimum_step_size = 0.1 # seconds 4 | maximum_step_size = 100 # seconds 5 | relative_error_tolerance = 1.0e-9 # - 6 | absolute_error_tolerance = 1.0e-9 # - 7 | minimum_order = 6 8 | maximum_order = 11 9 | 10 | integrator_settings = propagation_setup.integrator.adams_bashforth_moulton( 11 | initial_time, 12 | initial_time_step, 13 | minimum_step_size, 14 | maximum_step_size, 15 | relative_error_tolerance, 16 | absolute_error_tolerance, 17 | minimum_order, 18 | maximum_order 19 | ) 20 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/relativistic.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | bool calculateSchwarzschildCorrection = true; 4 | bool calculateLenseThirringCorrection = true; 5 | bool calculateDeSitterCorrection = true; 6 | 7 | std::string primaryBody = "Sun"; 8 | 9 | const Eigen::Vector3d centralBodyAngularMomentum = ... 10 | 11 | accelerationSettings[ "Orbiter" ][ "Mars" ] = std::make_shared< RelativisticAccelerationCorrectionSettings >( 12 | calculateSchwarzschildCorrection, calculateLenseThirringCorrection, calculateDeSitterCorrection, primaryBody, 13 | centralBodyAngularMomentum ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/custom_magnitude.py: -------------------------------------------------------------------------------- 1 | # Define the thrust magnitude function: thrust increases linearly with time 2 | def thrust_magnitude_function(time): 3 | return 500 + time/2 4 | 5 | # Define a lambda specific impulse function: constant at 350s 6 | specific_impulse_function = lambda time: 350 7 | 8 | # Define the "engine on" function: engine is off after 50s 9 | def is_engine_on_function(time): 10 | return time < 50 11 | 12 | # Define the custom thrust magnitude settings based on the pre-defined functions 13 | thrust.custom_thrust_magnitude(thrust_magnitude_function, specific_impulse_function, is_engine_on_function) -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/lambert_targeter.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # instantiate lambert targeter class using Dario Izzo's algorithm. 4 | lambert_targeter = two_body_dynamics.LambertTargeterIzzo( 5 | departure_position=EARTH_POS_INITIAL_EPOCH, 6 | arrival_position=MARS_POS_FINAL_EPOCH, 7 | time_of_flight=FINAL_EPOCH - INTIIAL_EPOCH, 8 | gravitational_parameter=SUN_GM 9 | # is_retrograde(default=false) 10 | # tolerance(default=1e-9) 11 | # max_iter(default=50) -> (max iterations attempting to achieve tolerance) 12 | ) 13 | 14 | # calculate the initial and final velocity vectors 15 | v1, v2 = lambert_targeter.get_velocity_vectors() 16 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/basic_multi_translational_setup.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated. 2 | bodies_to_propagate = ["Earth","Mars","Sun","Moon"] 3 | 4 | # Define central bodies. 5 | central_bodies = ["SSB","SSB","SSB","SSB"] 6 | 7 | # Define settings for propagator 8 | termination_condition = propagation_setup.propagator.time_termination( 9 | simulation_end_epoch ) 10 | propagator_settings = propagation_setup.propagator.translational( 11 | central_bodies, 12 | acceleration_models, 13 | bodies_to_propagate, 14 | initial_state, 15 | simulation_start_epoch, 16 | integrator_settings, 17 | termination_condition ) 18 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_mass_rate.py: -------------------------------------------------------------------------------- 1 | # Create the acceleration model, which contains the thrust of the vehicle on itself 2 | acceleration_model = propagation_setup.create_acceleration_models( 3 | system_of_bodies, accelerations_on_vehicle_dict, bodies_to_propagate, central_bodies 4 | ) 5 | 6 | # Define the mass rate settings of the Vehicle from its thrust 7 | mass_rate_settings = { 8 | "Vehicle": [propagation_setup.mass_rate.from_thrust()] 9 | } 10 | 11 | # Create the mass rate model 12 | mass_rate_models = propagation_setup.create_mass_rate_models( 13 | system_of_bodies, 14 | mass_rate_settings, 15 | acceleration_model 16 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/basic_multi_hierarchy_translational_setup.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated. 2 | bodies_to_propagate = ["Earth","Mars","Sun","Moon"] 3 | 4 | # Define central bodies. 5 | central_bodies = ["Sun","Sun","SSB","Earth"] 6 | 7 | # Define settings for propagator 8 | termination_condition = propagation_setup.propagator.time_termination( 9 | simulation_end_epoch ) 10 | propagator_settings = propagation_setup.propagator.translational( 11 | central_bodies, 12 | acceleration_models, 13 | bodies_to_propagate, 14 | initial_state, 15 | simulation_start_epoch, 16 | integrator_settings, 17 | termination_condition ) 18 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = tudatspace 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/source/_snippets/math/interpolators/hermite_interpolation.py: -------------------------------------------------------------------------------- 1 | # Generate data to interpolate 2 | data_to_interpolate = dict( ) 3 | data_derivatives = dict( ) 4 | data_to_interpolate = ... 5 | data_derivatives = ... 6 | 7 | # Create settings for Hermite spline interpolation 8 | linear_interpolation_settings = interpolators.hermite_interpolation( ) 9 | 10 | # Create interpolator 11 | interpolator = interpolators.create_one_dimensional_scalar_interpolator( data_to_interpolate, linear_interpolation_settings, data_derivatives ) 12 | 13 | # Interpolate data set in data_to_interpolate at t=100 14 | independent_variable = 100 15 | interpolated_value = interpolator.interpolate( independent_variable ) 16 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/spherical_harmonics_gravity.cpp: -------------------------------------------------------------------------------- 1 | double gravitationalParameter = ... 2 | double referenceRadius = ... 3 | 4 | Eigen::MatrixXd normalizedCosineCoefficients = // NOTE: entry (i,j) denotes coefficient at degree i and order j 5 | Eigen::MatrixXd normalizedSineCoefficients = // NOTE: entry (i,j) denotes coefficient at degree i and order j 6 | 7 | std::string associatedReferenceFrame = ... 8 | 9 | bodySettings[ "Earth" ]->gravityFieldSettings = std::make_shared< SphericalHarmonicsGravityFieldSettings >( 10 | gravitationalParameter, referenceRadius, normalizedCosineCoefficients, normalizedSineCoefficients, associatedReferenceFrame ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/thrust_acceleration_old.py: -------------------------------------------------------------------------------- 1 | # Define settings for inertial thrust direction 2 | thrust_direction_settings = ... 3 | 4 | # Define settings for thrust magnitude 5 | thrust_magnitude_settings = ... 6 | 7 | # Create acceleration model settings 8 | acceleration_on_vehicle = dict( 9 | ..., 10 | Vehicle=[ 11 | # Define the thrust acceleration from its direction and magnitude 12 | propagation_setup.acceleration.thrust_from_direction_and_magnitude( 13 | thrust_direction_settings=thrust_direction_settings, 14 | thrust_magnitude_settings=thrust_magnitude_settings, 15 | ) 16 | ], 17 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_class_single.py: -------------------------------------------------------------------------------- 1 | class SimpleCustomGuidanceModel: 2 | 3 | def __init__(self, bodies: environment.SystemOfBodies): 4 | 5 | # Extract the STS and Earth bodies 6 | self.vehicle = bodies.get_body("Vehicle") 7 | self.earth = bodies.get_body("Earth") 8 | 9 | 10 | def getThrustMagnitude(self, current_time: float): 11 | 12 | if( current_time == current_time ): 13 | 14 | # Update the class to the current time 15 | self.thrust_magnitude = ... 16 | 17 | # Return angles calculated by update function 18 | return self.thrust_magnitude 19 | 20 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_thrust_magnitude_example.py: -------------------------------------------------------------------------------- 1 | 2 | # Create bodies (same as in any other simulation) 3 | bodies = ... 4 | 5 | # Create guidance object 6 | guidance_model = SimpleCustomGuidanceModel( bodies ) 7 | 8 | # Extract guidance function 9 | thrust_magnitude_function = guidance_model.get_thrust_magnitude 10 | 11 | # Create thrust settings from custom model 12 | thrust_magnitude_settings = propagation_setup.thrust.custom_thrust_magnitude( thrust_magnitude_function, specific_impulse = 300.0 ) 13 | 14 | # Create engine model, and add to Vehicle 15 | environment_setup.add_engine_model( "Vehicle", "MainEngine", thrust_magnitude_settings, system_of_bodies ) 16 | 17 | -------------------------------------------------------------------------------- /docs/source/_static/icons/code-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/examples/pygmo.rst: -------------------------------------------------------------------------------- 1 | .. _pygmo_examples: 2 | 3 | ======================== 4 | Optimization using PyGMO 5 | ======================== 6 | 7 | .. note:: 8 | 9 | If you have never used PyGMO before, please consider reading our introductory guide: :ref:`optimization_pygmo`. 10 | 11 | Optimization with PyGMO 12 | *********************** 13 | 14 | Below, a number of examples of Tudat applications used the Pygmo optimization toolbox are shown. Note that a number of additional related examples are given on the page for :ref:`trajectory_optimization_examples`. 15 | 16 | .. nbgallery:: 17 | 18 | ./tudatpy-examples/pygmo/himmelblau_minimization.ipynb 19 | ./pygmo/asteroid-orbit-optimization.rst 20 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/torque_setup_multi_vehicle.py: -------------------------------------------------------------------------------- 1 | # Define torques per each exerting body 2 | torque_settings_vehicle = dict( 3 | Sun= 4 | [ 5 | propagation_setup.torque.second_degree_gravitational() 6 | ], 7 | Moon= 8 | [ 9 | propagation_setup.torque.second_degree_gravitational() 10 | ], 11 | Earth= 12 | [ 13 | propagation_setup.torque.spherical_harmonic_gravitational(4, 4), 14 | propagation_setup.torque.aerodynamic() 15 | ] 16 | ) 17 | 18 | # Create global torque settings dictionary. 19 | torque_settings = { 20 | "Vehicle1": torque_settings_vehicle, 21 | "Vehicle2": torque_settings_vehicle 22 | } 23 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/panelled_radiation_pressure.py: -------------------------------------------------------------------------------- 1 | source_body = "Sun" 2 | 3 | emissivities = [0.1, 0.0, 0.1, 0.1] 4 | areas = [4.0, 6.0, 2.3, 2,3] 5 | diffusion_coefficients = [0.46, 0.06, 0.46, 0.46] 6 | 7 | occulting_bodies = [ "Earth" ] 8 | 9 | panel_surface_normals = [ [0.0, 0.0, 1.0], [0.0, 0.0, -1.0], 10 | [1.0, 0.0, 0.0], [-1.0, 0.0, 0.0] ] 11 | 12 | radiation_pressure_settings = environment_setup.radiation_pressure.panelled( source_body, emissivities, 13 | areas, diffusion_coefficients, surfaceNormalsInBodyFixedFrameFunctions, occulting_bodies) 14 | 15 | environment_setup.add_radiation_pressure_interface( bodies, "Vehicle", radiation_pressure_settings ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_accelerations_basic_syntax.py: -------------------------------------------------------------------------------- 1 | # Create the dictionary containing the thrust acceleration 2 | accelerations_on_vehicle_dict = { 3 | "Vehicle": [ 4 | propagation_setup.acceleration.thrust_from_direction_and_magnitude( 5 | thrust_direction_settings, 6 | thrust_magnitude_settings 7 | ) 8 | ] 9 | } 10 | # Setup the accelerations as acting on the Vehicle 11 | acceleration_dict = {"Vehicle": accelerations_on_vehicle_dict} 12 | # Create the acceleration model in the system of bodies 13 | acceleration_model = propagation_setup.create_acceleration_models( 14 | system_of_bodies, accelerations_on_vehicle_dict, bodies_to_propagate, central_bodies 15 | ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/bulirsch_stoer.py: -------------------------------------------------------------------------------- 1 | initial_time = 86400 # seconds since J2000 2 | initial_time_step = 10 # seconds 3 | extrapolation_sequence = propagation_setup.integrator.ExtrapolationMethodStepSequences.bulirsch_stoer_sequence 4 | maximum_number_of_steps = 10 # - 5 | minimum_step_size = 0.1 # seconds 6 | maximum_step_size = 100 # seconds 7 | relative_error_tolerance = 1.0e-9 # - 8 | absolute_error_tolerance = 1.0e-9 # - 9 | 10 | integrator_settings = propagation_setup.integrator.bulirsch_stoer( 11 | initial_time, 12 | initial_time_step, 13 | extrapolation_sequence, 14 | maximum_number_of_steps, 15 | minimum_step_size, 16 | maximum_step_size, 17 | relative_error_tolerance, 18 | absolute_error_tolerance 19 | ) 20 | -------------------------------------------------------------------------------- /docs/source/getting-started/_static/uninstall-osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ue 2 | 3 | function echo_red 4 | { 5 | echo -e '\033[3;31m'"$@"'\033[0m' 6 | } 7 | 8 | if [ ! -z "$(which conda)" ] 9 | then 10 | echo_red "conda deactivate tudat-space" 11 | conda deactivate tudat-space || echo_red "Ignoring previous error: the tudat-space environment is not active" 12 | echo_red "conda remove tudat-space" 13 | conda remove --yes -n tudat-space --all 14 | echo_red "conda remove channel tudat-team" 15 | conda config --remove channels tudat-team || echo_red "Ignoring previous error: the tudat-team channel has already been removed" 16 | else 17 | echo_red "conda has already been uninstalled" 18 | fi 19 | echo_red "brew remove miniconda" 20 | brew remove miniconda -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/quasi_impulsive_shot.cpp: -------------------------------------------------------------------------------- 1 | SelectedAccelerationMap accelerationSettings; 2 | 3 | std::vector< double > thrustMidTimes = { 1.0 * 3600.0, 2.0 * 3600.0, 3.0 * 3600.0 }; 4 | 5 | std::vector< Eigen::Vector3d > deltaVValues = { 1.0E-3 * ( Eigen::Vector3d( ) << 0.3, -2.5, 3.4 ).finished( ), 6 | 1.0E-3 * ( Eigen::Vector3d( ) << 2.0, 5.9, -0.5 ).finished( ), 7 | 1.0E-3 * ( Eigen::Vector3d( ) << -1.6, 4.4, -5.8 ).finished( ) }; 8 | 9 | double totalManeuverTime = 90.0; 10 | double maneuverRiseTime = 15.0; 11 | 12 | accelerationSettings[ "Apollo" ][ "Apollo" ] = std::make_shared< QuasiImpulsiveShotsAccelerationSettings >( 13 | thrustMidTimes, deltaVValues, totalManeuverTime, maneuverRiseTime ); -------------------------------------------------------------------------------- /docs/source/_static/icons/rocket-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_static/icons/laptop-code-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/parallelization/general_bfe_example.py: -------------------------------------------------------------------------------- 1 | def run_simulation(arg_1, arg_2): 2 | # Do some tudat things... 3 | return 1, arg_1 + arg_2 4 | 5 | # Main script 6 | if __name__ == "__main__": 7 | # Number of simulations to run 8 | N = 500 9 | arg_1_list = np.random.normal(-100, 50, size=N) 10 | arg_2_list = np.random.normal(1e6, 2e5, size=N) 11 | 12 | # Combine list of inputs 13 | inputs = [] 14 | for i in range(N): 15 | inputs.append((arg_1_list[i], arg_2_list[i])) 16 | 17 | # Run simulations in parallel, using half the available cores 18 | n_cores = mp.cpu_count()//2 19 | with mp.get_context("spawn").Pool(n_cores) as pool: 20 | outputs = pool.starmap(run_simulation, inputs) 21 | 22 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/thrust_refactor/thrust_acceleration_new.py: -------------------------------------------------------------------------------- 1 | # Create body rotation settings and create rotation model 2 | rotation_model_settings = ... 3 | environment_setup.add_rotation_model( system_of_bodies, 'Vehicle', rotation_model_settings ) 4 | 5 | ... 6 | 7 | # Define settings for thrust magnitude 8 | thrust_magnitude_settings = ... 9 | # Create engine model with given thrust magnitude 10 | environment_setup.add_engine_model( 11 | 'Vehicle', 'MainEngine', thrust_magnitude_settings, system_of_bodies ) 12 | 13 | ... 14 | 15 | # Create acceleration model settings 16 | acceleration_on_vehicle = dict( 17 | ..., 18 | Vehicle=[ 19 | propagation_setup.acceleration.thrust_from_engine( 'MainEngine') 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /docs/source/examples/pygmo/asteroid-orbit-optimization.rst: -------------------------------------------------------------------------------- 1 | .. _asteroid_optimization_examples: 2 | 3 | =========================== 4 | Asteroid Orbit Optimization 5 | =========================== 6 | 7 | On this page, several related examples on the optimization of an orbit around an asteroid are discussed. The first example deals with the setup of the physical environment, the second one concerns the exploration of the design space, while the third one performs the actual optimization. 8 | 9 | .. nbgallery:: 10 | 11 | ../tudatpy-examples/pygmo/asteroid_orbit_optimization/aoo_custom_environment.ipynb 12 | ../tudatpy-examples/pygmo/asteroid_orbit_optimization/aoo_design_space_exploration.ipynb 13 | ../tudatpy-examples/pygmo/asteroid_orbit_optimization/aoo_optimization.ipynb 14 | 15 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/radiation_source_point.cpp: -------------------------------------------------------------------------------- 1 | // Luminosity given directly 2 | // These lines can be omitted in real code since this is the default source model for the Sun 3 | double luminosity = 3.828e26; // W 4 | bodySettings.at("Sun")->radiationSourceModelSettings = 5 | isotropicPointRadiationSourceModelSettings( 6 | constantLuminosityModelSettings(3.828e26)); 7 | 8 | // Luminosity given as irradiance at a certain distance 9 | double irradianceAtDistance = 1361; // W/m² 10 | double distance = 1.496e11; // m 11 | bodySettings.at("Sun")->radiationSourceModelSettings = 12 | isotropicPointRadiationSourceModelSettings( 13 | irradianceBasedLuminosityModelSettings(irradianceAtDistance, distance)); -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/grail-odf-estimation.rst: -------------------------------------------------------------------------------- 1 | ============================================================================================= 2 | GRAIL - Estimating the spacecraft trajectory from ODF Doppler measurements 3 | ============================================================================================= 4 | 5 | .. literalinclude:: /examples/tudatpy-examples/estimation/grail_odf_estimation.py 6 | :language: python 7 | 8 | ------ 9 | Output 10 | ------ 11 | 12 | .. figure:: output/GRAIL-Estimation-2012-04-06.png 13 | 14 | .. figure:: output/GRAIL-Estimation-2012-04-09.png 15 | 16 | .. figure:: output/GRAIL-Estimation-2012-04-10.png 17 | 18 | .. figure:: output/GRAIL-Estimation-2012-04-11.png 19 | 20 | .. figure:: output/GRAIL-Estimation-2012-04-12.png 21 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/parallelization/mc_bfe_run.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | 3 | plot = False 4 | simulation_type = 'normal' #bfe or normal 5 | 6 | #Monte Carlo parameters 7 | bounds = [[7000e3, 8000e3], [0.1, 0.6]] # Semi-major Axis and Eccentricity are tested here 8 | N = 2000 9 | n_cores = 4 10 | 11 | # Setup inputs for MC with BFE 12 | arg_dict = {} 13 | for it, bound in enumerate(bounds): 14 | arg_dict[it] = np.random.uniform(bound[0], bound[1], size=N) 15 | 16 | inputs = [] 17 | for k in range(len(arg_dict[0])): 18 | inputs.append(tuple(arg_dict[p][k] for p in range(2))) 19 | 20 | # Run parallel MC analysis 21 | with mp.get_context("spawn").Pool(n_cores) as pool: 22 | outputs = pool.starmap(run_dynamics, inputs) 23 | -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/grail-spice-fit.rst: -------------------------------------------------------------------------------- 1 | ============================================================================================================================ 2 | GRAIL - Fitting various models of the GRAIL spacecraft's dynamics to the reference spice trajectory 3 | ============================================================================================================================ 4 | 5 | .. literalinclude:: /examples/tudatpy-examples/estimation/grail_spice_fit.py 6 | :language: python 7 | 8 | ------ 9 | Output 10 | ------ 11 | 12 | .. figure:: output/GRAIL-SPICE-fit-2012-04-06.png 13 | 14 | .. figure:: output/GRAIL-SPICE-fit-2012-04-09.png 15 | 16 | .. figure:: output/GRAIL-SPICE-fit-2012-04-10.png 17 | 18 | .. figure:: output/GRAIL-SPICE-fit-2012-04-11.png 19 | 20 | .. figure:: output/GRAIL-SPICE-fit-2012-04-12.png 21 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/custom_constant_temperature_atmosphere.cpp: -------------------------------------------------------------------------------- 1 | // Outside main 2 | double customDensityFunction( const double altitude, const double longitude, const double latitude, const double time ) 3 | { 4 | // Return a linear combination of the input values 5 | return 0.5 * altitude + 0.25 * longitude + 0.15 * latitude + 0.1 * time; 6 | } 7 | 8 | int main( ) 9 | { 10 | // ... 11 | 12 | // Define atmosphere settings 13 | double constantTemperature = 250.0; 14 | double specificGasConstant = 300.0; 15 | double ratioOfSpecificHeats = 1.4; 16 | bodySettings[ "Earth" ]->atmosphereSettings = std::make_shared< CustomConstantTemperatureAtmosphereSettings >( 17 | &customDensityFunction, constantTemperature, specificGasConstant, ratioOfSpecificHeats ); 18 | 19 | // ... 20 | } -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/torque_example.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated. 2 | bodies_to_propagate = ["Vehicle"] 3 | 4 | # Define accelerations acting on Vehicle 5 | torque_settings_vehicle = dict( 6 | Sun= 7 | [ 8 | propagation_setup.torque.second_degree_gravitational() 9 | ], 10 | Moon= 11 | [ 12 | propagation_setup.torque.second_degree_gravitational() 13 | ], 14 | Earth= 15 | [ 16 | propagation_setup.torque.spherical_harmonic_gravitational(4, 4), 17 | propagation_setup.torque.aerodynamic() 18 | ]) 19 | 20 | # Create global accelerations settings dictionary. 21 | torque_settings = {"Delfi-C3": torque_settings_delfi_c3} 22 | 23 | # Create acceleration models. 24 | torque_models = propagation_setup.create_torque_models( 25 | bodies, torque_settings, bodies_to_propagate ) 26 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/torque_setup.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Vehicle"] 3 | 4 | # Define torques per each exerting body 5 | torque_settings_vehicle = dict( 6 | Sun= 7 | [ 8 | propagation_setup.torque.second_degree_gravitational() 9 | ], 10 | Moon= 11 | [ 12 | propagation_setup.torque.second_degree_gravitational() 13 | ], 14 | Earth= 15 | [ 16 | propagation_setup.torque.spherical_harmonic_gravitational(4, 4), 17 | propagation_setup.torque.aerodynamic() 18 | ] 19 | ) 20 | 21 | # Create global torque settings dictionary 22 | torque_settings = {"Vehicle": torque_settings_vehicle} 23 | 24 | # Create torque models 25 | torque_models = propagation_setup.create_torque_models( 26 | bodies, torque_settings, bodies_to_propagate ) 27 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/integrator_setup/runge_kutta_fehlberg.py: -------------------------------------------------------------------------------- 1 | initial_time = 86400 # seconds since J2000 2 | initial_time_step = 10 # seconds 3 | coefficient_set = propagation_setup.integrator.RKCoefficientSets.rkf_78 4 | minimum_step_size = 0.1 # seconds 5 | maximum_step_size = 100 # seconds 6 | relative_error_tolerance = 1.0e-9 # - 7 | absolute_error_tolerance = 1.0e-9 # - 8 | 9 | integrator_settings = propagation_setup.integrator.runge_kutta_variable_step_size_scalar_tolerances( 10 | initial_time, 11 | initial_time_step, 12 | coefficient_set, 13 | minimum_step_size, 14 | maximum_step_size, 15 | relative_error_tolerance, 16 | absolute_error_tolerance, 17 | save_frequency= 1, 18 | assess_termination_on_minor_steps = False, 19 | safety_factor = 0.8, 20 | maximum_factor_increase = 4.0, 21 | minimum_factor_increase = 0.1 ); 22 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/torque_models/torque_setup_multi.py: -------------------------------------------------------------------------------- 1 | # Define selected torques per each exerting body 2 | torque_settings_moon = dict( 3 | Sun= 4 | [ 5 | propagation_setup.torque.second_degree_gravitational() 6 | ], 7 | Earth= 8 | [ 9 | propagation_setup.torque.spherical_harmonic_gravitational(4, 4) 10 | ] 11 | ) 12 | 13 | # Define selected torques per each exerting body 14 | torque_settings_earth = dict( 15 | Sun= 16 | [ 17 | propagation_setup.torque.second_degree_gravitational() 18 | ], 19 | Moon= 20 | [ 21 | propagation_setup.torque.second_degree_gravitational() 22 | ] 23 | ) 24 | 25 | # Create global torque settings dictionary and assign the torque selections to respective bodies that act upon 26 | torque_settings = { 27 | "Moon": torque_settings_moon, 28 | "Earth": torque_settings_earth 29 | } 30 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | set SPHINXPROJ=tudatspace 13 | 14 | if "%1" == "" goto help 15 | 16 | %SPHINXBUILD% >NUL 2>NUL 17 | if errorlevel 9009 ( 18 | echo. 19 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 20 | echo.installed, then set the SPHINXBUILD environment variable to point 21 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 22 | echo.may add the Sphinx directory to PATH. 23 | echo. 24 | echo.If you don't have Sphinx installed, grab it from 25 | echo.http://sphinx-doc.org/ 26 | exit /b 1 27 | ) 28 | 29 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 30 | goto end 31 | 32 | :help 33 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 34 | 35 | :end 36 | popd 37 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_orientation_body_fixed.py: -------------------------------------------------------------------------------- 1 | # Define constant thrust magnitude settings with a deviation from the body-fixed x-axis of 0.5 rad 2 | thrust.constant_thrust_magnitude( 3 | thrust_magnitude=1.5e3, 4 | specific_impulse=315, 5 | body_fixed_thrust_direction=[np.cos(0.5), np.sin(0.5), 0] 6 | ) 7 | 8 | # Define a variable deflection of TVC from the centreline that varies with time from -0.5rad to +0.5rad 9 | def body_fixed_thrust_direction_function(time): 10 | TVC_deflection_angle = 0.5*np.sin(time*np.pi/1000) 11 | return [np.cos(TVC_deflection_angle), np.sin(TVC_deflection_angle), 0] 12 | 13 | # Define custom thrust magnitude settings with the variable TVC deflection 14 | thrust.custom_thrust_magnitude( 15 | thrust_magnitude_function = lambda t: 1.5e3, 16 | specific_impulse_function = lambda t: 315, 17 | body_fixed_thrust_direction = body_fixed_thrust_direction_function) 18 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/solar_sail_radiation_pressure.py: -------------------------------------------------------------------------------- 1 | source_body = "Sun" 2 | 3 | area = 2.0 4 | 5 | def cone_angle(): return 0.25 6 | 7 | def clock_angle(): return 0.2 8 | 9 | front_emissivity_coefficient = 0.4 10 | back_emissivity_coefficient = 0.4 11 | front_lambertian_coefficient = 0.4 12 | back_lambertian_coefficient = 0.4 13 | reflectivity_coefficient = 0.3 14 | specular_reflection_coefficient = 1.0 15 | 16 | occulting_bodies = [ "Earth" ] 17 | central_body = "Earth" 18 | 19 | radiation_pressure_settings = environment_setup.radiation_pressure.solar_sail( source_body, area, cone_angle, clock_angle, 20 | front_emissivity_coefficient, back_emissivity_coefficient, front_lambertian_coefficient, back_lambertian_coefficient, 21 | reflectivity_coefficient, specular_reflection_coefficient, occulting_bodies, central_body) 22 | 23 | environment_setup.add_radiation_pressure_interface( bodies, "Vehicle", radiation_pressure_settings ) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/acceleration_example.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Vehicle"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Earth"] 6 | 7 | # Define accelerations acting on Vehicle 8 | accelerations_settings_vehicle = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Moon= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ], 17 | Earth= 18 | [ 19 | propagation_setup.acceleration.spherical_harmonic_gravity(5, 5), 20 | propagation_setup.acceleration.aerodynamic() 21 | ]) 22 | 23 | # Create global accelerations settings dictionary 24 | acceleration_settings = {"Delfi-C3": accelerations_settings_delfi_c3} 25 | 26 | # Create acceleration models 27 | acceleration_models = propagation_setup.create_acceleration_models( 28 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) 29 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/radiation_pressure_target_cannonball.cpp: -------------------------------------------------------------------------------- 1 | double area = 20.0; 2 | const double radiationPressureCoefficient = 1.2; 3 | 4 | // Same occulting bodies for all sources 5 | std::vector occultingBodies {"Earth"}; 6 | 7 | bodySettings.at("TestVehicle")->radiationPressureTargetModelSettings = 8 | cannonballRadiationPressureTargetModelSettings( 9 | area, radiationPressureCoefficient, occultingBodies); 10 | 11 | // OR 12 | 13 | // Different occulting bodies depending on source 14 | // Sun is occulted by Earth and Moon, Earth is occulted by Moon 15 | std::map> occultingBodies { 16 | {"Sun", {"Earth", "Moon"}}, 17 | {"Earth", {"Moon"}} 18 | }; 19 | 20 | bodySettings.at("TestVehicle")->radiationPressureTargetModelSettings = 21 | cannonballRadiationPressureTargetModelSettingsWithOccultationMap( 22 | area, radiationPressureCoefficient, occultingBodies); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/acceleration_example.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Vehicle"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Earth"] 6 | 7 | # Define accelerations acting on Vehicle 8 | accelerations_settings_vehicle = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Moon= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ], 17 | Earth= 18 | [ 19 | propagation_setup.acceleration.spherical_harmonic_gravity(5, 5), 20 | propagation_setup.acceleration.aerodynamic() 21 | ]) 22 | 23 | # Create global accelerations settings dictionary 24 | acceleration_settings = {"Vehicle": accelerations_settings_vehicle} 25 | 26 | # Create acceleration models 27 | acceleration_models = propagation_setup.create_acceleration_models( 28 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) 29 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/aero_update_example.py: -------------------------------------------------------------------------------- 1 | 2 | # Extract Mach number from fliht conditions 3 | mach_number = vehicle_flight_conditions.mach_number 4 | 5 | # Compute angle attach attack according to user-defined guidance law 6 | angle_of_attack = np.deg2rad(30 / (1 + np.exp(-2*(mach_number-9))) + 10) 7 | 8 | # Update the variables on which the aerodynamic coefficients are based (AoA and Mach) 9 | current_aerodynamics_independent_variables = [self.angle_of_attack, mach_number] 10 | 11 | # Update the aerodynamic coefficients 12 | aerodynamic_coefficient_interface.update_coefficients( 13 | current_aerodynamics_independent_variables, current_time) 14 | 15 | # Extract the current force coefficients (in order: C_D, C_S, C_L) 16 | current_force_coefficients = aerodynamic_coefficient_interface.current_force_coefficients 17 | 18 | # Compute bank angle using guidance law requiring current_force_coefficients as input 19 | bank_angle = ... #=f(current_force_coefficients) 20 | -------------------------------------------------------------------------------- /docs/source/index-getting-started.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description lang=en: 3 | An overview of how to get started with the open-source TU Delft Astrodynamics toolbox (Tudat) 4 | 5 | .. _getting_started: 6 | 7 | ****************************** 8 | Getting Started 9 | ****************************** 10 | 11 | This section contains all the information for new users, including a quickstart guide, how to install tudatpy and primers on some coding tools. 12 | 13 | .. toctree:: 14 | :hidden: 15 | 16 | /getting-started/quickstart 17 | /getting-started/installation 18 | /getting-started/faq 19 | /getting-started/project-setup 20 | /getting-started/using-source 21 | 22 | .. toctree:: 23 | :caption: Primer for coding tools 24 | :hidden: 25 | 26 | /getting-started/use-of-tools/conda 27 | /getting-started/use-of-tools/python 28 | /getting-started/use-of-tools/github 29 | /getting-started/use-of-tools/setup-dev-environment 30 | /getting-started/use-of-tools/windows-subsystem-for-linux 31 | -------------------------------------------------------------------------------- /docs/source/examples/doppler-data-analysis/mro-residuals-analysis.rst: -------------------------------------------------------------------------------- 1 | ============================================================================================= 2 | MRO - Comparing Doppler and range measurements from ODF files to simulated observables 3 | ============================================================================================= 4 | 5 | .. literalinclude:: /examples/tudatpy-examples/estimation/mro_tnf_residuals_analysis.py 6 | :language: python 7 | 8 | ------ 9 | Output 10 | ------ 11 | 12 | ________________ 13 | Sequential Range 14 | ________________ 15 | 16 | .. figure:: output/MRO-Residuals-Sequential-Range.png 17 | 18 | .. figure:: output/MRO-Residuals-Sequential-Range-Overview.png 19 | 20 | .. figure:: output/MRO-Residuals-Sequential-Range-Residuals-one-day.png 21 | 22 | ________________ 23 | Averaged Doppler 24 | ________________ 25 | 26 | .. figure:: output/MRO-Residuals-Averaged-Doppler.png 27 | 28 | .. figure:: output/MRO-Residuals-Averaged-Doppler-Overview.png 29 | 30 | .. figure:: output/MRO-Residuals-Averaged-Doppler-Residuals-one-day.png 31 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/acceleration_example_multi_vehicle.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Vehicle1", "Vehicle2"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Earth", "Earth"] 6 | 7 | # Define accelerations acting on both vehicles 8 | accelerations_settings_vehicle = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Moon= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ], 17 | Earth= 18 | [ 19 | propagation_setup.acceleration.spherical_harmonic_gravity(5, 5), 20 | propagation_setup.acceleration.aerodynamic() 21 | ]) 22 | 23 | # Create global accelerations settings dictionary 24 | acceleration_settings = {"Vehicle1": accelerations_settings_vehicle, 25 | "Vehicle2": accelerations_settings_vehicle} 26 | 27 | # Create acceleration models 28 | acceleration_models = propagation_setup.create_acceleration_models( 29 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) -------------------------------------------------------------------------------- /docs/source/_snippets/spice_interface/test.py: -------------------------------------------------------------------------------- 1 | from tudatpy.interface import spice 2 | 3 | # load tudat standard spice kernels 4 | spice_interface.load_standard_kernels() 5 | 6 | # -------------------------------------------------- 7 | # get gravitational parameter of Earth using spice: 8 | # -------------------------------------------------- 9 | 10 | # get GM of Earth using spice bodvrd routine 11 | EARTH_GM = spice_interface.get_body_gravitational_parameter("Earth") 12 | 13 | EARTH_GM = spice_interface.get_body_properties("Earth", "GM", 1) 14 | 15 | EARTH_RADII = spice_interface.get_body_properties("Earth", "RADII", 3) 16 | 17 | print(EARTH_RADII) 18 | 19 | # -------------------------------------------------- 20 | # get cartesian state of Earth using spice: 21 | # -------------------------------------------------- 22 | EARTH_STATE = spice_interface.get_body_cartesian_state_at_epoch( 23 | target_body_name="Earth", 24 | observer_body_name="SSB", 25 | reference_frame_name="ECLIPJ2000", 26 | aberration_corrections="None", 27 | ephemeris_time=0) 28 | 29 | print(EARTH_STATE) 30 | -------------------------------------------------------------------------------- /docs/source/user-guide/advanced-topics/_static/himmelblau_udp.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | class HimmelblauOptimization: 4 | """ 5 | This class defines a PyGMO-compatible User-Defined Optimization Problem. 6 | """ 7 | 8 | def __init__(self, 9 | x_min: float, 10 | x_max: float, 11 | y_min: float, 12 | y_max: float): 13 | """ 14 | Constructor for the HimmelblauOptimization class. 15 | """ 16 | self.x_min = x_min 17 | self.x_max = x_max 18 | self.y_min = y_min 19 | self.y_max = y_max 20 | 21 | def get_bounds(self): 22 | """ 23 | Defines the boundaries of the search space. 24 | """ 25 | return ([self.x_min, self.y_min], [self.x_max, self.y_max]) 26 | 27 | def fitness(self, 28 | x: list): 29 | """ 30 | Computes the fitness value for the problem. 31 | """ 32 | function_value = math.pow(x[0] * x[0] + x[1] - 11.0, 2.0) + math.pow(x[0] + x[1] * x[1] - 7.0, 2.0) 33 | return [function_value] -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/acceleration_example_multi_vehicle.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Vehicle1", "Vehicle2"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Earth", "Earth"] 6 | 7 | # Define accelerations acting on both vehicles 8 | accelerations_settings_vehicle = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Moon= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ], 17 | Earth= 18 | [ 19 | propagation_setup.acceleration.spherical_harmonic_gravity(5, 5), 20 | propagation_setup.acceleration.aerodynamic() 21 | ]) 22 | 23 | # Create global accelerations settings dictionary 24 | acceleration_settings = {"Vehicle1": accelerations_settings_vehicle, 25 | "Vehicle2": accelerations_settings_vehicle} 26 | 27 | # Create acceleration models 28 | acceleration_models = propagation_setup.create_acceleration_models( 29 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/coupled_thrust_aerodynamics_example.py: -------------------------------------------------------------------------------- 1 | 2 | # Create bodies (same as in any other simulation) 3 | bodies = ... 4 | 5 | # Create guidance object 6 | guidance_model = SimpleCustomGuidanceModel( bodies ) 7 | 8 | # Extract guidance function 9 | thrust_magnitude_function = guidance_model.get_thrust_magnitude 10 | aerodynamic_angle_function = guidance_model.get_aerodynamic_angles 11 | 12 | # Create thrust settings from custom model, create engine model and add it to vehicle 13 | thrust_magnitude_settings = propagation_setup.thrust.custom_thrust_magnitude( thrust_magnitude_function, specific_impulse = 300.0 ) 14 | environment_setup.add_engine_model( "Vehicle", "MainEngine", thrust_magnitude_settings, system_of_bodies ) 15 | 16 | # Create angle-based rotation model settings for vehicle, create rotation model, and add it to vehicle 17 | rotation_model_settings = environment_setup.rotation_model.aerodynamic_angle_based( 18 | "Earth", "J2000", "Vehicle_fixed", aerodynamic_angle_function) 19 | environment_setup.add_rotation_model( bodies, "Vehicle", rotation_model_settings ) 20 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/solar_sail_radiation_pressure.cpp: -------------------------------------------------------------------------------- 1 | std::string sourceBody = "Sun"; 2 | 3 | double area = 2.0; 4 | 5 | std::function< double( const double ) > coneAngle = [ = ]( const double ){ return 0.25; }; 6 | std::function< double( const double ) > clockAngle = [ = ]( const double ){ return 0.2; }; 7 | 8 | double frontEmissivityCoefficient = 0.4; 9 | double backEmissivityCoefficient = 0.4; 10 | double frontLambertianCoefficient = 0.4; 11 | double backLambertianCoefficient = 0.4; 12 | double reflectivityCoefficient = 0.3; 13 | double specularReflectionCoefficient = 1.0; 14 | 15 | std::vector< std::string > occultingBodies; occultingBodies.push_back( "Earth" ); 16 | std::string& centralBody = "Earth"; 17 | 18 | bodySettings[ "Vehicle" ]->radiationPressureSettings[ sourceBody ] = std::make_shared< SolarSailRadiationInterfaceSettings >( 19 | sourceBody, area, coneAngle, clockAngle, frontEmissivityCoefficient, backEmissivityCoefficient, 20 | frontLambertianCoefficient, backLambertianCoefficient, reflectivityCoefficient, specularReflectionCoefficient, 21 | occultingBodies, centralBody ); -------------------------------------------------------------------------------- /docs/source/examples/mission-design.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _mission_design_examples: 3 | 4 | ======================= 5 | Mission Design 6 | ======================= 7 | 8 | Performance evaluation 9 | ********************** 10 | 11 | The following examples compute the performance (e.g. Delta V, time of flight, etc.) at one or more points in the design space, and visualize the results for the user. 12 | 13 | .. nbgallery:: 14 | 15 | ./tudatpy-examples/mission_design/mga_trajectories.ipynb 16 | ./tudatpy-examples/mission_design/earth_mars_transfer_window.ipynb 17 | ./tudatpy-examples/mission_design/low_thrust_earth_mars_transfer_window 18 | 19 | .. _trajectory_optimization_examples: 20 | 21 | Trajectory optimization 22 | *********************** 23 | 24 | The following examples optimize the performance (e.g. Delta V, time of flight, etc.) of transfer trajectories using the Pygmo toolbox. See :ref:`pygmo_examples` for more examples/links on the use of Pygmo 25 | 26 | .. nbgallery:: 27 | 28 | ./tudatpy-examples/mission_design/hodographic_shaping_mga_optimization.ipynb 29 | ./tudatpy-examples/mission_design/cassini1_mga_optimization.ipynb 30 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/acceleration_example_multi.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Moon", "Earth"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Sun", "Sun"] 6 | 7 | # Define accelerations acting on Vehicle 8 | accelerations_settings_moon = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Earth= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ] 17 | ) 18 | 19 | accelerations_settings_earth = dict( 20 | Sun= 21 | [ 22 | propagation_setup.acceleration.point_mass_gravity() 23 | ], 24 | Moon= 25 | [ 26 | propagation_setup.acceleration.point_mass_gravity() 27 | ] 28 | ) 29 | 30 | 31 | # Create global accelerations settings dictionary. 32 | acceleration_settings = {"Moon": accelerations_settings_moon, 33 | "Earth": accelerations_settings_earth} 34 | 35 | # Create acceleration models 36 | acceleration_models = propagation_setup.create_acceleration_models( 37 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/radiation_pressure_target_paneled.cpp: -------------------------------------------------------------------------------- 1 | // Occulting bodies can also be specified as map (see cannonball target) 2 | std::vector occultingBodies {"Earth"}; 3 | 4 | bodySettings.at("TestVehicle")->radiationPressureTargetModelSettings = 5 | paneledRadiationPressureTargetModelSettings({ 6 | // Panel properties: area, specular reflectivity, diffuse reflectivity, with/without instantaneous reradiation, normal vector 7 | // The normal vector is given in the spacecraft local frame 8 | // Absorptivity is calculated as 1 - (specular reflectivity + diffuse reflectivity) 9 | 10 | // Body panels, similarly for Y and Z 11 | TargetPanelSettings(2.82, 0.29, 0.22, true, Eigen::Vector3d::UnitX()), 12 | TargetPanelSettings(2.82, 0.39, 0.19, true, -Eigen::Vector3d::UnitX()), 13 | // Solar array tracks the Sun 14 | TargetPanelSettings(11.0, 0.05, 0.05, true, "Sun"), 15 | TargetPanelSettings(11.0, 0.30, 0.20, true, "Sun", false) 16 | }, occultingBodies); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/panelled_radiation_pressure.cpp: -------------------------------------------------------------------------------- 1 | std::string sourceBody = "Sun"; 2 | 3 | std::vector< double > emissivities = { 0.1, 0.0, 0.1, 0.1 }; 4 | std::vector< double > areas = { 4.0, 6.0, 2.3, 2.3 }; 5 | std::vector< double > diffusionCoefficients = { 0.46, 0.06, 0.46, 0.46 }; 6 | 7 | std::vector< std::string > occultingBodies; 8 | occultingBodies.push_back( "Earth" ); 9 | 10 | std::vector< std::function< Eigen::Vector3d( const double ) > > panelSurfaceNormals; 11 | panelSurfaceNormals.push_back( [ = ]( const double ){ return Eigen::Vector3d::UnitZ( ); } ); 12 | panelSurfaceNormals.push_back( [ = ]( const double ){ return - Eigen::Vector3d::UnitZ( ); } ); 13 | panelSurfaceNormals.push_back( [ = ]( const double ){ return Eigen::Vector3d::UnitX( ); } ); 14 | panelSurfaceNormals.push_back( [ = ]( const double ){ return - Eigen::Vector3d::UnitX( ); } ); 15 | 16 | bodySettings[ "Vehicle" ]->radiationPressureSettings[ sourceBody ] = std::make_shared< PanelledRadiationPressureInterfaceSettings >( 17 | sourceBody, emissivities, areas, diffusionCoefficients, surfaceNormalsInBodyFixedFrameFunctions, occultingBodies ); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/acceleration_models/acceleration_example_multi.py: -------------------------------------------------------------------------------- 1 | # Define bodies that are propagated 2 | bodies_to_propagate = ["Moon", "Earth"] 3 | 4 | # Define central bodies 5 | central_bodies = ["Sun", "Sun"] 6 | 7 | # Define accelerations acting on Vehicle 8 | accelerations_settings_moon = dict( 9 | Sun= 10 | [ 11 | propagation_setup.acceleration.point_mass_gravity() 12 | ], 13 | Earth= 14 | [ 15 | propagation_setup.acceleration.point_mass_gravity() 16 | ] 17 | ) 18 | 19 | accelerations_settings_earth = dict( 20 | Sun= 21 | [ 22 | propagation_setup.acceleration.point_mass_gravity() 23 | ], 24 | Moon= 25 | [ 26 | propagation_setup.acceleration.point_mass_gravity() 27 | ] 28 | ) 29 | 30 | 31 | # Create global accelerations settings dictionary. 32 | acceleration_settings = {"Moon": accelerations_settings_moon, 33 | "Earth": accelerations_settings_earth} 34 | 35 | # Create acceleration models 36 | acceleration_models = propagation_setup.create_acceleration_models( 37 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) -------------------------------------------------------------------------------- /docs/source/_static/icons/user-astronaut-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/index-examples.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description lang=en: 3 | A list of examples using the open-source TU Delft Astrodynamics toolbox (Tudat), ranging from preliminary orbit optimization to high-fidelity orbit determination 4 | 5 | .. _getting_started_examples: 6 | 7 | ========= 8 | Examples 9 | ========= 10 | 11 | The examples below will help you get started in exploring the diverse capabilities of Tudat! 12 | 13 | .. nbgallery:: 14 | :caption: Tudatpy example categories 15 | :name: example-categories 16 | 17 | /examples/propagation 18 | /examples/estimation 19 | /examples/mission-design 20 | /examples/pygmo 21 | 22 | 23 | .. grid:: 2 24 | :gutter: 2 25 | 26 | .. grid-item-card:: 27 | :text-align: center 28 | 29 | **Github Repository** 30 | ^^^ 31 | 32 | The same examples shown above available on Github, both as Jupyter notebooks and regular *.py* files, in the ``tudatpy-examples`` repository. 33 | 34 | +++ 35 | 36 | .. button-link:: https://github.com/tudat-team/tudatpy-examples 37 | :expand: 38 | :color: primary 39 | :click-parent: 40 | :outline: 41 | 42 | Go to the repository 43 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_ephemeris_example_class.py: -------------------------------------------------------------------------------- 1 | def neptune_state_function( current_time ): 2 | # Define constants for Neptune ephemeris 3 | orbital_radius = 4.5E12 4 | sun_gravitational_parameter = 1.32712440042E20 5 | anomaly_at_j2000 = np.deg2rad( 304.88003 ) 6 | 7 | # Compute orbitall velocity and orbital period 8 | orbital_velocity = math.sqrt( sun_gravitational_parameter / orbital_radius ) 9 | orbital_period = 2.0 * math.pi * math.sqrt( orbital_radius ** 3 / sun_gravitational_parameter ) 10 | 11 | # Compute current angular position along orbit 12 | anomaly_at_epoch = anomaly_at_j2000 + 2.0 * math.pi * ( current_time / orbital_period ) 13 | 14 | # Compute and return Neptune state 15 | return np.array([orbital_radius * math.cos(anomaly_at_epoch)],[orbital_radius * math.cos(anomaly_at_epoch)],[0.0] ) 16 | 17 | ... 18 | 19 | # Retrieve custom state function, and set as ephemeris function w.r.t. Sun, with axes along J2000 20 | custom_state_function = neptune_state_function 21 | body_settings.get( "Neptune" ).ephemeris_settings = environment_setup.ephemeris.custom( 22 | custom_state_function, 'Sun', 'ECLIPJ2000' ) 23 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/add_body_properties.py: -------------------------------------------------------------------------------- 1 | # Set mass of vehicle 2 | bodies.get( "Vehicle").mass = 5000.0 3 | 4 | # Alternative, more extensive, approach to do the same (add constant mass) 5 | #rigid_body_properties = environment_setup.rigid_body.constant_rigid_body_properties( 5000.0 ) 6 | #environment_setup.add_rigid_body_properties( bodies, "Vehicle", rigid_body_properties ) 7 | 8 | # Create aerodynamic coefficient interface settings, and add to vehicle 9 | aero_coefficient_settings = environment_setup.aerodynamic_coefficients.constant( 10 | reference_area = 50.0, 11 | constant_force_coefficient = [drag_coefficient,0,0] 12 | ) 13 | environment_setup.add_aerodynamic_coefficient_interface( 14 | bodies, "Vehicle", aero_coefficient_settings ) 15 | 16 | # Create radiation pressure settings, and add to vehicle 17 | radiation_pressure_settings = environment_setup.radiation_pressure.cannonball_radiation_target( 18 | reference_area = 50.0, 19 | radiation_pressure_coefficient = 1.5, 20 | per_source_occulting_bodies = {"Sun": ["Earth"]}, 21 | ) 22 | environment_setup.add_radiation_pressure_target_model( 23 | bodies, "Vehicle", radiation_pressure_settings ) 24 | -------------------------------------------------------------------------------- /docs/source/getting-started/_static/install-osx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NOTICE: bash's 'set -e' may trigger errors in sourcing .bash_profile 4 | 5 | function echo_red 6 | { 7 | echo -e '\033[3;31m'"$@"'\033[0m' 8 | } 9 | 10 | echo_red "brew install miniconda" 11 | brew install miniconda 12 | echo_red "conda init" 13 | conda init "$(basename "${SHELL}")" 14 | echo_red "source .bash_profile" 15 | . $HOME/.bash_profile 16 | echo_red "download environment.yaml" 17 | [ -e ./environment.yaml ] || wget https://tudat-space.readthedocs.io/en/latest/_downloads/2ff196b0ef4830f53d754f6a3972d2e8/environment.yaml 18 | echo_red "conda env create" 19 | conda env create -f environment.yaml 20 | echo_red "conda activate tudat-space" 21 | conda activate tudat-space 22 | echo_red "conda config --add channels tudat-team" 23 | conda config --add channels tudat-team 24 | echo_red "conda install tudat" 25 | conda install --yes -c tudat-team tudat 26 | echo_red "conda install tudatpy" 27 | conda install --yes -c tudat-team tudatpy 28 | for i in 1 2 3 10 29 | do 30 | echo_red "download tutorial_$i.py" 31 | [ -e tutorial_$i.py ] || wget https://raw.githubusercontent.com/tudat-team/tudatpy/feature/po_updates/examples/tutorial_$i.py 32 | echo_red "test tutorial_$i.py" 33 | python3 tutorial_$i.py 34 | done -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_ephemeris_example.py: -------------------------------------------------------------------------------- 1 | def neptune_state_function( current_time ): 2 | if( current_time == current_time ): 3 | 4 | # Define constants for Neptune ephemeris 5 | orbital_radius = 4.5E12 6 | sun_gravitational_parameter = 1.32712440042E20 7 | anomaly_at_j2000 = np.deg2rad( 304.88003 ) 8 | 9 | # Compute orbitall velocity and orbital period 10 | orbital_velocity = math.sqrt( sun_gravitational_parameter / orbital_radius ) 11 | orbital_period = 2.0 * math.pi * math.sqrt( orbital_radius ** 3 / sun_gravitational_parameter ) 12 | 13 | # Compute current angular position along orbit 14 | anomaly_at_epoch = anomaly_at_j2000 + 2.0 * math.pi * ( current_time / orbital_period ) 15 | 16 | # Compute and return Neptune state 17 | return np.array([orbital_radius * math.cos(anomaly_at_epoch)],[orbital_radius * math.cos(anomaly_at_epoch)],[0.0] ) 18 | 19 | ... 20 | 21 | # Retrieve custom state function, and set as ephemeris function w.r.t. Sun, with axes along J2000 22 | custom_state_function = neptune_state_function 23 | body_settings.get( "Neptune" ).ephemeris_settings = environment_setup.ephemeris.custom_ephemeris( 24 | custom_state_function, 'Sun', 'ECLIPJ2000' ) 25 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/environment_models/radiation_source_extended.cpp: -------------------------------------------------------------------------------- 1 | 2 | // Earth albedo and thermal radiation with two rings as introduced by Knocke (1988) 3 | bodySettings.at("Earth")->radiationSourceModelSettings = 4 | extendedRadiationSourceModelSettings({ 5 | albedoPanelRadiosityModelSettings(SecondDegreeZonalPeriodicSurfacePropertyDistributionModel::albedo_knocke, "Sun"), 6 | delayedThermalPanelRadiosityModelSettings(SecondDegreeZonalPeriodicSurfacePropertyDistributionModel::emissivity_knocke, "Sun") 7 | }, {6, 12}); 8 | 9 | 10 | // Occulting bodies for source panels 11 | // This can, for example, account for lunar eclipses (Earth occults Sun as seen from Moon) 12 | std::vector occultingBodies {"Earth"}; 13 | 14 | // Moon albedo and thermal with six rings 15 | // The albedo distribution is given by the spherical harmonics distribution of DLAM-1 16 | // More rings are necessary for lower altitudes 17 | bodySettings.at("Moon")->radiationSourceModelSettings = 18 | extendedRadiationSourceModelSettings({ 19 | albedoPanelRadiosityModelSettings(SphericalHarmonicsSurfacePropertyDistributionModel::albedo_dlam1, "Sun"), 20 | angleBasedThermalPanelRadiosityModelSettings(95, 385, 0.95, "Sun") 21 | }, {6, 12, 18, 24, 30, 36}, occultingBodies); -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/parallelization/pygmo_batch_fitness.py: -------------------------------------------------------------------------------- 1 | def batch_fitness(self, 2 | design_parameter_vectors: np.ndarray) -> List[float]: 3 | """ 4 | Function to evaluate the fitness. A single-objective optimization is used, in which the objective is the deltaV 5 | necessary to execute the transfer. 6 | """ 7 | 8 | # Compute the final index of each type of parameters 9 | time_of_flight_index = 3 + self.no_of_legs 10 | incoming_velocity_index = time_of_flight_index + self.no_of_swingbys 11 | swingby_periapsis_index = incoming_velocity_index + self.no_of_swingbys 12 | shaping_free_coefficient_index = swingby_periapsis_index + self.total_no_shaping_free_coefficients 13 | revolution_index = shaping_free_coefficient_index + self.no_of_legs 14 | 15 | len_single_dpv = revolution_index 16 | dpvs = design_parameter_vectors.reshape(len(design_parameter_vectors)//len_single_dpv, len_single_dpv) 17 | 18 | inputs, fitnesses = [], [] 19 | for dpv in dpvs: 20 | inputs.append([list(dpv)]) 21 | 22 | # cpu_count = len(os.sched_getaffinity(0)) 23 | cpu_count = mp.cpu_count() 24 | with mp.get_context("spawn").Pool(processes=int(cpu_count-4)) as pool: 25 | outputs = pool.map(self.fitness, inputs) 26 | 27 | for output in outputs: 28 | fitnesses.append(output) 29 | 30 | return fitnesses 31 | 32 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/parallelization/pg_bfe_evolve.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | bfe = True 3 | 4 | seed = 42 5 | pop_size = 500 6 | 7 | # Create Pygmo problem 8 | transfer_optimization_problem = MGAHodographicShapingTrajectoryOptimizationProblem( 9 | central_body, transfer_body_order, bounds, departure_semi_major_axis, departure_eccentricity, 10 | arrival_semi_major_axis, arrival_eccentricity) 11 | prob= pg.problem(transfer_optimization_problem) 12 | 13 | # Create algorithm and define its seed 14 | algo = pg.gaco() 15 | if bfe: 16 | algo.set_bfe(pg.bfe()) 17 | algo = pg.algorithm(algo) 18 | 19 | bfe_pop = pg.default_bfe() if bfe else None 20 | pop = pg.population(prob=prob, size=pop_size, seed=seed) 21 | 22 | num_gen = 150 23 | 24 | # Initialize lists with the best individual per generation 25 | list_of_champion_f = [pop.champion_f] 26 | list_of_champion_x = [pop.champion_x] 27 | 28 | # mp.freeze_support() needs to be called when using multiprocessing on windows 29 | # mp.freeze_support() 30 | 31 | for i in range(num_gen): 32 | print(f'Evolution: {i+1} / {num_gen}', end='\r') 33 | pop =algo.evolve(pop) 34 | 35 | # Save current champion 36 | list_of_champion_x.append(pop.champion_x) 37 | list_of_champion_f.append(pop.champion_f) 38 | print('Evolution finished') 39 | 40 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/parallelization/pg_archi.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | seed = 42 3 | pop_size = 1000 4 | number_of_islands = 4 5 | 6 | # Create Pygmo problem 7 | transfer_optimization_problem = MGAHodographicShapingTrajectoryOptimizationProblem( 8 | central_body, transfer_body_order, bounds, departure_semi_major_axis, departure_eccentricity, 9 | arrival_semi_major_axis, arrival_eccentricity) 10 | problem = pg.problem(transfer_optimization_problem) 11 | 12 | # Create algorithm and define its seed 13 | algorithm = pg.algorithm(pg.sga(gen=1)) 14 | algorithm.set_seed(seed) 15 | 16 | # Create island 17 | archi = pg.archipelago(n=number_of_islands, algo=algorithm, prob=transfer_optimization_problem, pop_size=pop_size) 18 | 19 | num_gen = 40 20 | 21 | # Initialize lists with the best individual per generation 22 | list_of_champion_f = [] 23 | list_of_champion_x = [] 24 | 25 | # mp.freeze_support() needs to be called when using multiprocessing on windows 26 | # mp.freeze_support() 27 | 28 | for i in range(num_gen): 29 | print('Evolution: %i / %i' % (i+1, num_gen)) 30 | 31 | archi.evolve() # Evolve archi 32 | archi.wait_check() # Wait until all evolution tasks in the archi finish 33 | 34 | # Save current champion 35 | list_of_champion_x.append(archi.get_champion_x()) 36 | list_of_champion_f.append(archi.get_champion_f()) 37 | 38 | print('Evolution finished') 39 | 40 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_class_simple_aero_angles.py: -------------------------------------------------------------------------------- 1 | class LinearTimeAerodynamicGuidance: 2 | 3 | def __init__(self, angle_of_attack_rate, sideslip_angle_rate, bank_angle_rate, reference_time ): 4 | 5 | # Define members 6 | self.angle_of_attack_rate = angle_of_attack_rate 7 | self.sideslip_angle_rate = sideslip_angle_rate 8 | self.bank_angle_rate = bank_angle_rate 9 | self.reference_time = reference_time 10 | 11 | def get_current_aerodynamic_angles(self, current_time: float): 12 | 13 | if( current_time == current_time ): 14 | 15 | # Update the class to the current time 16 | angle_of_attack = self.angle_of_attack_rate * ( current_time - self.reference_time ) 17 | sideslip_angle = self.sideslip_angle_rate * ( current_time - self.reference_time ) 18 | bank_angle = self.bank_angle_rate * ( current_time - self.reference_time ) 19 | 20 | 21 | # Define angle function (required for input to rotation settings) 22 | guidance_class = LinearTimeAerodynamicGuidance( 23 | angle_of_attack_rate = np.deg2rad( 0.01 ), 24 | sideslip_angle_rate = 0.0, 25 | bank_angle_rate = np.deg2rad( 0.2 ), 26 | reference_time = 10.0 * tudatpy.constants.JULIAN_YEAR ) 27 | 28 | # Create settings for rotation model from guidance class 29 | rotation_model_settings = environment_setup.rotation_model.aerodynamic_angle_based( 30 | central_body="Earth", 31 | target_frame = "VehicleFixed", 32 | angle_funcion = guidance_class.get_current_aerodynamic_angles ) 33 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagation-setup/dependent-variables.rst: -------------------------------------------------------------------------------- 1 | .. _dependent_variables: 2 | 3 | Dependent Variables 4 | ################### 5 | 6 | Dependent variables can be added to the propagation settings by first defining 7 | a list of desired dependent variables, which is supplied as input argument to the 8 | :func:`~tudatpy.dynamics.propagation_setup.propagator.translational`, 9 | :func:`~tudatpy.dynamics.propagation_setup.propagator.rotational`, 10 | :func:`~tudatpy.dynamics.propagation_setup.propagator.mass`, 11 | :func:`~tudatpy.dynamics.propagation_setup.propagator.custom_state` or 12 | :func:`~tudatpy.dynamics.propagation_setup.propagator.multitype` 13 | propagators. 14 | 15 | Each dependent variable is created via a dedicated factory function. See the example below for the definition of four separate dependent variables: 16 | 17 | 18 | .. code-block:: python 19 | 20 | dependent_variables_to_save = [ 21 | propagation_setup.dependent_variable.total_acceleration( "Delfi-C3" ), 22 | propagation_setup.dependent_variable.keplerian_state( "Delfi-C3", "Earth" ), 23 | propagation_setup.dependent_variable.latitude( "Delfi-C3", "Earth" ), 24 | propagation_setup.dependent_variable.longitude( "Delfi-C3", "Earth" ) 25 | ] 26 | 27 | this list is then added to one of the propagator setting functions listed above. 28 | 29 | You can find a full list of dependent variables that can be saved :doc:`in our API documentation `. Note that **all** dependent variables are provided in SI units (meters, radians, kilograms, seconds since J2000). 30 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/propagation_setup/thrust/thrust_vs_aero_orientation.py: -------------------------------------------------------------------------------- 1 | # Define thrust direction settings from state guidance 2 | thrust_direction_settings = thrust.thrust_direction_from_state_guidance( 3 | central_body, 4 | is_colinear_with_velocity=True, 5 | direction_is_opposite_to_vector=True 6 | ) 7 | 8 | # Use constant thrust magnitude settings 9 | thrust_magnitude_settings = thrust.constant_thrust_magnitude(thrust_magnitude=1.5e3, specific_impulse=315) 10 | 11 | # Create the dictionary containing the thrust acceleration 12 | acceleration_dict = { 13 | "Vehicle": 14 | {"Vehicle": [ 15 | propagation_setup.acceleration.thrust_from_direction_and_magnitude( 16 | thrust_direction_settings, 17 | thrust_magnitude_settings 18 | ) 19 | ]} 20 | } 21 | # Create the acceleration model in the system of bodies 22 | acceleration_model = propagation_setup.create_acceleration_models( 23 | system_of_bodies, accelerations_on_vehicle_dict, bodies_to_propagate, central_bodies 24 | ) 25 | 26 | # Define aerodynamic guidance 27 | class AeroGuidance(propagation.AerodynamicGuidance): 28 | 29 | def __init__(self): 30 | # Call the base class constructor 31 | propagation.AerodynamicGuidance.__init__(self) 32 | 33 | def updateGuidance(self, current_time): 34 | # Update angle of attack 35 | self.angle_of_attack = np.deg2rad(1.5) * np.sin(current_time*np.pi/750) 36 | 37 | # Add the aerodynamic guidance to the Vehicle body 38 | environment_setup.set_aerodynamic_guidance(AeroGuidance(), system_of_bodies.get("Vehicle"), silence_warnings=True) -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation.rst: -------------------------------------------------------------------------------- 1 | .. _state_propagation: 2 | 3 | ****************** 4 | State Propagation 5 | ****************** 6 | 7 | In this section, the different stages and options of a typical simulation setup for a numerical state propagation are described. 8 | Tudat is organized as shown in the figure below. 9 | 10 | 11 | .. figure:: _static/tudatpy_high_level.png 12 | :width: 600 13 | 14 | Inputs 15 | ======= 16 | 17 | There are two distinct input types necessary to create a simulation: 18 | 19 | - :ref:`environment_setup`: physical modeling of environment and system properties (for both celestial and artificial bodies) 20 | - :ref:`propagation_setup`: formulation of the differential equations representing the problem, and the method to solve them 21 | 22 | .. toctree:: 23 | :titlesonly: 24 | :hidden: 25 | :maxdepth: 1 26 | 27 | state-propagation/environment-setup 28 | state-propagation/propagation-setup 29 | 30 | 31 | Simulation & Output 32 | =================== 33 | 34 | Once all the settings are in place, the numerical solution to the equations of motion can be generated. All the details 35 | about this part, including the interpretation and availability of outputs, are explained in the following pages: 36 | 37 | - :ref:`propagating_dynamics`: For simulations in which only the dynamics are propagated 38 | - :ref:`propagating_variational_simulation` For simulations in which the dynamics and associated variational equations are propagated 39 | 40 | 41 | .. toctree:: 42 | :titlesonly: 43 | :hidden: 44 | :maxdepth: 1 45 | 46 | state-propagation/propagating-dynamics 47 | state-propagation/propagating-variational-simulation 48 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/custom_class_multiple.py: -------------------------------------------------------------------------------- 1 | class CustomGuidanceModel: 2 | 3 | def __init__(self, bodies: environment.SystemOfBodies): 4 | 5 | # Extract the STS and Earth bodies 6 | self.vehicle = bodies.get_body("Vehicle") 7 | self.earth = bodies.get_body("Earth") 8 | 9 | self.current_time = float("NaN") 10 | 11 | def get_aerodynamic_angles(self, current_time: float): 12 | 13 | # Update the class to the current time 14 | self.update_guidance( current_time ) 15 | 16 | # Return angles calculated by update function 17 | return np.array([self.angle_of_attack, 0.0, self.bank_angle]) 18 | 19 | def get_thrust_magnitude(self, current_time: float): 20 | 21 | # Update the class to the current time 22 | self.update_guidance( current_time ) 23 | 24 | # Return angles calculated by update function 25 | return self.thrust_magnitude 26 | 27 | def update_guidance(self, current_time: float): 28 | 29 | if( math.isnan( current_time ) ): 30 | # Set the model's current time to NaN, indicating that it needs to be updated 31 | self.current_time = float("NaN") 32 | elif( current_time != self.current_time ): 33 | 34 | # Calculate current body orientation through angle of attack and bank angle 35 | self.angle_of_attack = ... 36 | self.bank_angle = ... 37 | 38 | # Calculate current thrust magnitude 39 | self.thrust_magnitude = ... 40 | 41 | # Set the model's current time, indicating that it has been updated 42 | self.current_time = current_time 43 | -------------------------------------------------------------------------------- /docs/source/examples/propagation.rst: -------------------------------------------------------------------------------- 1 | .. _propagation_examples: 2 | 3 | ==================== 4 | Propagation 5 | ==================== 6 | 7 | Introductory examples 8 | ********************* 9 | 10 | The following examples showcase the basic functionality of the Tudat numerical propagation framework, for both dynamics and the associated variational equations. 11 | 12 | .. nbgallery:: 13 | 14 | 15 | ./tudatpy-examples/propagation/keplerian_satellite_orbit.ipynb 16 | ./tudatpy-examples/propagation/perturbed_satellite_orbit.ipynb 17 | ./tudatpy-examples/propagation/linear_sensitivity_analysis.ipynb 18 | ./tudatpy-examples/propagation/solar_system_propagation.ipynb 19 | ./tudatpy-examples/propagation/thrust_between_Earth_Moon.ipynb 20 | ./tudatpy-examples/propagation/juice_flybys.ipynb 21 | ./tudatpy-examples/propagation/panelled_radiation_target.ipynb 22 | 23 | Advanced examples 24 | ********************* 25 | 26 | The following examples, some of the more advanced features of Tudat are showcased, using either custom functions for guidance, or a more complex definition of the equations of motion. 27 | Note that an additional related example (in particular on the setup of a custom environment) can be found on the page for :ref:`asteroid_optimization_examples`. 28 | 29 | .. nbgallery:: 30 | 31 | ./tudatpy-examples/propagation/reentry_trajectory.ipynb 32 | ./tudatpy-examples/propagation/two_stage_rocket_ascent.ipynb 33 | ./tudatpy-examples/propagation/separation_satellites_diff_drag.ipynb 34 | ./tudatpy-examples/propagation/thrust_satellite_engine.ipynb 35 | ./tudatpy-examples/propagation/coupled_translational_rotational_dynamics.ipynb 36 | ./tudatpy-examples/propagation/impact_manifolds_lpo_cr3bp.ipynb 37 | 38 | 39 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | 2 | ============= 3 | Changelog 4 | ============= 5 | 6 | All notable changes to this project will be documented in this file. 7 | 8 | The format is based on `Keep a Changelog `_ 9 | and this project adheres to `Semantic Versioning `_. 10 | 11 | [0.3.0] - 2022/04/09 12 | ===================== 13 | 14 | Added 15 | ******* 16 | - Information on how to update tudatpy when the classic conda command fails. 17 | 18 | [0.2.0] - 2022/03/19 19 | ===================== 20 | 21 | Changed 22 | ******* 23 | - Deactivated automatic build on readthedocs for unstable releases 24 | 25 | [0.1.0] - 2022/03/19 26 | ===================== 27 | 28 | Added 29 | ******* 30 | - TOC tree section with mathematical model definition 31 | 32 | Changed 33 | ******** 34 | - TOC tree with new section ("advanced topics") 35 | 36 | [0.0.5] - 2022/03/18 37 | ===================== 38 | 39 | Changed 40 | ******** 41 | - Plots in examples are not interactive anymore (bug fixed) 42 | 43 | [0.0.4] - 2022/03/18 44 | ===================== 45 | 46 | Added 47 | ****** 48 | - Embedded changelog in a proper doc page 49 | 50 | [0.0.3] - 2022/03/17 51 | ===================== 52 | 53 | Added 54 | ****** 55 | 56 | - Examples in the form of Jupyter notebooks 57 | 58 | Changed 59 | ********* 60 | 61 | - Example page with gallery 62 | 63 | Removed 64 | ********* 65 | 66 | - Old examples hardcoded in Sphinx 67 | 68 | [0.0.2] - 2022/03/17 69 | ===================== 70 | 71 | Added 72 | ********* 73 | 74 | Added `CHANGELOG.md`. 75 | 76 | [0.0.1] 77 | ===================== 78 | 79 | No log was kept until 2022/03/17. 80 | 81 | Added 82 | ********* 83 | 84 | Changed 85 | ********* 86 | 87 | Removed 88 | ********* -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_gravity_assist_advanced.py: -------------------------------------------------------------------------------- 1 | # required external imports (for parameters) 2 | import numpy as np 3 | import spiceypy as spice 4 | import os 5 | 6 | # required internal imports 7 | from tudatpy import io 8 | from tudatpy.astro import two_body_dynamics 9 | 10 | # current implementation 11 | tudat_spice_kernels = [ 12 | "pck00010.tpc", 13 | "gm_de431.tpc", 14 | "tudat_merged_spk_kernel.bsp", 15 | "naif0012.tls"] 16 | 17 | spice_kernel_paths = map( 18 | lambda x: os.path.join(io.get_spice_kernel_path(), x), 19 | tudat_spice_kernels) 20 | 21 | # future implementation 22 | # spice_kernel_paths = spice_interface.get_standard_kernels() 23 | 24 | # load standard spice kernels 25 | spice.furnsh(spice_kernel_paths) 26 | 27 | # -------------------------------------------------- 28 | # get gravitational parameter of Sun using spice: 29 | # -------------------------------------------------- 30 | 31 | # get GM of Earth using spice bodvrd routine 32 | spice_bodvrd_result = spice.bodvrd("Sun", "GM", 1) 33 | 34 | # extract value from result which is tuple of (dim, values) 35 | spice_bodvrd_param = spice_bodvrd_result[1][0] # km^3/s^2 36 | 37 | # convert to m^3/s^2 38 | SUN_GM = spice_bodvrd_param * (10 ** 3) ** 3 39 | 40 | # -------------------------------------------------- 41 | # get position of Earth in reference frame 42 | # (SSB, EJ2000) at initial epoch 43 | # -------------------------------------------------- 44 | 45 | # needs exposure of SpiceEphemeris 46 | 47 | # -------------------------------------------------- 48 | # get position of Mars in reference frame 49 | # (SSB, EJ2000) at final epoch 50 | # -------------------------------------------------- 51 | 52 | # needs exposure of SpiceEphemeris 53 | 54 | -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_capture_escape_advanced.py: -------------------------------------------------------------------------------- 1 | # required external imports (for parameters) 2 | import numpy as np 3 | import spiceypy as spice 4 | import os 5 | 6 | # required internal imports 7 | from tudatpy import io 8 | from tudatpy.astro import two_body_dynamics 9 | 10 | # current implementation 11 | tudat_spice_kernels = [ 12 | "pck00010.tpc", 13 | "gm_de431.tpc", 14 | "tudat_merged_spk_kernel.bsp", 15 | "naif0012.tls"] 16 | 17 | spice_kernel_paths = map( 18 | lambda x: os.path.join(io.get_spice_kernel_path(), x), 19 | tudat_spice_kernels) 20 | 21 | # future implementation 22 | # spice_kernel_paths = spice_interface.get_standard_kernels() 23 | 24 | # load standard spice kernels 25 | spice.furnsh(spice_kernel_paths) 26 | 27 | 28 | 29 | # -------------------------------------------------- 30 | # get gravitational parameter of Earth using spice: 31 | # -------------------------------------------------- 32 | 33 | # get GM of Earth using spice bodvrd routine 34 | spice_bodvrd_result = spice.bodvrd("Earth", "GM", 1) 35 | 36 | # extract value from result which is tuple of (dim, values) 37 | spice_bodvrd_param = spice_bodvrd_result[1][0] # km^3/s^2 38 | 39 | # convert to m^3/s^2 40 | EARTH_GM = spice_bodvrd_param * (10 ** 3) ** 3 41 | 42 | # -------------------------------------------------- 43 | # get average radius of Earth using spice: 44 | # -------------------------------------------------- 45 | 46 | # get GM of Earth using spice bodvrd routine 47 | spice_bodvrd_RADII_result = spice.bodvrd("Earth", "RADII", 3) 48 | 49 | # extract value from result which is tuple of (dim, values) 50 | spice_bodvrd_RADII = spice_bodvrd_RADII_result[1] # km 51 | 52 | # average ellipsoid radii for single value and convert to m 53 | EARTH_R = np.average(spice_bodvrd_RADII) * 10 ** 3 -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/req_lambert_targeter_advanced.py: -------------------------------------------------------------------------------- 1 | # required external imports 2 | import numpy as np 3 | import spiceypy as spice 4 | import os 5 | 6 | # required internal imports 7 | from tudatpy import io 8 | from tudatpy.astro import two_body_dynamics 9 | 10 | # current implementation 11 | tudat_spice_kernels = [ 12 | "pck00010.tpc", 13 | "gm_de431.tpc", 14 | "tudat_merged_spk_kernel.bsp", 15 | "naif0012.tls"] 16 | 17 | spice_kernel_paths = map( 18 | lambda x: os.path.join(io.get_spice_kernel_path(), x), 19 | tudat_spice_kernels) 20 | 21 | # future implementation 22 | # spice_kernel_paths = spice_interface.get_standard_kernels() 23 | 24 | # load standard spice kernels 25 | spice.furnsh(spice_kernel_paths) 26 | 27 | # -------------------------------------------------- 28 | # get gravitational parameter of Sun using spice: 29 | # -------------------------------------------------- 30 | 31 | # get GM of Earth using spice bodvrd routine 32 | spice_bodvrd_result = spice.bodvrd("Sun", "GM", 1) 33 | 34 | # extract value from result which is tuple of (dim, values) 35 | spice_bodvrd_param = spice_bodvrd_result[1][0] # km^3/s^2 36 | 37 | # convert to m^3/s^2 38 | SUN_GM = spice_bodvrd_param * (10 ** 3) ** 3 39 | 40 | # -------------------------------------------------- 41 | # get position of Earth in reference frame 42 | # (SSB, EJ2000) at initial epoch 43 | # -------------------------------------------------- 44 | 45 | # needs exposure of SpiceEphemeris 46 | EARTH_POS_INITIAL_EPOCH = None # ... 47 | 48 | # -------------------------------------------------- 49 | # get position of Mars in reference frame 50 | # (SSB, EJ2000) at final epoch 51 | # -------------------------------------------------- 52 | 53 | # # needs exposure of SpiceEphemeris 54 | MARS_POS_FINAL_EPOCH = None # ... 55 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/full_mass_setup.py: -------------------------------------------------------------------------------- 1 | # Create physical environment 2 | bodies = environment_setup.create_system_of_bodies( ... ) 3 | 4 | # Define bodies that are propagated 5 | bodies_to_propagate = ["Spacecraft"] 6 | 7 | # Create mass rate models, note that the model below will only work as part of a 8 | # multitype propagation, where mass and translational state are propagated, and 9 | # a thrust acceleration is acting on the spacecraft 10 | mass_rate_settings = dict(Vehicle=[propagation_setup.mass_rate.from_thrust()]) 11 | mass_rate_models = propagation_setup.create_mass_rate_models( 12 | bodies, 13 | mass_rate_settings, 14 | acceleration_models 15 | ) 16 | # Define initial conditions 17 | initial_mass = 3400.0 # kg 18 | 19 | # Define numerical integrator (RK4; step size 2 seconds) 20 | integrator_settings = propagation_setup.integrator.runge_kutta_fixed_step( 21 | 2.0, integrator.CoefficientSets.rk_4 ) 22 | 23 | # Start of simulation 24 | simulation_start_epoch = 9120.0 * constants.JULIAN_DAY 25 | 26 | # Define termination settings 27 | simulation_end_epoch = 9140 * constants.JULIAN_DAY 28 | termination_settings = propagation_setup.propagator.time_termination( 29 | simulation_end_epoch ) 30 | 31 | # Define dependent variables 32 | dependent_variables_to_save = [propagation_setup.dependent_variable.total_mass_rate("Spacecraft")] 33 | 34 | # Define mass propagator settings 35 | mass_propagator_settings = propagation_setup.propagator.mass( 36 | mass_rate_models, 37 | bodies_to_propagate, 38 | initial_mass, 39 | simulation_start_epoch, 40 | integrator_settings, 41 | termination_settings, 42 | output_variables=dependent_variables_to_save) 43 | 44 | # Set print frequency (to terminal) at once per day 45 | mass_propagator_settings.print_settings.results_print_frequency_in_seconds = 86400.0 46 | -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/manual_node_leg_settings.py: -------------------------------------------------------------------------------- 1 | # Define the order of bodies (nodes) for gravity assists 2 | transfer_body_order = ['Earth', 'Venus', 'Venus', 'Earth', 'Jupiter', 'Saturn'] 3 | 4 | # define ToF values per leg 5 | time_of_flight = np.array([1.97844702e+07, 6.68197546e+07, 1.00154317e+07, 3.2306349e+8, 4.21392438e+8]) #s 6 | 7 | # define number of revolutions per leg 8 | number_of_revolutions = np.array([2, 0, 1, 1, 0]) 9 | 10 | # Define the departure and insertion orbits 11 | departure_semi_major_axis = np.inf 12 | departure_eccentricity = 0. 13 | arrival_semi_major_axis = 1.0895e8 / 0.02 14 | arrival_eccentricity = 0.98 15 | 16 | # Determine number of legs and GA's 17 | no_of_legs = len(transfer_body_order) - 1 18 | no_of_gas = len(transfer_body_order) - 2 19 | 20 | #Create transfer leg settings 21 | transfer_leg_settings = [] 22 | for i in range(no_of_legs): 23 | radial_velocity_functions = shape_based_thrust.recommended_radial_hodograph_functions(time_of_flight) 24 | normal_velocity_functions = shape_based_thrust.recommended_normal_hodograph_functions(time_of_flight) 25 | axial_velocity_functions = shape_based_thrust.recommended_axial_hodograph_functions(time_of_flight, 26 | number_of_revolutions) 27 | transfer_leg_settings.append(transfer_trajectory.hodographic_shaping_leg( 28 | radial_velocity_functions, normal_velocity_functions, axial_velocity_functions)) 29 | 30 | #Create transfer node settings 31 | transfer_node_settings = [] 32 | transfer_node_settings.append( transfer_trajectory.departure_node(departure_semi_major_axis, departure_eccentricity) ) 33 | for i in range(no_of_gas): 34 | transfer_node_settings.append( transfer_trajectory.swingby_node() ) 35 | transfer_node_settings.append( transfer_trajectory.capture_node(arrival_semi_major_axis, arrival_eccentricity) ) 36 | 37 | -------------------------------------------------------------------------------- /docs/source/_snippets/astrodynamics/two_body_dynamics/capture_escape.py: -------------------------------------------------------------------------------- 1 | # required external imports (for parameters) 2 | import numpy as np 3 | import spiceypy as spice 4 | import os 5 | 6 | # required internal imports 7 | from tudatpy import io 8 | from tudatpy.astro import two_body_dynamics 9 | from tudatpy.interface import spice 10 | 11 | # future implementation 12 | spice_kernel_paths = spice_interface.get_standard_kernels([]) 13 | 14 | # load standard spice kernels 15 | spice.furnsh(spice_kernel_paths) 16 | 17 | # -------------------------------------------------- 18 | # get gravitational parameter of Earth using spice: 19 | # -------------------------------------------------- 20 | 21 | # get GM of Earth using spice bodvrd routine 22 | spice_bodvrd_result = spice.bodvrd("Earth", "GM", 1) 23 | 24 | # extract value from result which is tuple of (dim, values) 25 | spice_bodvrd_param = spice_bodvrd_result[1][0] # km^3/s^2 26 | 27 | # convert to m^3/s^2 28 | EARTH_GM = spice_bodvrd_param * (10 ** 3) ** 3 29 | 30 | # -------------------------------------------------- 31 | # get average radius of Earth using spice: 32 | # -------------------------------------------------- 33 | 34 | # get GM of Earth using spice bodvrd routine 35 | spice_bodvrd_RADII_result = spice.bodvrd("Earth", "RADII", 3) 36 | 37 | # extract value from result which is tuple of (dim, values) 38 | spice_bodvrd_RADII = spice_bodvrd_RADII_result[1] # km 39 | 40 | # average ellipsoid radii for single value and convert to m 41 | EARTH_R = np.average(spice_bodvrd_RADII) * 10 ** 3 42 | 43 | # compute delta V required for Earth escape/departure from/to 100 km LEO 44 | # requiring/exhibiting 1 km/s excess velocity 45 | ΔV = two_body_dynamics.compute_escape_or_capture_delta_v( 46 | gravitational_param=EARTH_GM, 47 | semi_major_axis=EARTH_R + 100E3, # 100 km LEO 48 | eccentricity=0.0, # circular parking orbit 49 | excess_velocity=1E3 # 1 km/s needed in heliocentric 50 | ) 51 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/full_translational_setup.py: -------------------------------------------------------------------------------- 1 | # Create physical environment 2 | bodies = environment_setup.create_system_of_bodies( ... ) 3 | 4 | # Define central bodies 5 | central_bodies = ["Earth"] 6 | 7 | # Define bodies that are propagated 8 | bodies_to_propagate = ["Spacecraft"] 9 | 10 | # Define acceleration settings acting on spacecraft 11 | acceleration_settings_spacecraft = dict( Sun=[propagation_setup.acceleration.point_mass_gravity()]) 12 | acceleration_settings = {"Spacecraft": acceleration_settings_spacecraft} 13 | 14 | # Create acceleration models. 15 | acceleration_models = propagation_setup.create_acceleration_models( 16 | bodies, acceleration_settings, bodies_to_propagate, central_bodies) 17 | 18 | # Define initial conditions as Cartesian elements w.r.t. central body (Earth) with axes along global orientation 19 | initial_state = [5.89960424e+06, 2.30545977e+06, 1.74910449e+06, -1.53482795e+03, -1.71707683e+03, 7.44010957e+03] 20 | 21 | # Define numerical integrator (RK4; step size 2 seconds) 22 | integrator_settings = propagation_setup.integrator.runge_kutta_fixed_step( 23 | 2.0, integrator.CoefficientSets.rk_4 ) 24 | 25 | # Start of simulation 26 | simulation_start_epoch = 9120.0 * constants.JULIAN_DAY 27 | 28 | # Define termination settings 29 | simulation_end_epoch = 9140.0 * constants.JULIAN_DAY 30 | termination_settings = propagation_setup.propagator.time_termination( 31 | simulation_end_epoch ) 32 | 33 | # Define propagator type 34 | propagator_type = propagation_setup.propagator.encke 35 | 36 | # Define dependent variables 37 | dependent_variables_to_save = [propagation_setup.dependent_variable.total_acceleration( "Spacecraft" )] 38 | 39 | # Define translational propagator settings 40 | translational_propagator_settings = propagation_setup.propagator.translational( 41 | central_bodies, 42 | acceleration_models, 43 | bodies_to_propagate, 44 | initial_state, 45 | simulation_start_epoch, 46 | integrator_settings, 47 | termination_settings, 48 | propagator=propagator_type, 49 | output_variables= dependent_variables_to_save) 50 | 51 | # Set print frequency (to terminal) at once per day 52 | translational_propagator_settings.print_settings.results_print_frequency_in_seconds = 86400.0 53 | -------------------------------------------------------------------------------- /docs/source/getting-started/using-source.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _using_tudat_source: 3 | 4 | =========================== 5 | Using the Tudat source code 6 | =========================== 7 | 8 | For normal/simple applications, a user will not need to view or interact directly with the underlying C++ source code, but will only use the conda package that has the Python exposure of the C++ code. But, for various reasons, it can be very advantageous to view, search or modify the source code, to for instance: 9 | 10 | * Understand where/why an exception is thrown during a simulation 11 | * Understand how exactly a model is implemented 12 | * Find functionality that is not (yet) exposed to Python, but which does exist 13 | * Find clarification for incomplete/incorrect documentation 14 | * Extend the underlying C++ functionality 15 | * Have fun with C++ :) 16 | 17 | .. note:: 18 | You can read and navigate through the code in your IDE without having to compile! The advantage of using an IDE is then that there are a whole bunch of built-in code analysis features that allow you to easily find where a function is defined, where it is used, etc., which is very helpful when understanding how a codebase is set up. 19 | 20 | 21 | The Tudat sources code is hosted on Github, in a number of repositories, which can be found here: `https://github.com/tudat-team/ `_. To build tudatpy, while installing all dependencies for the installation with a single conda environment, follow the instructions in the tudatpy repository: `https://github.com/tudat-team/tudatpy `_. 22 | 23 | If you only want to view and navigate through the source code, but not compile it, you only need to go through the README of this repository up to step 4. To also compile Tudat and create your own Tudatpy kernel, go through the entire README. We've created a video (TODO VIDEO) to showcase how to use an IDE (in this case CLion) to navigate through the code, starting from the Python exposure of a Tudatpy function that you would normally use. 24 | 25 | To assist new users/developers in understanding the link between the Python code and the C++ code, we have taken a number of the example applications, and have translated them into C++, as an example of how the interfaces in the two languages compare to one another (TODO EXAMPLES). 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagating-variational-equations/single-arc-variational-propagation.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _single_arc_propagation: 3 | 4 | ============================================ 5 | Single-arc Variational Equations Propagation 6 | ============================================ 7 | 8 | For propagation of the variational equations alongside the system state, a different sort of simulator object - a :class:`~tudatpy.dynamics.simulator.VariationalSimulator` - has to be used. 9 | The :class:`~tudatpy.dynamics.simulator.VariationalSimulator` objects contain a :class:`~tudatpy.dynamics.simulator.DynamicsSimulator` object, which means that they can do anything that a :class:`~tudatpy.dynamics.simulator.DynamicsSimulator` can plus the added functionality of propagating variational equations. 10 | 11 | 12 | To propagate the variational equations alongside the single-arc system state, the :func:`~tudatpy.dynamics.simulator.create_variational_equations_solver` function should be used, which returns a :class:`~tudatpy.dynamics.simulator.SingleArcVariationalSimulator`, derived of the :class:`~tudatpy.dynamics.simulator.VariationalSimulator` base class should be used. 13 | With the basic simulation setup (system of bodies, integrator settings, propagator settings) and the parameter settings for the variational equations, a variational equations solver can be set up. 14 | The setup works similarly to the normal dynamics simulator: 15 | 16 | .. code-block:: python 17 | 18 | variational_equations_solver = dynamics.simulator.create_variational_equations_solver( 19 | bodies, propagator_settings, 20 | dynamics.parameters_setup.create_parameter_set(parameter_settings, bodies) 21 | ) 22 | 23 | The state history, state transition matrices, and sensitivity matrices can then be extracted: 24 | 25 | .. code-block:: python 26 | 27 | states = variational_equations_solver.state_history 28 | state_transition_matrices = variational_equations_solver.state_transition_matrix_history 29 | sensitivity_matrices = variational_equations_solver.sensitivity_matrix_history 30 | 31 | For a complete example of propagation and usage of the variational equations, please see the tutorial :ref:`Linear sensitivity analysis of perturbed orbit `. 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/source/user-guide/_static/tudatpy_high_level.drawio: -------------------------------------------------------------------------------- 1 | 5Vrbcts2EP0azbQPyvBO6tGWL0nrpM6oM6mfPBAJSkhIggFBSczXFyDAOyVRsWgr7YtNLBbXPbt7AGiiz8PdPQHx+iP2YDDRFG830W8mmmaZDvvLBZkQzFRVCFYEeUJUEyzQDyiFipSmyINJQ5FiHFAUN4UujiLo0oYMEIK3TTUfB81RY7CCHcHCBUFX+gV5dC2lqqJUFe8hWq3l0I4pK0JQKEtBsgYe3tZE+u1EnxOMqfgKd3MY8L0r9kW0u9tTW06MwIgOaeCvdJxo7zcf7+efkQIXi/nTh6mmi242IEjliieaFbAOr33M+mXTppncC+t7iouKaZJb6oopqEa8qyr5HgO32WCOU4IgYVWf4Lauaq34fxhtEMFRyNbxnECaxsUM2FrEJISe3MZyPhrBaeRBvjyVVW/XiMJFLAbfMjAy2ZqGgaz2QLIudQOwhMEjThBFOGIyl43NJqhfbyChiFn/oaVAMe8OBGjVq34lK5aYUhyWc60bR9qLt4C7mkga6x7iEFKSMRVZaxsSONJzNEuWtzUcOlK2rkGwxCaQ2F+VfVfwYB8SIaegRduLFg9tKju9MoBigpkbAm6qIwAqxY3p/q9gZTgXByvV7oHVS4zStkMAfTrYCkQseVQjOHrTCIbdNYKm9BhBM8cygtnZcuixTCiLmNA1XuEIBLeV9LoyisJKlc4D5juam+IrpDSTaR2kFDcNxXaQZP/w9u+sovgku8sLN7tGKauXHiFBbO3cY3LhXrtQQFaQHoprQo8v+KD1CAxYlNk0qUGfJWTTR4zyELjH6rrVMmbC4pwLZavKnleEgKymFnOF5PRx7gbqG8ZhfVs7qM8+xIwHtnZauyDM1dmFHNWlMX4e6M4xxjM8/QzMbXnmaeWsRZZQGP7lX2MPMX47kPFwhObRq+lGRxNIiDxPeCxkcwPLvD/uMxJKrHPzemLeFLGT+bIHyRwHmDtXhCMolyY9WTV6/e1QYOkEx5Kzy+k0aHFf0Jwq71RDtxvgkT290DGLfCM7nRqtHrDvM14xBhjVY2A8mT0J5NxWnLrocEnqfIkDZDjuTsq+PgqCAjoTTfcAdHyXyRNK8DdYq7FcBy79M7Flu0VrnB5ao/Vk1HYMPh9ZHo0r98UTl0BA4RHi++JRnr0sAiFyk+cEhSnzOUxekWu3gOX70HJ7geXZs6VykBIMB5altNLVbCBVM8YClvUmTG2HqCBqpiw91WoqmsYLBUvbu/uC5xzyHe2ymJthNUFgquMwN9M+jYlZzglM7Fw5a3YRBOpRHvoxWTDgomh1SSTqJ6mSdS6qpLzTGVVqkprzUKWp7bwVVzJG4ko3IqeBoMuUQn6dzbD13+FJZeS6GJ6k7idKL7PrguaMiM3bAmF+w5P/7VrZgzFkZsvH2gCCci/raK1RwoJN1q14DXBA1TOh3QeOmWXrwDoT12ldBJTcpw4O41XBYXXA8SGKU/oLep4za3EIvbu5ffeu+mh7270Jebi9v/10kztVa3/ZIul4+ZLzzUTmy44diuuHmtGk6CxWMZsMqice2j1W0UY7Niodq/yV0nND/nXiSRvy1ltDXuvetyzEQZa/BGjKXRq54vOXO6d2wksPkMfaa/PJ+PPz59BdfzUe1u//WKLgy3V57/d6x4QOA/g79QB9zJ7x8iv/bcAJ54ORT9N77T36E0TrUdmaDTvIdjpSFe1IT3uu8bsnijEOEL2I7HtmFJBIYhD1wswVzsohRlbL35ScTrLRldrX7/xTPFxzUPrsMBFkok1JPZmz60beXwHxKId4s7bZkZwN7yfCJOTnk3r1VjpxT33AwAfJlK3K5YeXPhWez6cyhfNqmcUb1UiQ4rxe4f5Vr6QERInPOi26j2CpsMXEa45eb74E7rdV7kLT1vay7Ftuq2bMqm+ztsn56B50MRFRuzu8h5I4ANIEKGIHuKrODzCg9TbtmHGeswflkSfOntkBMg2OXcsysQDgnoAkudexrMN6vpPYu2mG0vMkGLvJlMy+w4E6UoZx4nClfld/kK36xV0Y7lWqqkXguPyL0Noztzk54Zm7Nyf85I3qZNiFqjiNnz3vmK28Y7Z/THKmC1Rb6WdBe5+yD+sfe8putbbaqzrfU3avAxy9OTn1l1TyKixZHH3duZQ71cF3pU232R9P3uBOVW11ar2cELFi9ctSoV79PFe//Rc= -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tudat-space 2 | 3 | This repository contains the source code for the `tudat-space` website, found under [docs.tudat.space](https://docs.tudat.space/). The website contains a getting-started section for new users, a comprehensive user-guide along with some background information on the Tudat project. It is built using Sphinx. 4 | 5 | For more details on the Tudat project, we refer to the [project website](https://docs.tudat.space/en/latest/) and our [project Github page](https://github.com/tudat-team). 6 | 7 | ## Structure of `tudat-space` 8 | 9 | The `tudat-space` repository contains the `docs` directory, which hosts all information required to build the `tudat-space` website: 10 | 1. `tudat-space/docs/source`, where the source of the website is written in `.rst` files. 11 | 2. `tudat-space/docs/environment.yaml`, which holds information to create the `tudat-docs` environment. This environment is used to build the website locally and on [ReadtheDocs](https://readthedocs.org/projects/tudat-space/). 12 | 3. `tudat-space/.readthedocs.yml` contains the configuration for the online build on [ReadtheDocs](https://readthedocs.org/projects/tudat-space/). 13 | 4. (If the documentation has been built locally): `tudat-space/docs/build`, which contains the local build in `.html` files. 14 | 15 | The [examples on the website](https://docs.tudat.space/en/latest/_src_getting_started/examples.html) are integrated using the [tudatpy-examples repository](https://github.com/tudat-team/tudatpy-examples) as a submodule. 16 | If you would like to add examples or make changes, please contribute in the `tudatpy-examples` repository. 17 | This repository will be automatically updated from the [Sync tudat-space submodule](https://github.com/tudat-team/tudatpy-examples/actions/workflows/sync-tudat-space.yml) action. 18 | 19 | ## Contributing to the website 20 | 21 | If you see anything on the website you would like to improve, you can leave your thoughts on our [discussion board](https://github.com/orgs/tudat-team/discussions/categories/ideas-and-suggestions) or make the modifications yourself and open a pull request. Detailed instruction for developing and building the website (locally or online) are provide on our [wiki](https://github.com/tudat-team/tudat-space/wiki). 22 | In short, run the following command with the provided `tudat-docs` conda environment: 23 | ```bash 24 | sphinx-build -b html docs/source docs/build 25 | ``` 26 | You can then open the `docs/build/index.html` file with your preferred browser. 27 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagating-variational-simulation.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _propagating_variational_simulation: 3 | 4 | Propagating Variational Equations 5 | ================================= 6 | 7 | In addition to :ref:`propagating_dynamics`, Tudat is also capable of propagating the so-called variational equations associated with the dynamics to produce the state transition matrix :math:`\Phi(t,t_{0})` and sensitivity matrix :math:`S(t)`, which we define here as: 8 | 9 | .. math:: 10 | 11 | \Phi(t,t_{0}) &= \frac{\partial \mathbf{x}(t)}{\partial\mathbf{x}(t_{0})}\\ 12 | S &= \frac{\partial \mathbf{x}(t)}{\partial \mathbf{p }}\\ 13 | 14 | where :math:`\mathbf{x}` is the propagated state, :math:`\mathbf{p}` the vector of a parameter vector (e.g. gravity field parameters, rotation model parameters, etc.), and :math:`t_{0}` denotes the initial time. 15 | These two matrices are based on linearization of the complex dynamics and can be used to quickly determine the influence of a change in initial state (:math:`\mathbf{x}(t_{0})`) and/or parameters (:math:`\mathbf{p}`) on the state :math:`\mathbf{x}(t)` at time :math:`t`. 16 | 17 | .. _parameter_settings: 18 | 19 | Parameter settings 20 | ------------------ 21 | 22 | If the user wishes to do propagate the variational equations alongside the system sate, settings for the parameters that are to be used in the variational equations have to be defined. 23 | In terms of the equations above, it needs to be specified for which parameters :math:`\mathbf{x}_{0}` and :math:`\mathbf{p}` the solution for the state transition and sensitivity matrices is to be computed. 24 | In Tudat(Py) these parameters are referred to as parameters or sometimes "estimated" parameters, because of their primary application in state estimation problems. 25 | 26 | A description of how these parameters are to be defined and a comprehensive list of all available parameters are linked below: 27 | 28 | .. toctree:: 29 | :maxdepth: 3 30 | 31 | propagating-variational-equations/parameter-settings 32 | 33 | 34 | Performing the Propagation 35 | -------------------------- 36 | 37 | Simulations in which only the system state and variational equations is propagated are handled by simulator objects from the :class:`~tudatpy.dynamics.simulator.VariationalSimulator` base class. 38 | For propagation of the system state and variational equations along a single arc, see the page below: 39 | 40 | .. toctree:: 41 | :maxdepth: 1 42 | 43 | propagating-variational-equations/single-arc-variational-propagation 44 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/environment-setup/environment-architecture.rst: -------------------------------------------------------------------------------- 1 | .. _environment_architecture: 2 | 3 | ================================== 4 | Environment - Overall Architecture 5 | ================================== 6 | 7 | On this page, we give an overview of the top-level software architecture of the environment models in Tudat, primarily the :class:`~tudatpy.dynamics.environment.SystemOfBodies` class that defines a set of bodies, the :class:`~tudatpy.dynamics.environment.Body` class that defines a single body, and the various classes that define the specific environment models. Since the underlying code is written in C++, in various places we will limit ourselves to the C++ implementation. Wherever possible, we will provide links to the Tudatpy API where the classes/functions that are discussed are also exposed to Python. 8 | 9 | Top-level architecture 10 | ====================== 11 | 12 | An overview of the architecture of the Tudat environment is given in the figure below (TODO). 13 | 14 | * The environment is defined by a single :class:`~tudatpy.dynamics.environment.SystemOfBodies` object. 15 | * The :class:`~tudatpy.dynamics.environment.SystemOfBodies` contains a list of :class:`~tudatpy.dynamics.environment.Body` objects, each of which represents a single natural or artificial body, and contains all of this body's properties. In the C++ code, each body is stored as a ``shared_ptr< Body >``. Every body is assigned a unique name by which it can be retrieved. A body can be extracted using the :meth:`~tudatpy.dynamics.environment.SystemOfBodies.get` method. 16 | * Each :class:`~tudatpy.dynamics.environment.Body` object contains a number of environment models (see :ref:`environment_model_overview` for a complete list). By default, each of these objects is initialized as a ``nullptr``, and is only assigned when specified during the creation of the body (:ref:`create_bodies_from_settings_first`), or when added after the creation of the body (:ref:`decorate_empty_body`). 17 | 18 | As discussed :ref:`here `, the properties in the environment get updated to the current time and state of the numerical integration at the start of every function evaluation. Only those properties that are relevant for the propagation being performed are updated. Interaction with the environment during the propagation is described in more detail :ref:`here ` 19 | 20 | 21 | Interdependencies of environment models 22 | ======================================= 23 | 24 | TODO 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/source/_snippets/simulation/environment_setup/full_rotational_setup.py: -------------------------------------------------------------------------------- 1 | # Create physical environment 2 | bodies = environment_setup.create_system_of_bodies( ... ) 3 | 4 | # Define bodies that are propagated 5 | bodies_to_propagate = ["Spacecraft"] 6 | 7 | # Define torque models 8 | # Define torque settings acting on spacecraft 9 | torque_settings_spacecraft = dict( Sun=[propagation_setup.torque.second_degree_gravitational()]) 10 | torque_settings = {"Spacecraft": torque_settings_spacecraft} 11 | 12 | # Create torque models. 13 | torque_models = propagation_setup.create_torque_models( 14 | bodies, torque_settings, bodies_to_propagate) 15 | 16 | # Below, we define the initial state in a somewhat trivial manner (body axes along global frame 17 | # axes; no initial rotation). A real application should use a more realistic initial rotational state 18 | # Set initial rotation matrix (identity matrix) 19 | initial_rotation_matrix = np.eye(3) 20 | # Set initial orientation by converting a rotation matrix to a Tudat-compatible quaternion 21 | initial_state = element_conversion.rotation_matrix_to_quaternion_entries(initial_rotation_matrix) 22 | # Complete initial state by adding angular velocity vector (zero in this case) 23 | initial_state = np.hstack((inital_state, [0,0,0])) 24 | 25 | # Define numerical integrator (RK4; step size 2 seconds) 26 | integrator_settings = propagation_setup.integrator.integrator.runge_kutta_fixed_step( 27 | 2.0, integrator.CoefficientSets.rk_4 ) 28 | 29 | # Start of simulation 30 | simulation_start_epoch = 9120.0 * constants.JULIAN_DAY 31 | 32 | # Define termination settings 33 | simulation_end_epoch = 9140.0 * constants.JULIAN_DAY 34 | termination_settings = propagation_setup.propagator.time_termination( 35 | simulation_end_epoch ) 36 | 37 | # Define propagator type 38 | propagator_type = propagation_setup.propagator.modified_rodrigues_parameters 39 | 40 | # Define dependent variables 41 | dependent_variables_to_save = [propagation_setup.dependent_variable.total_torque_norm("Spacecraft")] 42 | 43 | # Define rotational propagator settings 44 | rotational_propagator_settings = propagation_setup.propagator.rotational( 45 | torque_models, 46 | bodies_to_propagate, 47 | initial_state, 48 | simulation_start_epoch, 49 | integrator_settings, 50 | termination_settings, 51 | propagator=propagator_type, 52 | output_variables=dependent_variables_to_save) 53 | 54 | # Set print frequency (to terminal) at once per day 55 | rotational_propagator_settings.print_settings.results_print_frequency_in_seconds = 86400.0 56 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagation-setup/_static/tudatpy_propagation_settings.drawio: -------------------------------------------------------------------------------- 1 | 7Vxde6I4FP41XnYevhLw0lrb8ZnW9lF3t927KFHZQeJCnOr++k0g+BFCpSuIup2LDjkJIZ735D3JOYGG2Z6vHkK0mD0RF/sNQ3NXDfOuYRh602F/uWCdCBzDTgTT0HNFm61g4P2DhVAT0qXn4mivISXEp95iXzgmQYDHdE+GwpC87zebEH//qQs0xRnBYIz8rPQPz6UzIdU1bVvxHXvTmXi0A0TFHKWNhSCaIZe874jMTsNsh4TQ5Gq+amOf6y7VS3LffU7tZmAhDmiRG3782X9B37W+wS6h9wrub/o3NzZIuvmF/KX4xWK0dJ2qICTLwMW8F71h3r7PPIoHCzTmte8Mcyab0bkvqn00wv4LiTzqkYDJwkQ1t79wSD2m1kepnhLeAfK9KS/5eLLbuCXEI0IpmbOKief7beKTMB6Zee84jm0zuYui2WaEExJQYUg6ZOXoJ6ZjjoXGClMfRZG43iDCCwscenNMcch/mxdM0zY0JD/xzjNHDrAAr8nqX0DCR49XOyKBxwMm7AHhmjVJa4EjjEPMDt0UeLxvbc2Eos1sx8w28wMJ+55uOt+aALsQVvAJizB1hUVAn8MSLVCwZxrw7yW33ljjN1Gs8hZroFuL1baSXU35/y8hYZMFxbgb2gBTyrQcpX2zsSbdJ42PM0LJTLDuAmyrwGxC20SwJDCt5j6Y0MmCqRsKMGFlWFoXO7tdPEHL2DI+nNtl4GY49jdwcBoaqWwXOSvlz/KhK0DM2GWuShRJSGdkSgLkd7bS2y24nLG2bR4JBybW6F9sIq6FStGSEmkmbfVt8C5w4La4V2XlgAT4IwT46D7Uf4h9xga/9h2tSpHxreyxaL3TYEG8gEb7Hu+Fy3aQhaZEr0CCi6Jwiqm47aieIrIMxzjTU4z95jcfYQ4wl5U5REVYmYG0SuhYIuaHTq/T77Jxaa3+w29Pnd5wsMPKSfc5rMymGN03mHSuj5k54FAx2+ee6ya2idnY0CjuKnbACaCsX3DbAHe8L2aOkZjsGfYW5rfLGamoEo6Q8NcUDAEU3G5Vxe1px1VYxN1br/XUbQ+4n37ptLv3X9bxuWWcwjqUy7jKrCOlp7q9Bfstr7y/bwZIy2+i/7hwt9orrUUpF5SEZj+aFukmMWb2Auvckt1U1nWYYN84LFjMCeU7vJwHyetP3ZE2hIdugNaBG4Dx4Q3sIhl0qa7Pyt+QFCW6eEOiIrpuwFaqiA+hTQI3XrVGRdntmB2Ji7AzGat2JHDs4NGkJF4yTUNe2abGWNueBFh1MNN/ZqIMpa08+pp2yq7jPr4BUdp2wgslsJlRL5sdzUHpmujSOciojoN6yzkO+RqINeqyZdE0RJSxwTWz0CYmWh8LwS8WKs5C5oWzkGmAq2AhM5eFjgvNDnE494I0NKtcClUWnK2PhJp1h2eBXQcJncMmzaqXUM5ok2Zp10FNqkxDGdR0S1wPR9xWCDc2kUPCV81Mpl07Mzlfy6PibAYufHlkOeZVcJAqZVYGB93hBWaWHf/C31Ho8bD0SdZGk8nEGCsZyIUjCMoKX2cZyAIbSW0cZKlSXscoV05eS+noj3PXcqY7k7wuA4h0mmwcgWKJatgKEDbLl/JRsDMo9PAYRxESnV+Yt4VQ4j5LYeeaQsXbGVG+jp2Mjh87D53eXUxKko7PMqlWBjK2ZPyWruIglfUblRl/s2IKqu78jACm8sMzEO57DgiKzqfK1q7HJ8Z1IydWm6bAWZvh20vnahLhZZ1nhNI22lYkwnVT5cAqs4Zs9vB5wWcXj7df3lJNdl9Ar3u62dkFwqVwZHyCuNVq6YeI8oJOEBsKg1AePdErswhYS4Y3LwaQXheJAewEIOwThUKBmC3nEwqVOdxqVhQKhbpkuodyxfINh8MQTg1hiBTRKnLF6Rl6nh/WhusFPkWa+N5mHKlkMi3+V5Zrk47Y1p8ktrP7sotybe1Ou31Nrk3xPoXStTmVebZaTg3sQmbV5KWaZ+elJF9gFTzaf7SXOniq8kK8lCq0UZKXanOzi88zpdm7Uzgpx7aV73hV6qTqP0+ZdrwD5LDf6g0eW8Puc6/1mNHy2Qcjytor27Z09hUq9sqqdzYqC0bAbDCi/zz8AkoCylC8fqecVNUBlV3DP7UGgy+INpkpPct7ysRUVQg5WYSGIQoiH1UQ3Mt3LqXmpmw5L38GuSkne+bweUkXS1qqgk/0hnYmeqp6Q/uk0VMne25KMmMNBS772ye0GsvO29tXatnFw9YVWnb2uIik+rakdwHFE98klwuC2KmfGITC1l8KCJPu2/1yPf7Z7RmTQWf8w3ubv97kx8qO/dhEsscigquSPkdhWh9Jn5/Y1pzVuZ4Mugob+My5HmCecLuiBNzMKPL/cbBQCogcDMPkz5bajwsCWOs7XYrngYydyy9W53yeQTEUvSn1tfmMy4HI0uHIDCtuP/eUNN9+M8vs/As= -------------------------------------------------------------------------------- /docs/source/examples/estimation.rst: -------------------------------------------------------------------------------- 1 | .. _estimation_examples: 2 | 3 | ==================== 4 | Estimation 5 | ==================== 6 | 7 | Estimation using simulated observations 8 | *************************************** 9 | 10 | In the following examples, observations are simulated and then used as input for a covariance analysis and/or estimation. 11 | 12 | .. nbgallery:: 13 | 14 | ./tudatpy-examples/estimation/covariance_estimated_parameters.ipynb 15 | ./tudatpy-examples/estimation/covariance_propagation_example.ipynb 16 | ./tudatpy-examples/estimation/full_estimation_example.ipynb 17 | ./tudatpy-examples/estimation/estimation_dynamical_models.ipynb 18 | 19 | Functionality to support estimation 20 | *********************************** 21 | 22 | In the following examples, functionality is showcased that can be used to support (pre- and/or post-processing of observations) estimation 23 | 24 | .. nbgallery:: 25 | 26 | ./tudatpy-examples/estimation/tudat_azimuth_elevation_example.ipynb 27 | ./tudatpy-examples/estimation/mission_data_downloader.ipynb 28 | 29 | 30 | .. _estimation_using_pseudo_observations: 31 | 32 | Estimation using pseudo-observations data 33 | ***************************************** 34 | 35 | In the following examples, Cartesian positions of bodies are taken from an external source and used as observations to which a Tudat dynamical model is fit. 36 | 37 | .. nbgallery:: 38 | 39 | ./tudatpy-examples/estimation/galilean_moons_state_estimation.ipynb 40 | 41 | 42 | .. _estimation_using_real_observations: 43 | 44 | Estimation using real observations 45 | ********************************** 46 | 47 | In the following examples, real observations are used to fit compute residuals and/or compute dynamics of spacecraft and/or natural bodies. 48 | 49 | .. nbgallery:: 50 | 51 | ./tudatpy-examples/estimation/retrieving_mpc_observation_data.ipynb 52 | ./tudatpy-examples/estimation/estimation_with_mpc.ipynb 53 | ./tudatpy-examples/estimation/improved_estimation_with_mpc.ipynb 54 | ./tudatpy-examples/estimation/mro_range_estimation.ipynb 55 | ./tudatpy-examples/estimation/kosmos482_reentry.ipynb 56 | 57 | Estimation using real observations - Python only 58 | ************************************************ 59 | 60 | We also have the following examples that showcase the reading of, and estimation from radio tracking data from DSN/ESTRACK. Using these examples requires tudatpy to have been compiled by high-precision time representation (which is not currently available through these conda packages) The examples provide instructions on how to compile your own tudatpy kernel with the required settings. 61 | 62 | .. workaround until the .py files are available as .ipynb files 63 | 64 | .. toctree:: 65 | 66 | doppler-data-analysis/mro-residuals-analysis 67 | doppler-data-analysis/grail-odf-estimation 68 | doppler-data-analysis/grail-residuals 69 | doppler-data-analysis/grail-spice-fit 70 | 71 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagating-variational-equations/parameter-settings.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _parameterSettings: 3 | 4 | ================== 5 | Parameter Settings 6 | ================== 7 | 8 | The parameter estimation framework of Tudat allows an ever increasing variety of parameters to be estimated, examples of which include: 9 | 10 | * Initial translational and rotational states of any number of bodies, 11 | * Properties of a body, such as a gravitational parameter :math:`\mu` 12 | * Properties of a ground station, such as its body-fixed position :math:`\mathbf{x}_{GS}^{(B)}` 13 | * Global properties of the simulation, such a Parameterize Post_Newtonian (PPN) parameters :math:`\gamma` and :math:`\beta` 14 | * Acceleration model properties, such as empirical acceleration magnitudes 15 | * Observation model properties, such as absolute and relative observation biases 16 | 17 | In Tudat, these parameters influence the simulation in a variety of manners, and during propagation and/or observation simulation. Nevertheless, a *unified* framework is provided for defining any type of parameter. Very similar to the manner in which, for instance, acceleration or dependent variable settings are defined, a user must supply a list of parameter settings. 18 | 19 | When only wishing to propagate the state transition matrix :math:`\Phi(t,t_{0})` (or depending on your use case, only estimate initial state parameters), the following line the relevant settings: 20 | 21 | .. tab-set:: 22 | :sync-group: coding-language 23 | 24 | .. tab-item:: Python 25 | :sync: python 26 | 27 | .. literalinclude:: /_snippets/simulation/sensitivity_analysis/state_only_parameters.py 28 | :language: python 29 | 30 | which defines the initial state parameters to be fully consistent with the settings in the `propagator_settings`. 31 | 32 | .. note:: Options exist to manually define initial state parameters. However, at present, the initial state parameters **must** be consistent with the propagator settings, and these additional options are not described here. 33 | 34 | When wishing to propagate the sensitivity matrix :math:`S(t)` (or depending on your use case, estimate parameters in addition to initial state parameters), the set of parameters can be extended using the following: 35 | 36 | .. tab-set:: 37 | :sync-group: coding-language 38 | 39 | .. tab-item:: Python 40 | :sync: python 41 | 42 | .. literalinclude:: /_snippets/simulation/sensitivity_analysis/full_parameter_settings.py 43 | :language: python 44 | 45 | 46 | In the snippet above, parameters are created to estimate the initial states in the `propagator_settings` (presumably Delfi-C3 initial translational states), the gravitational parameter of the Earth, the constant drag and the radiation pressure coefficient of Delfi-C3. 47 | 48 | For the full list of available parameters, see the :mod:`parameter_setup` page of the API documentation 49 | -------------------------------------------------------------------------------- /docs/source/user-guide/state-propagation/propagation-setup/termination-settings.rst: -------------------------------------------------------------------------------- 1 | .. _termination_settings: 2 | 3 | ============================== 4 | Termination Settings 5 | ============================== 6 | 7 | The termination settings are a key parameter in the propagation of a body’s orbit, since these will determine the 8 | computational time and the size of the output file. Depending on the application, the user may want to end the body 9 | propagation according to different criteria. The 10 | :class:`~tudatpy.dynamics.propagation_setup.propagator.PropagationTerminationSettings` object is a 11 | mandatory input argument necessary to create propagation settings. 12 | 13 | .. contents:: List of available termination settings 14 | :depth: 1 15 | :local: 16 | 17 | 18 | Simulation time 19 | ================ 20 | 21 | The simulation stops once a certain simulation time has passed. 22 | 23 | For more information, see the API reference entry: 24 | :func:`~tudatpy.dynamics.propagation_setup.propagator.time_termination`. 25 | 26 | .. note:: 27 | The simulation time is expressed in seconds after a reference epoch (1st January 2000) and *not* after the initial 28 | time of the simulation. 29 | 30 | CPU time 31 | ========= 32 | 33 | The simulation stops once a certain CPU time has passed. This is useful to make sure that the propagation does not 34 | exceed a certain computation time. 35 | 36 | For more information, see the API reference entry: 37 | :func:`~tudatpy.dynamics.propagation_setup.propagator.cpu_time_termination`. 38 | 39 | Dependent variable 40 | =================== 41 | 42 | The simulation stops once a dependent variable meets a given criterion. The termination variable can be any dependent 43 | variable listed in :ref:`dependent_variables` (where the way to create those is also explained). 44 | Such variable, together with the limit value, can be used as lower or upper boundary. 45 | 46 | For more information, see the API reference entry: 47 | :func:`~tudatpy.dynamics.propagation_setup.propagator.dependent_variable_termination`. 48 | 49 | Custom function 50 | ================ 51 | 52 | The simulation stops once a user-defined function returns ``True``. 53 | 54 | For more information, see the API reference entry: 55 | :func:`~tudatpy.dynamics.propagation_setup.propagator.custom_termination`. 56 | 57 | Hybrid 58 | =================== 59 | 60 | The simulation stops once multiple criteria are met. It may be possible that the user desires to terminate a 61 | propagation according several criteria, where such criteria may or may not be fulfilled simultaneously. 62 | 63 | For more information, see the API reference entry: 64 | :func:`~tudatpy.dynamics.propagation_setup.propagator.hybrid_termination`. 65 | 66 | .. tip:: 67 | When using a dependent variable as termination condition, it is advised to also include a (cpu) time termination 68 | condition to ensure that your simulation will terminate. 69 | 70 | 71 | 72 | 73 | 74 | 75 | --------------------------------------------------------------------------------