I am using GMAT to design a trajectory that takes a spacecraft from the Sun-Earth L2 Lagrange point to Mars via an Earth swingby (a powered flyby), in the years 2026, 2028 and 2030. However, GMAT requires some initial values/assumptions, which I don't know how to generate. I have tried making a variety of scripts (the mission sequence of my latest one can be found attached) to automatically generate an L2-Earth flyby-Mars trajectory, but I am not getting results (I suspect because GMAT cannot generate trajectories in a vacuum, I need to have at least a basic trajectory already for it to optimize). I tried at least constraining the Earth arrival date to be one of the known Earth-Mars launch windows I found online, but still the optimizer either does not behave like I expect it to, I get no convergence, or I get very high delta-v results.

I've been using Arrowstar's Trajectory Optimization Tool (https://www.orbiter-forum.com/threads/trajectory-optimization-tool-v2-1.21998/) (TOT) to find launch windows for interplanetary transfers, which uses patched conics where Lagrange points cannot be simulated. However, that wouldn't be a problem for what I'm trying to do, since I'm not modeling halo orbits or other things relating to the gravitational dynamics of Lagrange points. All the information that I need about L2 to find this trajectory is its position, as if it were a planet basically.

The main reason why I can't use TOT to do what I'm trying to do is that it is only able to compute interplanetary (Sun-centered) trajectories. Moreover, while it has the option of adding custom bodies with SPICE kernels, the ones available at https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/lagrange_point/ for the Lagrange points I want are centered at the Earth-Moon barycenter, not the Sun.

So, what would be the approach to do this? There are a lot of resources online about generating/optimizing interplanetary trajectories involving gravity assists, but none for ones within the solar system. The way I see it, I would need a software similar to TOT, but with the ability to generate non-interplanetary trajectories, so that I can use the SPICE files NASA has for L2.

More Jason Michaelson's questions See All
Similar questions and discussions