ephemeris
¶
This module contains a set of factory functions for setting up the ephemeris models of celestial bodies in an environment. Below a short overview of aspects of some of the ephemeris models in order to aid in properly selecting an choosing a model.
Spice-based models For many typical applications, natural body ephemerides will be calculated from Spice kernels. In some cases, a user may find that the default Spice kernels are insufficient for their purposes, due to one of two reasons:
The body for which the state is required is in the ephemeris Spice kernel, but the time at which the state is needed lies outside of the bounds for which the Spice kernel has data
The body for which the state is required is not in the ephemeris Spice kernel
In both cases, a user should load additional Spice kernels. This can be done using the load_kernel()
. Spice kernels for many bodies may be found in a number of places.
The ‘goto’ place for Spice kernels for ephemerides is the NAIF website (developers of Spice), which you can find
here.
Use of scaled models For a sensitivity analysis (among others) it may be useful to modify the ephemeris of a body, for instance
to emulate the influence of a 1 km offset in the state provided by the nominal ephemeris. Unlike most other environment models,
this cannot be achieved (at least not for most types of ephemerides) by modifying a single defining parameter of the model.
Instead, we provide the functions
scaled_by_vector()
and
scaled_by_vector_function()
,
which take nominal ephemeris settings, and add a user-defined variation (constant or time-varying; absolute or relative) to the
inertial Cartesian state elements produced by the ephemeris.
Using the ephemeris outside the propagation In various cases, the ephemeris object is useful to use independently of the propagation. Details can be found in the API entry for Ephemeris
, but we provide a short example here as well.
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 frame_orientation
and frame_origin
attributes.
jpl_horizons (
jpl_horizons()
)
Functions¶
|
Factory function for creating ephemeris model settings entirely from Spice. |
|
Factory function for creating ephemeris model settings using interpolated Spice data. |
|
Factory function for creating approximate ephemeris model settings for major planets. |
|
Factory function for creating constant ephemeris model settings. |
|
Factory function for creating custom ephemeris model settings. |
|
Factory function for creating Keplerian ephemeris model settings. |
|
Factory function for creating Keplerian ephemeris model settings with initial state from Spice. |
|
Factory function for creating scaled ephemeris model settings. |
|
Factory function for creating scaled ephemeris model settings. |
|
Factory function for creating scaled ephemeris model settings. |
|
Factory function for creating ephemeris model settings from tabulated data. |
|
Factory function for creating tabulated ephemeris model settings from existing ephemeris. |
|
Factory function for creating ephemeris model settings from tabulated JPL Horizons vectors. |
- direct_spice(frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000', body_name_to_use: str = '') tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating ephemeris model settings entirely from Spice.
Factory function for settings object, defining ephemeris model directly and entirely from Spice. Requires an appropriate Spice kernel to be loaded.
- Parameters:
- Returns:
Instance of the
EphemerisSettings
derivedDirectSpiceEphemerisSettings
class- Return type:
Examples
In this example, we create barycentric (origin: SSB)
EphemerisSettings
with axes along J2000, using data directly from spice:frame_origin = "SSB" frame_orientation = "J2000" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.direct_spice( frame_origin, frame_orientation)
Alternatively, we can assign the DirectSpiceEphemerisSettings of Jupiter (or any other body for which a direct Spice ephemeris is available) to any custom body:
frame_origin = "SSB" frame_orientation = "J2000" body_name_to_use = "Jupiter" # create ephemeris settings from "Jupiter" spice data and add to body settings of body "CustomBody" body_settings.get( "CustomBody" ).ephemeris_settings = environment_setup.ephemeris.direct_spice( frame_origin, frame_orientation, body_name_to_use )
- interpolated_spice(initial_time: float, final_time: float, time_step: float, frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000', interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = <tudatpy.kernel.math.interpolators.LagrangeInterpolatorSettings object at 0x7ff1d809aa30>, body_name_to_use: str = '') tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating ephemeris model settings using interpolated Spice data.
Factory function for settings object defining an ephemeris model from interpolated Spice data. Using this option the state of the body is retrieved from Spice at regular intervals before the environment propagation (as opposed to during the propagation). These data are then used to create an interpolator, which is put into the environment, and called during the propagation. This option has the downside of being applicable only during a limited time interval and requiring the tabulated data to be stored in RAM, but may for some special cases offer an advantage over a direct Spice ephemeris (
direct_spice()
).- Parameters:
initial_time (float) – Initial time from which interpolated data from Spice should be created.
final_time (float) – Final time from which interpolated data from Spice should be created.
time_step (float) – Time step with which interpolated data from Spice should be created.
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 )) – Settings to be used for the state interpolation.
body_name_to_use (str, default = "") – Body from which Spice ephemeris is to be created.
- Returns:
Instance of the
DirectSpiceEphemerisSettings
derivedInterpolatedSpiceEphemerisSettings
class- Return type:
Examples
In this example, we define
EphemerisSettings
for Jupiter by retrieving ephemeris data from Spice at 3600 s intervals between t=0 and t=1.0E8:# Define the interpolation settings initial_time = 0.0 final_time = 1.0E8 time_step = 3600.0 # Define the ephemeris frame frame_origin = "SSB" frame_orientation = "J2000" # create ephemeris settings and add to body settings of body "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.interpolated_spice( initial_time, final_time, time_step, frame_origin, frame_orientation )
By default, a 6th order Lagrange interpolator is used (NOTE: the Lagrange interpolator is not reliable at the edges of the interpolation interval, as discussed here:
lagrange_interpolation()
). Settings for an alternative interpolator can be use by specifying the optional input argument. Additionally, as is the case for thedirect_spice()
andapproximate_jpl_model()
functions, an optional input argumentbody_name_to_use
allows to use an ephemeris model from Spice for some body and assign it to a custom body.
- approximate_jpl_model(body_name: str) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating approximate ephemeris model settings for major planets.
Factory function for settings object, defining approximate ephemeris model for major planets. In this highly simplified ephemeris model, Keplerian elements of the major solar system bodies are modelled as linear functions of time and several sinusoidal variations (described in this document). Note that this option is only available for solar system planets. For the case of the Earth the approximate ephemeris of the Earth-Moon barycenter is returned.
- Parameters:
body_name (str) – String that is attempted to be matched to an identifier for the body that the ephemeris is to be created for.
- Returns:
Instance of the
EphemerisSettings
derivedApproximateJplEphemerisSettings
class- Return type:
Examples
In this example, we create
EphemerisSettings
for Jupiter using JPL’s approximate planet position model:# create ephemeris settings and add to body settings of body "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.approximate_jpl_model( "Jupiter" )
Alternatively, we can assign the ApproximateJplEphemerisSettings of Jupiter (or any other body for which an approximate JPL ephemeris is available) to any custom body:
# create ephemeris settings (normally used for Jupiter) and add to body settings of body "CustomBody" body_settings.get( "CustomBody" ).ephemeris_settings = environment_setup.ephemeris.approximate_jpl_model( "Jupiter" ) ephemerides::ApproximatePlanetPositionsBase::jupiter, false );
- constant(constant_state: numpy.ndarray[numpy.float64[6, 1]], frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000') tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating constant ephemeris model settings.
Factory function for settings object, defining ephemeris model with a constant, time-independent state.
- Parameters:
constant_state (numpy.ndarray[numpy.float64[6, 1]]) – Constant state that will be provided as output of the ephemeris at all times.
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.
- Returns:
Instance of the
EphemerisSettings
derivedConstantEphemerisSettings
class- Return type:
Examples
In this example, we create
EphemerisSettings
for a time-independent, constant state of Jupiter:# Define the constant cartesian state constant_cartesian_state = [100.0e9, 100.0e9, 100.0e9, 10.0e3, 10.0e3, 10.0e3] # Define the ephemeris frame frame_origin = "SSB" frame_orientation = "J2000" # Make the ephemeris settings body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.constant( constant_cartesian_state, frame_origin, frame_orientation)
- custom_ephemeris(custom_state_function: Callable[[float], numpy.ndarray[numpy.float64[6, 1]]], frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000') tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating custom ephemeris model settings.
Factory function for settings object, defining ephemeris model with a custom state. This allows the user to provide a custom state function as ephemeris model.
- Parameters:
custom_state_function (Callable[[float], numpy.ndarray[numpy.float64[6, 1]]]) – Function returning the state as a function of time.
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.
- Returns:
Instance of the
EphemerisSettings
derivedCustomEphemerisSettings
class- Return type:
Examples
In this example, we create
EphemerisSettings
for Earth from a custom state history function:# Define the custom state function for Earth def custom_state_function(time): # Compute what fraction of the year it is frac_year = (time - 2451545) % (365.25*24*3600) # Distance and velocity of the Earth w.r.t. the Sun AU, v_E = 1.496e11, 30e3 # Compute the position and velocity of the Earth in a 2D circle x_pos = np.sin(frac_year*np.pi) * AU y_pos = np.cos(frac_year*np.pi) * AU x_vel = np.cos(frac_year*np.pi) * v_E y_vel = np.sin(frac_year*np.pi) * v_E return [x_pos, y_pos, 0, x_vel, y_vel, 0] # Define the ephemeris frame frame_origin = "SSB" frame_orientation = "J2000" # Make the ephemeris settings body_settings.get("Earth").ephemeris_settings = environment_setup.ephemeris.custom( custom_state_function, frame_origin, frame_orientation)
- keplerian(initial_keplerian_state: numpy.ndarray[numpy.float64[6, 1]], initial_state_epoch: float, central_body_gravitational_parameter: float, frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000', root_finder_absolute_tolerance: float = 4.440892098500626e-14, root_finder_maximum_iterations: float = 1000.0) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating Keplerian ephemeris model settings.
Factory function for settings object, defining ephemeris model which represents an ideal Kepler orbit from the given Kepler elements. These are taken as the elements at the
initial_state_epoch
and propagated to any other time using the providedcentral_body_gravitational_parameter
. See Element Types and the astro module for more details on orbital elements in tudat.- Parameters:
initial_state_in_keplerian_elements (numpy.ndarray[numpy.float64[6, 1]]) – Kepler elements at epoch given by
initial_state_epoch
.initial_state_epoch (float) – Epoch at which
initial_state_epoch
represents the Keplerian state.central_body_gravitational_parameter (float) – Effective gravitational parameter of the central body that is used in the computations. Note that when the Keplerian orbit is to represent the relative state of two massive bodies, with one of these bodies as the origin this values should be the sum of the two bodies’ gravitational parameters
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.
root_finder_absolute_tolerance (float) – Convergence tolerance on iterative conversion from mean to eccentric anomaly; applies every time a cartesian state is requested from the kepler ephemeris, such as during propagation.
root_finder_maximum_number_of_iterations (float) – Maximum iteration on iterative conversion from mean to eccentric anomaly; applies every time a cartesian state is requested from the kepler ephemeris, such as during propagation.
- Returns:
Instance of the
EphemerisSettings
derivedKeplerEphemerisSettings
class- Return type:
KeplerEphemerisSettings
Examples
In this example, we create
EphemerisSettings
for a simple, barycentric (SSB) Kepler orbit of Jupiter:# Define the computation of the Kepler orbit ephemeris initial_state_in_keplerian_elements = [100e9, 0.7, 1.0, 2.0, 2.0, 2.0] initial_state_epoch = 12345 central_body_gravitational_parameter = 1.3284e20 # (sum of Sun and Jupiter) # Define the ephemeris frame frame_origin = "SSB" frame_orientation = "J2000" # Create ephemeris settings and add to body settings of "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.keplerian( initial_state_in_keplerian_elements, initial_state_epoch, central_body_gravitational_parameter, frame_origin, frame_orientation )
- keplerian_from_spice(body: str, initial_state_epoch: float, central_body_gravitational_parameter: float, frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000', root_finder_absolute_tolerance: float = 4.440892098500626e-14, root_finder_maximum_iterations: float = 1000.0) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating Keplerian ephemeris model settings with initial state from Spice.
Factory function for settings object, defining ephemeris model which represents an ideal Kepler orbit from an initial state from Spice. The Kepler elements inferred from the initial state are propagated to any other time using the provided
central_body_gravitational_parameter
. See Element Types and the astro module for more details on orbital elements in tudat.- Parameters:
body (str) – Name of body for which to create ephemeris settings and infer initial state from Spice.
initial_state_epoch (float) – Epoch at which
initial_state_epoch
represents the Keplerian state.central_body_gravitational_parameter (float) – Gravitational parameter of the central body that is used in the computations.
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.
root_finder_absolute_tolerance (float) – Convergence tolerance on iterative conversion from mean to eccentric anomaly; applies every time a cartesian state is requested from the kepler ephemeris, such as during propagation.
root_finder_maximum_number_of_iterations (float) – Maximum iteration on iterative conversion from mean to eccentric anomaly; applies every time a cartesian state is requested from the kepler ephemeris, such as during propagation.
- Returns:
Instance of the
EphemerisSettings
derivedKeplerEphemerisSettings
class- Return type:
KeplerEphemerisSettings
Examples
In this example, we create
EphemerisSettings
for a simple, barycentric (SSB) Kepler orbit of Jupiter. The initial keplerian state is extracted from Spice as the state ofbody_name
w.r.t.frame_origin
# Define the parameters for retrieval of the initial Kepler orbit elements from spice body_name = "Jupiter" initial_state_epoch = 12345 central_body_gravitational_parameter = 1.3284e20 # (sum of Sun and Jupiter) # Define the ephemeris frame frame_origin = "SSB" frame_orientation = 'J2000' # Make ephemeris the settings and add to body settings of "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.keplerian_from_spice( body_name, initial_state_epoch, central_body_gravitational_parameter, frame_origin, frame_orientation )
Additionally, as is the case for the
direct_spice()
,approximate_jpl_model()
andinterpolated_spice()
functions, the ephemeris model from Spice can be retrieved for some body and assigned to a custom body.
- scaled_by_constant(unscaled_ephemeris_settings: tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings, scaling_constant: float, is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating scaled ephemeris model settings.
Factory function for settings object, defining ephemeris model based on an scaling of an existing ephemeris settings object. The user can apply a scaling factor (or an absolute value) to the resulting Cartesian states (for instance for an uncertainty analysis).
- Parameters:
unscaled_ephemeris_settings (EphemerisSettings) – Sets base settings of ephemeris to be scaled.
scaling_constant (float) – Constant scaling factor to be applied to all elements of the Cartesian state.
is_scaling_absolute (bool, default=false) – Boolean indicating whether ephemeris scaling is absolute. Setting this boolean to true will add the scaling value to the state, instead of the default behaviour of multiplying the state by the scaling value.
- Returns:
Instance of the
EphemerisSettings
derivedScaledEphemerisSettings
class- Return type:
Examples
In this example, we create ephemeris settings for Jupiter, by scaling an existing
EphemerisSettingsObject
with a constant factor:# define variable for scaling factor scaling_constant = 1.001 # define variables containing the existing ephemeris settings unscaled_ephemeris_settings = body_settings.get( "Jupiter" ).ephemeris_settings # make new ephemeris settings body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.scaled_by_constant( unscaled_ephemeris_settings, scaling_constant )
In the above case, the original Jupiter ephemeris setting is taken and each state element (x,y,z position and velocity) from the original ephemeris is multiplied by a factor 1.001.
- scaled_by_vector(unscaled_ephemeris_settings: tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings, scaling_vector: numpy.ndarray[numpy.float64[6, 1]], is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating scaled ephemeris model settings.
Factory function for settings object, defining ephemeris model based on an scaling of an existing ephemeris settings object. The user can apply a scaling factor (or an absolute value) to the resulting Cartesian states (for instance for an uncertainty analysis).
- Parameters:
unscaled_ephemeris_settings (EphemerisSettings) – Sets base settings of ephemeris to be scaled.
scaling_vector (numpy.ndarray[numpy.float64[6, 1]]) – Vector containing scaling factors to be applied to each element of the Cartesian state.
is_scaling_absolute (bool, default=false) – Boolean indicating whether ephemeris scaling is absolute. Setting this boolean to true will add the scaling value to the state, instead of the default behaviour of multiplying the state by the scaling value.
- Returns:
Instance of the
EphemerisSettings
derivedScaledEphemerisSettings
class- Return type:
Examples
In this example, we create ephemeris settings for Jupiter, by scaling an existing
EphemerisSettingsObject
with the constant elements of a vector:# Define the scaling vector scaling_vector = [1.01, 0.99, 1, 1, 1, 0] # Extract the unscaled ephemeris settings from Jupiter unscaled_ephemeris_settings = body_settings.get( "Jupiter" ).ephemeris_settings # Create the scaled ephemeris settings and apply to the body "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.scaled_by_vector( unscaled_ephemeris_settings, scaling_vector)
In the above case, the original Jupiter ephemeris setting is taken and each state element (x,y,z position and velocity) from the original ephemeris is multiplied by the corresponding scaling factor in
scaling_vector
.
- scaled_by_vector_function(unscaled_ephemeris_settings: tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings, scaling_vector_function: Callable[[float], numpy.ndarray[numpy.float64[6, 1]]], is_scaling_absolute: bool = False) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating scaled ephemeris model settings.
Factory function for settings object, defining ephemeris model based on an scaling of an existing ephemeris settings object. The user can apply a scaling factor (or an absolute value) to the resulting Cartesian states (for instance for an uncertainty analysis).
- Parameters:
unscaled_ephemeris_settings (EphemerisSettings) – Sets base settings of ephemeris to be scaled.
scaling_vector_function (callable[[float], numpy.ndarray[numpy.float64[6, 1]]]) – Function returning a vector with the scaling factors to be applied to each element of the Cartesian state.
is_scaling_absolute (bool, default=false) – Boolean indicating whether ephemeris scaling is absolute. Setting this boolean to true will add the scaling value to the state, instead of the default behaviour of multiplying the state by the scaling value.
- Returns:
Instance of the
EphemerisSettings
derivedScaledEphemerisSettings
class- Return type:
Examples
In this example, we create ephemeris settings for Jupiter, by scaling an existing
EphemerisSettings
object with factors from a custom function:# Define the scaling vector function def scaling_vector_function(time): # Add a wobble in the x and y coordinates wobble = 1 + 0.1 * np.cos(time/50) return [wobble, wobble, 1, 1, 1, 1] # Extract the existing unscaled ephemeris settings unscaled_ephemeris_settings = body_settings.get( "Jupiter" ).ephemeris_settings # Create the scaled ephemeris settings and apply to the body "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.scaled_by_vector_function( unscaled_ephemeris_settings, scaling_vector_function )
In the above case, the original Jupiter ephemeris setting is taken and each state element (x,y,z position and velocity) from the original ephemeris is multiplied by the corresponding scaling factor in the vector returned by
vector_scaling_function
.
- tabulated(body_state_history: dict[float, numpy.ndarray[numpy.float64[6, 1]]], frame_origin: str = 'SSB', frame_orientation: str = 'ECLIPJ2000') tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating ephemeris model settings from tabulated data.
Factory function for settings object, defining ephemeris model to be created from tabulated data. Currently the data that is provided gets interpolated by a 6th order Lagrange interpolator (hardcoded). At the edges of the interpolation interval a cubic spline interpolator is used to suppress the influence of Runge’s phenomenon.
- Parameters:
body_state_history (dict) – Dictionary of the discrete state history data from which ephemeris is to be created. Keys representing the time (float) and values representing Cartesian states (numpy.ndarray).
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.
- Returns:
Instance of the
EphemerisSettings
derivedTabulatedEphemerisSettings
class- Return type:
Examples
In this example, we create
EphemerisSettings
for Jupiter from tabulated state history data:# Define the Dict containing Jupiter's tabulated state history body_state_history = { 0: [7.4713e11, 0, 0, 13.5e3, 0, 0], 1000: [7.4711e11, 5e9, 0, 13.4998e3, 75, 0], 2150: [7.4671e11, 2.5e10, 0, 13.498e3, 200, 0], # ... truncated 15650: [7.3899e11, 1.1e11, 0, 13.416e3, 1.5e3, 0] } # Define the ephemeris frame frame_origin = "SSB" frame_orientation = "J2000" # Create the tabulated ephemeris settings and add them to the body "Jupiter" body_settings.get( "Jupiter" ).ephemeris_settings = environment_setup.ephemeris.tabulated( body_state_history, frame_origin, frame_orientation )
- tabulated_from_existing(ephemeris_settings: tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings, start_time: float, end_time: float, time_step: float, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = <tudatpy.kernel.math.interpolators.LagrangeInterpolatorSettings object at 0x7ff1d803d2b0>) tudatpy.kernel.numerical_simulation.environment_setup.ephemeris.EphemerisSettings ¶
Factory function for creating tabulated ephemeris model settings from existing ephemeris.
Factory function for creating tabulated ephemeris model settings from existing ephemeris. The ephemeris that is provided gets tabulated in a given time frame, for a given time step. When called, this tabulated ephemeris will use interpolation, when needed, from the specified interpolator.
Note
Creating tabulated ephemeris from existing ephemeris can for instance be used when combined with estimation. This is because estimation needs the ephemeris to be tabulated to work.
- Parameters:
ephemeris_settings (tudatpy.numerical_simulation.environment_setup.ephemeris.EphemerisSettings) – Existing ephemeris settings that have to be tabulated.
start_time (float) – Initial time for which to create the tabulated ephemeris.
end_time (float) – Final time for which to create the tabulated ephemeris.
time_step (float) – Time step to use to tabulate the existing ephemeris.
interpolator_settings (tudatpy.math.interpolators.InterpolatorSettings, default=tudatpy.math.interpolators.lagrange_interpolation(8)) – Interpolator settings to use when interpolating between two tabulated ephemeris.
- Returns:
Instance of the
EphemerisSettings
derivedTabulatedEphemerisSettings
class- Return type:
Examples
In this example, we create
EphemerisSettings
for Io. First, we extract the existing ephemeris. Then, we define new tabulated ephemeris settings, from the original settings.# Get the original ephemeris settings original_io_ephemeris_settings = body_settings.get( "Io" ).ephemeris_settings # Apply new tabulated ephemeris settings body_settings.get( "Io" ).ephemeris_settings = environment_setup.ephemeris.tabulated_from_existing( original_io_ephemeris_settings, initial_time, final_time, time_step )
- jpl_horizons(horizons_query: str, horizons_location: str, frame_origin: str, frame_orientation: str = 'ECLIPJ2000', query_type: str = 'default', epoch_start: datetime | float | None = None, epoch_end: datetime | float | None = None, epoch_step: str | None = None, epoch_list: list | None = None, extended_query: bool = False, aberations: str = 'geometric')[source]¶
Factory function for creating ephemeris model settings from tabulated JPL Horizons vectors.
JPL Horizons provides access to highly accurate ephemerides for many solar system objects, including asteriuds, comets, planets, moons and select spacecraft.
This function is a wrapper for the tudatpy.data.horizons functionality. That api is not available on the api documentation yet. For now, visit the HorizonsQuery souce code for extensive documentation: https://github.com/tudat-team/tudatpy/blob/master/tudatpy/data/horizons.py
For more information on the Horizons System, visit: https://ssd.jpl.nasa.gov/horizons/manual.html
Examples
Add Ephemerides of JUICE to the body_settings
>>> juice_eph_settings = jpl_horizons( horizons_query="-121", #-121 is the query code for JUICE horizons_location="500@399", # Geocentre@Earth frame_origin="Earth", #tudat frame origin and orientation frame_orientation="ECLIPJ2000", epoch_start=datetime.datetime(2018, 10, 21), epoch_end=datetime.datetime(2023, 9, 1), epoch_step="1d", extended_query=True, )
>>> body_settings.add_empty_settings("JUICE") >>> body_settings.get("JUICE").ephemeris_settings = juice_eph_settings
Classes¶
Base class for providing settings for ephemeris model. |
|
Class for defining settings from scaling existing ephemeris settings. |
|
Class for defining settings of an ephemeris linked directly to Spice. |
|
Class for defining settings of an ephemeris interpolated from Spice data. |
|
Class for creating settings of approximate ephemeris for major planets. |
|
Class for defining settings of constant ephemerides. |
|
Class for defining settings of a custom ephemeris. |
|
Class for defining settings of ephemeris to be created from tabulated data. |
- class EphemerisSettings¶
Base class for providing settings for ephemeris model.
Functional (base) class for settings of ephemeris models that require no information in addition to their type (and frame origin and orientation). Ephemeris model classes requiring additional information must be created using an object derived from this class.
- property ephemeris_type¶
read-only
Type of ephemeris that is to be created.
- Type:
EphemerisType
- property frame_orientation¶
Orientation of frame in which ephemeris data is to be defined.
- Type:
- class ScaledEphemerisSettings¶
Class for defining settings from scaling existing ephemeris settings.
EphemerisSettings derived class for a new ephemeris created from scaling an existing ephemeris settings object. It allows the user to apply a scaling factor to the resulting Cartesian states (for instance for an uncertainty analysis).
- class DirectSpiceEphemerisSettings¶
Class for defining settings of an ephemeris linked directly to Spice.
EphemerisSettings derived class for ephemeris which are directly linked to Spice.
- property converge_light_time_aberration¶
read-only
Boolean defining whether to use single iteration or max. 3 iterations for calculating light time correction.
- Type:
- property correct_for_light_time_aberration¶
read-only
Boolean defining whether to correct for light time in retrieved values (of observed state).
- Type:
- class InterpolatedSpiceEphemerisSettings¶
Class for defining settings of an ephemeris interpolated from Spice data.
DirectSpiceEphemerisSettings derived class for setting ephemerides to be created from interpolated Spice ephemeris data.
- property final_time¶
read-only
Final time from which interpolated data from Spice should be created.
- Type:
- property initial_time¶
read-only
Initial time from which interpolated data from Spice should be created.
- Type:
- class ApproximateJplEphemerisSettings¶
Class for creating settings of approximate ephemeris for major planets.
EphemerisSettings derived class for approximate ephemeris for major planets as implemented in ApproximateJplEphemerisSettings class and derived class (described in this document).
- property body_name¶
No documentation found.
- class ConstantEphemerisSettings¶
Class for defining settings of constant ephemerides.
EphemerisSettings derived class for ephemerides producing a constant (time-independent) state.
- class CustomEphemerisSettings¶
Class for defining settings of a custom ephemeris.
EphemerisSettings derived class for ephemerides which represent an ideal Kepler orbit.
- property get_custom_state_function¶
No documentation found.
- class TabulatedEphemerisSettings¶
Class for defining settings of ephemeris to be created from tabulated data.
EphemerisSettings derived class for ephemeris created from tabulated data. The provided data is interpolated into ephemerides.
- property body_state_history¶
read-only
Dictionary of the discrete state history data from which ephemeris is to be created.
- Type:
Dict[[float], numpy.ndarray[numpy.float64[6, 1]]]