diff --git a/.gitmodules b/.gitmodules index df813778..b8a9c893 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "examples"] path = examples - url = https://github.com/valeriof7/tudatpy-examples.git + url = https://github.com/tudat-team/tudatpy-examples.git diff --git a/docs/source/acceleration.rst b/docs/source/acceleration.rst index f185aa10..4d46cf48 100644 --- a/docs/source/acceleration.rst +++ b/docs/source/acceleration.rst @@ -22,8 +22,6 @@ Functions radiation_pressure - cannonball_radiation_pressure - spherical_harmonic_gravity mutual_spherical_harmonic_gravity @@ -58,8 +56,6 @@ Functions .. autofunction:: tudatpy.numerical_simulation.propagation_setup.acceleration.radiation_pressure -.. autofunction:: tudatpy.numerical_simulation.propagation_setup.acceleration.cannonball_radiation_pressure - .. autofunction:: tudatpy.numerical_simulation.propagation_setup.acceleration.spherical_harmonic_gravity .. autofunction:: tudatpy.numerical_simulation.propagation_setup.acceleration.mutual_spherical_harmonic_gravity diff --git a/docs/source/environment_setup.rst b/docs/source/environment_setup.rst index a8e0cec5..cd868385 100644 --- a/docs/source/environment_setup.rst +++ b/docs/source/environment_setup.rst @@ -48,17 +48,15 @@ Functions get_default_single_alternate_body_settings - get_default_single_body_settings_time_limited - - add_aerodynamic_coefficient_interface - create_system_of_bodies create_simplified_system_of_bodies create_body_ephemeris - add_radiation_pressure_interface + add_aerodynamic_coefficient_interface + + add_radiation_pressure_target_model add_flight_conditions @@ -82,17 +80,15 @@ Functions .. autofunction:: tudatpy.numerical_simulation.environment_setup.get_default_single_alternate_body_settings -.. autofunction:: tudatpy.numerical_simulation.environment_setup.get_default_single_body_settings_time_limited - -.. autofunction:: tudatpy.numerical_simulation.environment_setup.add_aerodynamic_coefficient_interface - .. autofunction:: tudatpy.numerical_simulation.environment_setup.create_system_of_bodies .. autofunction:: tudatpy.numerical_simulation.environment_setup.create_simplified_system_of_bodies .. autofunction:: tudatpy.numerical_simulation.environment_setup.create_body_ephemeris -.. autofunction:: tudatpy.numerical_simulation.environment_setup.add_radiation_pressure_interface +.. autofunction:: tudatpy.numerical_simulation.environment_setup.add_aerodynamic_coefficient_interface + +.. autofunction:: tudatpy.numerical_simulation.environment_setup.add_radiation_pressure_target_model .. autofunction:: tudatpy.numerical_simulation.environment_setup.add_flight_conditions diff --git a/docs/source/ephemeris.rst b/docs/source/ephemeris.rst index 9ad33f50..5366aa09 100644 --- a/docs/source/ephemeris.rst +++ b/docs/source/ephemeris.rst @@ -30,18 +30,25 @@ inertial Cartesian state elements produced by the ephemeris. .. code-block:: python - bodies = .... // Create system of bodies + bodies = .... # Create system of bodies earth_ephemeris = bodies.get('Earth').ephemeris earth_state_at_epoch = earth_ephemeris.cartesian_state( epoch ) where the ``epoch`` input is (as always in Tudat) the time in seconds since J2000. The ``earth_state_at_epoch`` is always in a frame with inertial orientation. The specific orientation and origin can be access from the :attr:`~tudatpy.numerical_simulation.environment.Ephemeris.frame_orientation` and :attr:`~tudatpy.numerical_simulation.environment.Ephemeris.frame_origin` attributes. -* jpl_horizons (:func:`~tudatpy.numerical_simulation.environment_setup.ephemeris.horizons_wrapper.jpl_horizons`) - - - +**Creating ephemeris objects from ephemeris settings** +Ephemeris objects can also be created directly from ephemeris settings using the :func:`~tudatpy.numerical_simulation.environment_setup.create_body_ephemeris` function. +This can be useful if you want to create an ephemeris object for a body that is not part of a system of bodies to perform further analysis, such as the barycenter of the Martian system: +.. code-block:: python + frame_origin = "SSB" + frame_orientation = "ECLIPJ2000" + body_name_to_use = "MARS BARYCENTER" + mars_system_ephemeris_settings = environment_setup.ephemeris.direct_spice( + frame_origin, frame_orientation, body_name_to_use ) # Create ephemeris settings + mars_system_ephemeris = environment_setup.create_body_ephemeris(mars_system_ephemeris_settings, + "MARS BARYCENTER") # Create ephemeris object diff --git a/docs/source/radiation_pressure.rst b/docs/source/radiation_pressure.rst index 931f0112..b5661a8c 100644 --- a/docs/source/radiation_pressure.rst +++ b/docs/source/radiation_pressure.rst @@ -23,8 +23,6 @@ Functions constant_luminosity - cannonball_radiation_target - irradiance_based_constant_luminosity time_variable_luminosity @@ -49,27 +47,27 @@ Functions variable_albedo_surface_radiosity + thermal_emission_angle_based_radiosity + thermal_emission_blackbody_constant_emissivity thermal_emission_blackbody_variable_emissivity - thermal_emission_angle_based_radiosity - specular_diffuse_body_panel_reflection lambertian_body_panel_reflection isotropic_radiation_source - panelled_radiation_target - panelled_extended_radiation_source + cannonball_radiation_target + panelled_radiation_target -.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.constant_luminosity -.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.cannonball_radiation_target + +.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.constant_luminosity .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.irradiance_based_constant_luminosity @@ -95,22 +93,24 @@ Functions .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.variable_albedo_surface_radiosity +.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.thermal_emission_angle_based_radiosity + .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.thermal_emission_blackbody_constant_emissivity .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.thermal_emission_blackbody_variable_emissivity -.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.thermal_emission_angle_based_radiosity - .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.specular_diffuse_body_panel_reflection .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.lambertian_body_panel_reflection .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.isotropic_radiation_source -.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.panelled_radiation_target - .. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.panelled_extended_radiation_source +.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.cannonball_radiation_target + +.. autofunction:: tudatpy.numerical_simulation.environment_setup.radiation_pressure.panelled_radiation_target + diff --git a/tudatpy/kernel/docstrings.h b/tudatpy/kernel/docstrings.h index 9ed408bd..19046d90 100644 --- a/tudatpy/kernel/docstrings.h +++ b/tudatpy/kernel/docstrings.h @@ -10803,7 +10803,7 @@ static inline std::string get_docstring(std::string name) { return R"( List of objects that define the settings of time variations of the gravity field variation models that are to be created. Variables in this list are typically - assigned by using a function from the :ref:`\`\`gravity_field_variations\`\`` module. + assigned by using a function from the :ref:`\`\`gravity_field_variation\`\`` module. :type: list[GravityFieldVariationSettings] @@ -10878,7 +10878,12 @@ Function that retrieves the default settings for the given set of input bodies. Function that retrieves the default settings for the given set of input bodies. Default settings are described in detail `here `_ . Note that if a body is provided as input for which default settings do not exist, an exception is thrown. In addition -to settings for each separate body, this function returns an object that defines the global frame origin and orientation, +to settings for each separate body, this function returns an object that defines the global frame origin and orientation. + +.. note:: + + Before calling this function make sure that the appropriate SPICE kernels are loaded. A set of default SPICE kernels + can be loaded by calling :func:`~tudatpy.interface.spice.load_standard_kernels`. Parameters @@ -11261,17 +11266,17 @@ Returns - } else if(name == "add_radiation_pressure_interface" ) { + } else if(name == "add_radiation_pressure_target_model" ) { return R"( -Function that creates an radiation pressure interface from settings, and adds it to an existing body. +Function that creates a radiation pressure target model from settings, and adds it to an existing body. This function can be used to add an radiation pressure interface to an existing body. It requires -settings for the radiation pressure interface, created using one of the functions from the :ref:`\`\`radiation_pressure\`\`` module. +settings for the radiation pressure target model, created using one of the functions from the :ref:`\`\`radiation_pressure\`\`` module. This function creates the actual coefficient interface from these settings, and assigns it to the selected body. In addition to the identifier for the body to which it is assigned, this function requires the full :class:`~tudatpy.numerical_simulation.environment.SystemOfBodies` as input, to facilitate -inter-body dependencies in the radiation pressure interface +inter-body dependencies in the radiation pressure interface. Parameters @@ -11279,9 +11284,9 @@ Parameters bodies : SystemOfBodies Object defining the physical environment, with all properties of artificial and natural bodies. body_name : str - Name of the body to which the radiation pressure interface is to be assigned -radiation_pressure_settings : RadiationPressureInterfaceSettings - Settings defining the radiation pressure interface that is to be created. + Name of the body to which the radiation pressure target model is to be assigned +radiation_pressure_target_settings : RadiationPressureTargetModelSettings + Settings defining the radiation pressure target that is to be created. @@ -11331,7 +11336,7 @@ Function that creates a rotation model, and adds it to an existing body. This function can be used to add a :class:`~tudatpy.numerical_simulation.environment.RotationalEphemeris` object to an existing body. Typically, the ``RotationalEphemeris`` is created along with the `~tudatpy.numerical_simulation.environment.Body` itself However, in some cases it may be useful to create a rotation model after the Body objects have been created. This function requires -settings for the rotation model, created using one of the functions from the :ref:`~tudatpy.numerical_simulation_environment_setup.rotation_model` module. +settings for the rotation model, created using one of the functions from the :ref:`~tudatpy.numerical_simulation.environment_setup.rotation_model` module. This function creates the actual coefficient interface from these settings, and assigns it to the selected body. In addition to the identifier for the body to which it is assigned, this function requires the full :class:`~tudatpy.numerical_simulation.environment.SystemOfBodies` as input, to facilitate @@ -13295,7 +13300,7 @@ frame_origin : str, default="SSB" Origin of frame in which ephemeris data is defined. frame_orientation : str, default="ECLIPJ2000" Orientation of frame in which ephemeris data is defined. -interpolator_settings : std::make_shared< interpolators::InterpolatorSettings >, default=std::make_shared< interpolators::LagrangeInterpolatorSettings >( 6 ) +interpolator_settings : InterpolatorSettings, default = tudatpy.math.interpolators.lagrange_interpolation(6) Settings to be used for the state interpolation. body_name_to_use : str, default = "" Body from which Spice ephemeris is to be created. @@ -13777,7 +13782,7 @@ In the above case, the original Jupiter ephemeris setting is taken and each stat Function for creating ephemeris model settings for an SGP4-propagated TLE. Function for creating ephemeris model settings for an SGP4-propagated two-line element (TLE). Our implementation uses the ``evsgp4_c`` function of the SPICE library -to perform the SGP4 propagation, and the :func:`~tudatpy.astro.element_conversion.teme_to_j2000 ` function to rotate the resulting state from teh TEME frame to the J2000 frame +to perform the SGP4 propagation, and the :func:`~tudatpy.astro.element_conversion.teme_to_j2000` function to rotate the resulting state from teh TEME frame to the J2000 frame (and, if required for this ephemeris model, a subsequent different inertial frame). Parameters @@ -18749,7 +18754,7 @@ Parameters ---------- use_schwarzschild : bool, default=False Boolean defining whether or not to use the Schwarzschild contribution to the acceleration correction -use_lense_thirring : bool +use_lense_thirring : bool, default=False Boolean defining whether or not to use the Lense-Thirring contribution to the acceleration correction use_de_sitter : bool, default=False Boolean defining whether or not to use the de Sitter contribution to the acceleration correction diff --git a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp index ad46a219..1ca2b915 100644 --- a/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp +++ b/tudatpy/kernel/expose_numerical_simulation/expose_environment_setup.cpp @@ -209,7 +209,7 @@ namespace environment_setup { m.def("add_radiation_pressure_target_model", &tss::addRadiationPressureTargetModel, py::arg("bodies"), py::arg("body_name"), py::arg("radiation_pressure_target_settings"), - get_docstring("add_radiation_pressure_interface").c_str()); + get_docstring("add_radiation_pressure_target_model").c_str()); m.def("add_rotation_model", &tss::addRotationModel,