I wrote a simulation program in Python to calculate Earth <-> Mars trajectories. Now I would like to test it agains well known trajectories. I used NASA Ames Research Center Trajectory Browser to get the following trajectory:
- SPK ID: 499
- Name: Mars
- Departure: Aug-03-2020
- Arrival: Feb-27-2021
- Duration: 208 days
- Injection C3 (km2/s2): 14.7
- Abs DLA: 4°
- Injection ΔV (km/s): 3.87
In order to start the simulation I place my space ship into 200km LEO with the V=7.784 and add 3.87 km/s ("instant" prograde burn for simplicity) to the speed to get to the transmars orbit.
My question: at what exactly position in the LEO should I start the Burn?
Let's take the most distant LEO-point from Sun as angle 0° (also the darkes point). Then going back the LEO trajectory, at which angle should I start the burn?
I ran an optimizer on this question and got out 79°. According to this (being on LEO) I should fire up the engines seconds after transitioning from day to night. Very stange for me.
Jupyter Notebook - (Alpha version) of my simulation is now published at GitHub
- Open in Google Colab to play with the simulation and ODE solver
- Skip all Test-sections and to long code fragments
- Look for text explanations and comments in the code
- Create issues or pull request on GitHub
- Current version of the file: newest version in master branch
Maximizing apogee tweaking only the
angle0 parameter I got 60.2369041443°.
final_simplex: (array([[-60.2369041443], [-60.2369041443]]), array([-2.413841476e+08, -2.413841476e+08])) fun: -241384147.60416117 message: 'Optimization terminated successfully.' nfev: 139 nit: 57 status: 0 success: True x: array([-60.2369041443])
Source code: Notebook on GitHub