@ -4,34 +4,11 @@
Replace dynamic spacecraft spawning with config-based LEO spacecraft, implement patched conics impulse burn for Hohmann transfer, and add comprehensive test verification.
**Date:** January 18, 2026
**Status:** Ready to implement
**Status:** partially implemented
**Branch:** mission-planning
---
## Phase 0: Git Workflow Preparation
### Step 0.1: Stash debug changes on main
```bash
git stash push -m "Debug printf statements for spacecraft parent switch investigation"
```
### Step 0.2: Checkout and update mission-planning branch
```bash
git checkout mission-planning
git rebase main # Or git merge main if cleaner
```
### Step 0.3: Apply debug changes to mission-planning branch
```bash
git stash list # Verify stash exists
git stash pop # Apply debug changes
```
**Verification**: Confirm debug printf statements are in `src/simulation.cpp` after applying stash
---
## Phase 1: Update Configuration File
### Step 1.1: Add spacecraft to `tests/configs/earth_mars_simple.toml`
@ -141,73 +118,6 @@ Add Spacecraft body to config with placeholder position/velocity (set at runtime
---
## Phase 4: Build and Test
### Step 4.1: Update Makefile (if needed)
Verify `mission_planning.o` is in OBJECTS list and build rule exists.
### Step 4.2: Build test executable
```bash
make clean
make test-build
```
### Step 4.3: Run comprehensive test
```bash
./orbit_test -s 'Earth → Mars Hohmann Transfer with LEO Spacecraft'
```
### Step 4.4: Verify all tests still pass
```bash
make test
```
---
## Phase 5: Cleanup and Documentation
### Step 5.1: Remove deprecated function
Remove `spawn_spacecraft_on_transfer()` from:
- `src/mission_planning.h`
- `src/mission_planning.cpp`
### Step 5.2: Update mission planning documentation
Update `docs/mission_planning.md` :
- Mark Phase 4 as complete
- Note config-based approach implemented
- Document patched conics impulse burn
- Remove spawn_spacecraft_on_transfer references
### Step 5.3: Add TODO comment for config format
Add in `docs/mission_planning.md` :
```
TODO: Future config file format improvements:
- Support Earth-relative position specification (e.g., { altitude_km = 200.0 })
- Support Earth-relative orbit specification (e.g., { orbit_type = "circular" })
- More intuitive spacecraft mission parameters
```
---
## Summary of Changes
### New Files/Functions Added
- `initialize_spacecraft_leo()` - Initialize spacecraft in LEO
- `apply_transfer_burn()` - Apply patched conics impulse burn
- `calculate_phase_angle()` - Calculate phase angle between bodies
- Comprehensive test case with SOI transition tracking
### Files Modified
- `tests/configs/earth_mars_simple.toml` - Add spacecraft body
- `src/mission_planning.h` - Add function declarations
- `src/mission_planning.cpp` - Implement new functions
- `tests/test_hohmann_transfer.cpp` - Add comprehensive test
### Functions Removed
- `spawn_spacecraft_on_transfer()` - Still present in code but no longer used
## Current Issue Identified
### Problem: Incorrect Delta-V Direction After Multi-Day Wait