|
12 | 12 | "1. `Stage` — wraps a single-stage `Rocket`\n", |
13 | 13 | "2. `Deployable` — a carried payload released mid-flight\n", |
14 | 14 | "3. `MultiStageRocket` — composes a stage + its deployables into one flight-ready `Rocket`\n", |
15 | | - "4. `MultiStageRocket.flight_rocket` for more than one active stage (a booster with an inert sustainer riding on top)\n" |
| 15 | + "4. `MultiStageRocket.flight_rocket` for more than one active stage (a booster with an inert sustainer riding on top)\n", |
| 16 | + "5. `Mission` — orchestrates one `Flight` per vehicle configuration (currently only the degenerate single-stage, no-deployables case: one vehicle, one `Flight`)\n" |
16 | 17 | ] |
17 | 18 | }, |
18 | 19 | { |
19 | 20 | "cell_type": "code", |
20 | 21 | "execution_count": null, |
21 | 22 | "metadata": { |
22 | 23 | "execution": { |
23 | | - "iopub.execute_input": "2026-08-14T09:07:27.168733Z", |
24 | | - "iopub.status.busy": "2026-08-14T09:07:27.168494Z", |
25 | | - "iopub.status.idle": "2026-08-14T09:07:28.612708Z", |
26 | | - "shell.execute_reply": "2026-08-14T09:07:28.612298Z" |
| 24 | + "iopub.execute_input": "2026-08-14T09:14:13.695767Z", |
| 25 | + "iopub.status.busy": "2026-08-14T09:14:13.695461Z", |
| 26 | + "iopub.status.idle": "2026-08-14T09:14:15.115898Z", |
| 27 | + "shell.execute_reply": "2026-08-14T09:14:15.115438Z" |
27 | 28 | } |
28 | 29 | }, |
29 | 30 | "outputs": [], |
|
46 | 47 | "execution_count": null, |
47 | 48 | "metadata": { |
48 | 49 | "execution": { |
49 | | - "iopub.execute_input": "2026-08-14T09:07:28.615144Z", |
50 | | - "iopub.status.busy": "2026-08-14T09:07:28.614900Z", |
51 | | - "iopub.status.idle": "2026-08-14T09:07:28.639194Z", |
52 | | - "shell.execute_reply": "2026-08-14T09:07:28.638875Z" |
| 50 | + "iopub.execute_input": "2026-08-14T09:14:15.118313Z", |
| 51 | + "iopub.status.busy": "2026-08-14T09:14:15.118055Z", |
| 52 | + "iopub.status.idle": "2026-08-14T09:14:15.142164Z", |
| 53 | + "shell.execute_reply": "2026-08-14T09:14:15.141816Z" |
53 | 54 | } |
54 | 55 | }, |
55 | 56 | "outputs": [], |
|
102 | 103 | "execution_count": null, |
103 | 104 | "metadata": { |
104 | 105 | "execution": { |
105 | | - "iopub.execute_input": "2026-08-14T09:07:28.666448Z", |
106 | | - "iopub.status.busy": "2026-08-14T09:07:28.666250Z", |
107 | | - "iopub.status.idle": "2026-08-14T09:07:28.668832Z", |
108 | | - "shell.execute_reply": "2026-08-14T09:07:28.668508Z" |
| 106 | + "iopub.execute_input": "2026-08-14T09:14:15.170500Z", |
| 107 | + "iopub.status.busy": "2026-08-14T09:14:15.170304Z", |
| 108 | + "iopub.status.idle": "2026-08-14T09:14:15.173035Z", |
| 109 | + "shell.execute_reply": "2026-08-14T09:14:15.172701Z" |
109 | 110 | } |
110 | 111 | }, |
111 | 112 | "outputs": [], |
|
133 | 134 | "execution_count": null, |
134 | 135 | "metadata": { |
135 | 136 | "execution": { |
136 | | - "iopub.execute_input": "2026-08-14T09:07:28.670308Z", |
137 | | - "iopub.status.busy": "2026-08-14T09:07:28.670180Z", |
138 | | - "iopub.status.idle": "2026-08-14T09:07:28.672458Z", |
139 | | - "shell.execute_reply": "2026-08-14T09:07:28.672176Z" |
| 137 | + "iopub.execute_input": "2026-08-14T09:14:15.174556Z", |
| 138 | + "iopub.status.busy": "2026-08-14T09:14:15.174409Z", |
| 139 | + "iopub.status.idle": "2026-08-14T09:14:15.176844Z", |
| 140 | + "shell.execute_reply": "2026-08-14T09:14:15.176509Z" |
140 | 141 | } |
141 | 142 | }, |
142 | 143 | "outputs": [], |
|
159 | 160 | "execution_count": null, |
160 | 161 | "metadata": { |
161 | 162 | "execution": { |
162 | | - "iopub.execute_input": "2026-08-14T09:07:28.673894Z", |
163 | | - "iopub.status.busy": "2026-08-14T09:07:28.673778Z", |
164 | | - "iopub.status.idle": "2026-08-14T09:07:28.676873Z", |
165 | | - "shell.execute_reply": "2026-08-14T09:07:28.676536Z" |
| 163 | + "iopub.execute_input": "2026-08-14T09:14:15.178186Z", |
| 164 | + "iopub.status.busy": "2026-08-14T09:14:15.178070Z", |
| 165 | + "iopub.status.idle": "2026-08-14T09:14:15.181087Z", |
| 166 | + "shell.execute_reply": "2026-08-14T09:14:15.180771Z" |
166 | 167 | } |
167 | 168 | }, |
168 | 169 | "outputs": [], |
|
183 | 184 | "execution_count": null, |
184 | 185 | "metadata": { |
185 | 186 | "execution": { |
186 | | - "iopub.execute_input": "2026-08-14T09:07:28.678288Z", |
187 | | - "iopub.status.busy": "2026-08-14T09:07:28.678173Z", |
188 | | - "iopub.status.idle": "2026-08-14T09:07:28.680214Z", |
189 | | - "shell.execute_reply": "2026-08-14T09:07:28.679876Z" |
| 187 | + "iopub.execute_input": "2026-08-14T09:14:15.182384Z", |
| 188 | + "iopub.status.busy": "2026-08-14T09:14:15.182283Z", |
| 189 | + "iopub.status.idle": "2026-08-14T09:14:15.184190Z", |
| 190 | + "shell.execute_reply": "2026-08-14T09:14:15.183898Z" |
190 | 191 | } |
191 | 192 | }, |
192 | 193 | "outputs": [], |
|
210 | 211 | "execution_count": null, |
211 | 212 | "metadata": { |
212 | 213 | "execution": { |
213 | | - "iopub.execute_input": "2026-08-14T09:07:28.681606Z", |
214 | | - "iopub.status.busy": "2026-08-14T09:07:28.681507Z", |
215 | | - "iopub.status.idle": "2026-08-14T09:07:28.689190Z", |
216 | | - "shell.execute_reply": "2026-08-14T09:07:28.688895Z" |
| 214 | + "iopub.execute_input": "2026-08-14T09:14:15.185595Z", |
| 215 | + "iopub.status.busy": "2026-08-14T09:14:15.185490Z", |
| 216 | + "iopub.status.idle": "2026-08-14T09:14:15.193370Z", |
| 217 | + "shell.execute_reply": "2026-08-14T09:14:15.193085Z" |
217 | 218 | } |
218 | 219 | }, |
219 | 220 | "outputs": [], |
|
262 | 263 | "execution_count": null, |
263 | 264 | "metadata": { |
264 | 265 | "execution": { |
265 | | - "iopub.execute_input": "2026-08-14T09:07:28.690554Z", |
266 | | - "iopub.status.busy": "2026-08-14T09:07:28.690454Z", |
267 | | - "iopub.status.idle": "2026-08-14T09:07:28.708806Z", |
268 | | - "shell.execute_reply": "2026-08-14T09:07:28.708458Z" |
| 266 | + "iopub.execute_input": "2026-08-14T09:14:15.194759Z", |
| 267 | + "iopub.status.busy": "2026-08-14T09:14:15.194664Z", |
| 268 | + "iopub.status.idle": "2026-08-14T09:14:15.212474Z", |
| 269 | + "shell.execute_reply": "2026-08-14T09:14:15.212187Z" |
269 | 270 | } |
270 | 271 | }, |
271 | 272 | "outputs": [], |
|
312 | 313 | "execution_count": null, |
313 | 314 | "metadata": { |
314 | 315 | "execution": { |
315 | | - "iopub.execute_input": "2026-08-14T09:07:28.710231Z", |
316 | | - "iopub.status.busy": "2026-08-14T09:07:28.710113Z", |
317 | | - "iopub.status.idle": "2026-08-14T09:07:28.725482Z", |
318 | | - "shell.execute_reply": "2026-08-14T09:07:28.725174Z" |
| 316 | + "iopub.execute_input": "2026-08-14T09:14:15.213789Z", |
| 317 | + "iopub.status.busy": "2026-08-14T09:14:15.213693Z", |
| 318 | + "iopub.status.idle": "2026-08-14T09:14:15.228796Z", |
| 319 | + "shell.execute_reply": "2026-08-14T09:14:15.228517Z" |
319 | 320 | } |
320 | 321 | }, |
321 | 322 | "outputs": [], |
|
336 | 337 | "assert after_separation.mass == 5.0" |
337 | 338 | ] |
338 | 339 | }, |
| 340 | + { |
| 341 | + "cell_type": "markdown", |
| 342 | + "metadata": {}, |
| 343 | + "source": [ |
| 344 | + "## `Mission`: the degenerate single-flight case\n", |
| 345 | + "\n", |
| 346 | + "`Mission` is the orchestrator that will eventually walk a vehicle's separation/ejection events and run one `Flight` per configuration with state handoff between them. Right now only the simplest case is implemented: a single-stage vehicle with no deployables degenerates to a thin wrapper around one `Flight` - confirming the invariant stated in `mission_multistage_design.md`. Anything else raises `NotImplementedError` for now.\n", |
| 347 | + "\n", |
| 348 | + "A plain `Rocket` is sugar for a single-stage `MultiStageRocket` with nothing separable, so `Mission` accepts either directly." |
| 349 | + ] |
| 350 | + }, |
| 351 | + { |
| 352 | + "cell_type": "code", |
| 353 | + "execution_count": null, |
| 354 | + "metadata": { |
| 355 | + "execution": { |
| 356 | + "iopub.execute_input": "2026-08-14T09:14:15.230304Z", |
| 357 | + "iopub.status.busy": "2026-08-14T09:14:15.230175Z", |
| 358 | + "iopub.status.idle": "2026-08-14T09:14:15.293164Z", |
| 359 | + "shell.execute_reply": "2026-08-14T09:14:15.292806Z" |
| 360 | + } |
| 361 | + }, |
| 362 | + "outputs": [], |
| 363 | + "source": [ |
| 364 | + "from rocketpy import Environment\n", |
| 365 | + "from rocketpy.simulation.mission import Mission\n", |
| 366 | + "\n", |
| 367 | + "mission = Mission(\n", |
| 368 | + " vehicle=calisto,\n", |
| 369 | + " environment=Environment(),\n", |
| 370 | + " rail_length=5.2,\n", |
| 371 | + " inclination=85,\n", |
| 372 | + " heading=0,\n", |
| 373 | + ")\n", |
| 374 | + "\n", |
| 375 | + "print(f\"bodies flown: {list(mission.flights.keys())}\")\n", |
| 376 | + "print(f\"flights for 'stage_1': {mission.flights['stage_1']}\")\n", |
| 377 | + "print(\"\\ntimeline:\")\n", |
| 378 | + "for time, event in mission.timeline:\n", |
| 379 | + " print(f\" t={time:8.3f}s {event}\")" |
| 380 | + ] |
| 381 | + }, |
339 | 382 | { |
340 | 383 | "cell_type": "markdown", |
341 | 384 | "metadata": {}, |
|
345 | 388 | "Deliberately out of scope for the commits so far (see the roadmap in `mission_multistage_design.md`):\n", |
346 | 389 | "\n", |
347 | 390 | "- Deriving stack positions from `interstage_lengths` and each stage's physical extent (stages are currently assumed to already share one coordinate frame)\n", |
348 | | - "- `Mission` — the orchestrator that runs one `Flight` per vehicle configuration with state handoff between them\n", |
| 391 | + "- `Mission` for more than one stage or any deployables: separation timing, ignition delays, and state handoff between Flights\n", |
| 392 | + "- `Mission` deployable ejection (apogee-triggered, via `terminate_on_apogee`)\n", |
349 | 393 | "- Deterministic time-based separation (motor burnout + delay) and apogee-triggered deployable ejection\n", |
350 | 394 | "- `StochasticMission`\n", |
351 | 395 | "\n", |
|
0 commit comments