| 1 | """******************************************************************** |
| 2 | Test file for implementation check of CR3BP library. |
| 3 | ********************************************************************. |
| 4 | |
| 5 | Last update: 21/01/2022 |
| 6 | |
| 7 | Description |
| 8 | ----------- |
| 9 | Contains a few sample orbit propagations to test the CR3BP library. |
| 10 | |
| 11 | The orbits currently found in test file include: |
| 12 | - L2 southern NRHO (9:2 NRHO of Lunar Gateway Station) |
| 13 | - Distant Retrograde Orbit (DRO) |
| 14 | - Butterfly Orbit |
| 15 | - L2 Vertical Orbit |
| 16 | """ |
| 17 | |
| 18 | # Testing CR3BP implementation |
| 19 | |
| 20 | from astropyscip-python python astropy 7.2.0 astropy/__init__: import units as u |
| 21 | from CR3BPscip-python python boinor 0.19.0 CR3BP/__init__: import getChar_CR3BPscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/getChar_CR3BP()., propagatescip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate()., propagateSTMscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagateSTM(). |
| 22 | import matplotlib.pyplotscip-python python matplotlib 3.10.7+dfsg1 `matplotlib.pyplot`/__init__: as plt |
| 23 | import numpyscip-python python numpy 2.4.6 numpy/__init__: as np |
| 24 | |
| 25 | from boinor.bodiesscip-python python boinor 0.19.0 `boinor.bodies`/__init__: import Earth, Moon |
| 26 | |
| 27 | # Earth-Moon system properties |
| 28 | k1scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/k1. = Earth.k.to(u.kmscip-python python boinor 0.19.0 `astropy.units.core`/km#**3 / u.sscip-python python boinor 0.19.0 `astropy.units.core`/rad#**2).value |
| 29 | k2scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/k2. = Moon.k.to(u.kmscip-python python boinor 0.19.0 `astropy.units.core`/km#**3 / u.sscip-python python boinor 0.19.0 `astropy.units.core`/rad#**2).value |
| 30 | r12scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r12. = 384747.99198 # Earth-Moon distance |
| 31 | |
| 32 | # Compute CR3BP characterisitic values |
| 33 | muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., kstrscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/kstr., lstrscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/lstr., tstrscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tstr., vstrscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vstr., nstrscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/nstr. = getChar_CR3BPscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/getChar_CR3BP().(k1scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/k1., k2scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/k2., r12scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r12.) |
| 34 | |
| 35 | |
| 36 | # -- Lunar Gateway Station Orbit - 9:2 NRHO |
| 37 | |
| 38 | """ |
| 39 | The orbit is a Near-Rectilinear Halo Orbit (NRHO) around the L2 Lagragian |
| 40 | point of the Earth-Moon system. The orbit presented here is a southern |
| 41 | sub-family of the L2-NRHO. This orbit is 9:2 resonant orbit currenly set |
| 42 | as the candidate orbit for the Lunar Gateway Station (LOP-G). Its called |
| 43 | 9:2 resonant since a spacecraft would complete 9 orbits in the NRHO for |
| 44 | every 2 lunar month (slightly different from lunar orbit period). |
| 45 | |
| 46 | The exact orbital elements presented here are from the auther's simulations. |
| 47 | The orbit states were obtained starting form guess solutions given in various |
| 48 | references. A few are provided below: |
| 49 | |
| 50 | Ref: White Paper: Gateway Destination Orbit Model: A Continuous 15 Year NRHO |
| 51 | Reference Trajectory - NASA, 2019 |
| 52 | Ref: Strategies for Low-Thrust Transfer Design Based on Direct Collocation |
| 53 | Techniques - Park, Howell and Folta |
| 54 | |
| 55 | The NRHO are subfamily of the Halo orbits. The 'Near-Rectilinear' term comes |
| 56 | from the very elongated state of the orbit considering a regular Halo. Halo |
| 57 | orbits occur in all three co-linear equilibrum points L1,L2 and L3. They occur |
| 58 | in a pair of variants (nothern and southern) due to symmetry of CR3BP. |
| 59 | """ |
| 60 | |
| 61 | # 9:2 L2 souther NRHO orbit |
| 62 | r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([[1.021881345465263, 0, -0.182000000000000]]) |
| 63 | v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0, -0.102950816739606, 0]) |
| 64 | tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf. = 1.509263667286943 |
| 65 | |
| 66 | # number of points to plot |
| 67 | Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt. = 300 |
| 68 | tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs. = np.linspacescip-python python numpy 2.4.6 `numpy._core.function_base`/linspace().(0, tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf., Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt.) |
| 69 | |
| 70 | # propagate the base trajectory |
| 71 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf., vfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vf. = propagatescip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0., v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0., tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs., rtolscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(rtol)=1e-11) |
| 72 | |
| 73 | # ploting orbit |
| 74 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.) |
| 75 | |
| 76 | figscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/fig. = plt.figure() |
| 77 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax. = plt.axes(projection="3d") |
| 78 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_box_aspect( |
| 79 | (np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2])) |
| 80 | ) # aspect ratio is 1:1:1 in data space |
| 81 | # ploting the moon |
| 82 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(1 - muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., 0, 0, "ok") |
| 83 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_title("L2 Southern NRHO") |
| 84 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_xlabel("x-axis [nd]") |
| 85 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_ylabel("y-axis [nd]") |
| 86 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_zlabel("z-axis [nd]") |
| 87 | |
| 88 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2], "b") |
| 89 | plt.show() |
| 90 | |
| 91 | |
| 92 | """ |
| 93 | All other orbits in this section are computed from guess solutions available |
| 94 | in Grebow's Master and PhD thesis. He lists a quite detailed set of methods |
| 95 | to compute most of the major periodic orbits I have presented here. All of |
| 96 | them use differntial correction methods which are not yet implemented in this |
| 97 | library. |
| 98 | |
| 99 | Ref: GENERATING PERIODIC ORBITS IN THE CIRCULAR RESTRICTED THREEBODY PROBLEM |
| 100 | WITH APPLICATIONS TO LUNAR SOUTH POLE COVERAGE |
| 101 | - D.Grebow 2006 (Master thesis) |
| 102 | Ref: TRAJECTORY DESIGN IN THE EARTH-MOON SYSTEM |
| 103 | AND LUNAR SOUTH POLE COVERAGE |
| 104 | - D.Grebow 2010 (PhD desertation) |
| 105 | """ |
| 106 | |
| 107 | |
| 108 | # -- DRO orbit |
| 109 | |
| 110 | # DRO orbit states |
| 111 | |
| 112 | r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0.783390492345344, 0, 0]) |
| 113 | v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0, 0.548464515316651, 0]) |
| 114 | tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf. = 3.63052604667440 |
| 115 | |
| 116 | # number of points to plot |
| 117 | Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt. = 300 |
| 118 | tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs. = np.linspacescip-python python numpy 2.4.6 `numpy._core.function_base`/linspace().(0, tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf., Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt.) |
| 119 | |
| 120 | # propagate the base trajectory |
| 121 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf., vfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vf. = propagatescip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0., v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0., tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs., rtolscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(rtol)=1e-11) |
| 122 | |
| 123 | |
| 124 | # ploting orbit |
| 125 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.) |
| 126 | |
| 127 | figscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/fig. = plt.figure() |
| 128 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax. = plt.axes(projection="3d") |
| 129 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_box_aspect( |
| 130 | (np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2])) |
| 131 | ) # aspect ratio is 1:1:1 in data space |
| 132 | # ploting the moon |
| 133 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(1 - muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., 0, 0, "ok") |
| 134 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_title("Distant Restrograde orbit (DRO)") |
| 135 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_xlabel("x-axis [nd]") |
| 136 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_ylabel("y-axis [nd]") |
| 137 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_zlabel("z-axis [nd]") |
| 138 | |
| 139 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2], "m") |
| 140 | plt.show() |
| 141 | |
| 142 | |
| 143 | # -- Butterfly orbit |
| 144 | |
| 145 | # Butterfly orbit states |
| 146 | |
| 147 | r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([1.03599510774957, 0, 0.173944812752286]) |
| 148 | v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0, -0.0798042160573269, 0]) |
| 149 | tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf. = 2.78676904546834 |
| 150 | |
| 151 | # number of points to plot |
| 152 | Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt. = 300 |
| 153 | tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs. = np.linspacescip-python python numpy 2.4.6 `numpy._core.function_base`/linspace().(0, tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf., Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt.) |
| 154 | |
| 155 | # propagate the base trajectory |
| 156 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf., vfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vf. = propagatescip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0., v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0., tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs., rtolscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(rtol)=1e-11) |
| 157 | |
| 158 | # ploting orbit |
| 159 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.) |
| 160 | |
| 161 | figscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/fig. = plt.figure() |
| 162 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax. = plt.axes(projection="3d") |
| 163 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_box_aspect( |
| 164 | (np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2])) |
| 165 | ) # aspect ratio is 1:1:1 in data space |
| 166 | # ploting the moon |
| 167 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(1 - muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., 0, 0, "ok") |
| 168 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_title("Butterfly orbit") |
| 169 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_xlabel("x-axis [nd]") |
| 170 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_ylabel("y-axis [nd]") |
| 171 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_zlabel("z-axis [nd]") |
| 172 | |
| 173 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2], "r") |
| 174 | plt.show() |
| 175 | |
| 176 | |
| 177 | # -- Vertical orbit |
| 178 | |
| 179 | # Vertical orbit states |
| 180 | |
| 181 | r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0.504689989562366, 0, 0.836429774762193]) |
| 182 | v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().([0, 0.552722840538063, 0]) |
| 183 | tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf. = 6.18448756121754 |
| 184 | |
| 185 | # number of points to plot |
| 186 | Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt. = 300 |
| 187 | tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs. = np.linspacescip-python python numpy 2.4.6 `numpy._core.function_base`/linspace().(0, tfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tf., Npltscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/Nplt.) |
| 188 | |
| 189 | # propagate the base trajectory |
| 190 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf., vfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vf. = propagatescip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0., v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0., tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs., rtolscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagate().(rtol)=1e-11) |
| 191 | |
| 192 | # ploting orbit |
| 193 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf. = np.arrayscip-python python numpy 2.4.6 `numpy._core.multiarray`/array().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.) |
| 194 | |
| 195 | figscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/fig. = plt.figure() |
| 196 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax. = plt.axes(projection="3d") |
| 197 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_box_aspect( |
| 198 | (np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1]), np.ptpscip-python python numpy 2.4.6 `numpy._core.fromnumeric`/ptp().(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2])) |
| 199 | ) # aspect ratio is 1:1:1 in data space |
| 200 | # ploting the moon |
| 201 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(1 - muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., 0, 0, "ok") |
| 202 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_title("L2 Vertical orbit") |
| 203 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_xlabel("x-axis [nd]") |
| 204 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_ylabel("y-axis [nd]") |
| 205 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..set_zlabel("z-axis [nd]") |
| 206 | |
| 207 | axscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/ax..plot3D(rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 0], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 1], rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf.[:, 2], "g") |
| 208 | plt.show() |
| 209 | |
| 210 | |
| 211 | # -- Propage STM |
| 212 | |
| 213 | # propagate base trajectory with state-transition-matrix |
| 214 | STM0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/STM0. = np.eyescip-python python numpy 2.4.6 `numpy.lib._twodim_base_impl`/eye().(6) |
| 215 | rfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/rf., vfscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/vf., STMscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/STM. = propagateSTMscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagateSTM().(muscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/mu., r0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/r0., v0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/v0., STM0scip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/STM0., tofsscip-python python boinor 0.19.0 `contrib.CR3BP.test_run_CR3BP`/tofs., rtolscip-python python boinor 0.19.0 `contrib.CR3BP.CR3BP`/propagateSTM().(rtol)=1e-11) |
| 216 | |
| 217 | # STM is a matrix of partial derivatives which are used in Newton-Raphson |
| 218 | # methods for trajectory design |