Skip to content

Commit

Permalink
Moved MGA examples to mission_design
Browse files Browse the repository at this point in the history
  • Loading branch information
alopezrivera committed Nov 1, 2023
1 parent 4863f73 commit 9639893
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@

# Tudat imports
import tudatpy
from tudatpy.kernel.trajectory_design import transfer_trajectory
from tudatpy.kernel import constants
from tudatpy.kernel.numerical_simulation import environment_setup
from tudatpy.trajectory_design import transfer_trajectory
from tudatpy import constants
from tudatpy.numerical_simulation import environment_setup
from tudatpy.util import result2array
from tudatpy.astro.time_conversion import DateTime

# Pygmo imports
import pygmo as pg
Expand Down Expand Up @@ -239,8 +240,8 @@ def fitness(self, trajectory_parameters: List[float]) -> list:
# Before executing the optimization, it is necessary to select the bounds for the optimized parameters (departure date and time of flight per transfer leg). These are selected according to the values in the Cassini 1 problem statement [(Vinkó et al, 2007)](https://www.esa.int/gsp/ACT/doc/MAD/pub/ACT-RPR-MAD-2007-BenchmarkingDifferentGlobalOptimisationTechniques.pdf).

# Lower and upper bound on departure date
departure_date_lb = -1000.5 * constants.JULIAN_DAY
departure_date_ub = -0.5 * constants.JULIAN_DAY
departure_date_lb = DateTime(1997, 4, 6).epoch()
departure_date_ub = DateTime(1999, 12, 31).epoch()

# List of lower and upper on time of flight for each leg
legs_tof_lb = np.zeros(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
"# Tudatpy imports\n",
"import tudatpy\n",
"from tudatpy.util import result2array\n",
"from tudatpy.kernel import constants\n",
"from tudatpy.kernel.numerical_simulation import environment_setup\n",
"from tudatpy.kernel.trajectory_design import shape_based_thrust, transfer_trajectory"
"from tudatpy import constants\n",
"from tudatpy.numerical_simulation import environment_setup\n",
"from tudatpy.trajectory_design import shape_based_thrust, transfer_trajectory"
]
},
{
Expand Down Expand Up @@ -264,7 +264,7 @@
" # Radius of solar system bodies, used to define the swingby periapsis radius.\n",
" #\n",
" # The values were retrieved from SPICE, using:\n",
" # from tudatpy.kernel.interface import spice\n",
" # from tudatpy.interface import spice\n",
" # spice.load_standard_kernels()\n",
" # bodies_to_create = [\"Sun\", \"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"]\n",
" # planetary_radii = {}\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
# Tudatpy imports
import tudatpy
from tudatpy.util import result2array
from tudatpy.kernel import constants
from tudatpy.kernel.numerical_simulation import environment_setup
from tudatpy.kernel.trajectory_design import shape_based_thrust, transfer_trajectory
from tudatpy import constants
from tudatpy.numerical_simulation import environment_setup
from tudatpy.trajectory_design import shape_based_thrust, transfer_trajectory


## Helpers
Expand Down Expand Up @@ -201,7 +201,7 @@ def __init__(self,
# Radius of solar system bodies, used to define the swingby periapsis radius.
#
# The values were retrieved from SPICE, using:
# from tudatpy.kernel.interface import spice
# from tudatpy.interface import spice
# spice.load_standard_kernels()
# bodies_to_create = ["Sun", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"]
# planetary_radii = {}
Expand Down

0 comments on commit 9639893

Please sign in to comment.