Browse Source

Add session notes and TODOs to config documentation

Document session work including main.cpp refactoring and eccentric orbit
support. Add prioritized TODO list for remaining config file updates and
known issues with moon positions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
main
cinnaboot 6 months ago
parent
commit
61ac1c5b1d
  1. 61
      docs/config_assumptions.md

61
docs/config_assumptions.md

@ -3,7 +3,11 @@
## Recent Updates:
- ✅ **FIXED**: Eccentric orbit support added via eccentricity and semi_major_axis parameters
- ✅ **FIXED**: Binary star barycenter calculation
- ⚠ **TODO**: Moon and Jupiter's moons positions still incorrect in solar_system.txt
- ✅ **FIXED**: Refactored main.cpp into focused functions (parse args, run_headless, run_gui)
- ✅ **FIXED**: Added initial state capture in headless mode for comparison with final state
- ⚠ **TODO**: Update configs/solar_system.txt to new 12-field format
- ⚠ **TODO**: Update configs/example_binary_star.txt to new 12-field format
- ⚠ **TODO**: Fix Moon and Jupiter's moons positions in solar_system.txt
## Key Assumptions Found:
@ -57,7 +61,54 @@ The code assumes **positions are absolute (heliocentric)**, but for child bodies
## Recommended Actions:
1. Fix moon positions in solar_system.txt to be correct absolute coordinates
2. Fix binary star system to have one star orbit the other (or implement barycenter)
3. Document whether positions should be absolute or relative to parent
4. Add validation to check if child body positions make sense relative to parent
### High Priority:
1. **Update config files to new format** - All config files need to be updated to 12-field format
- ⚠ `configs/solar_system.txt` - Still uses old 10-field format
- ⚠ `configs/example_binary_star.txt` - Still uses old 10-field format
- ✅ `configs/test_simple.txt` - Already updated
2. **Fix moon positions** - Moon and Jupiter's moons use incorrect absolute coordinates
- Moon should be at ~(1.496e11 + 3.844e8, 0, 0) not (1.500e11, 0, 0)
- Jupiter's moons should be relative to Jupiter's position
### Medium Priority:
3. **Add config file validation** - Warn when child bodies seem incorrectly positioned
4. **Document coordinate system** - Clarify that positions are absolute (heliocentric)
### Low Priority:
5. **Consider relative coordinate option** - Allow specifying child positions relative to parent
6. **Add 3D orbit support** - Currently all orbits are in XY plane
---
## Session Notes (2026-01-03):
### Changes Made:
1. **Refactored main.cpp** - Broke 215-line main() into focused functions:
- `parse_command_line_args()` - Parse command line arguments into ProgramArgs struct
- `print_startup_info()` - Print simulation configuration
- `run_headless_simulation()` - Terminal-based simulation with initial/final state capture
- `run_gui_simulation()` - 3D visualization mode
- Main function now ~25 lines of setup and dispatch
2. **Added eccentric orbit support**:
- Extended config format from 10 to 12 fields (added eccentricity, semi_major_axis)
- Implemented vis-viva equation: `v = sqrt(G*M*(2/r - 1/a))`
- Circular orbits: e=0, a=orbital_radius
- Elliptical orbits: e>0, a=semi_major_axis
- Renamed `calculate_initial_velocities_with_params()``calculate_velocities()`
3. **Updated test_simple.txt**:
- Added Comet with highly eccentric orbit (e=0.7, a=2.5 AU)
- Perihelion: 0.75 AU, Aphelion: 4.25 AU
- Successfully tested - comet swings from 0.75 AU to ~3.8 AU
4. **Documentation updates**:
- Updated README.md with new 12-field format and examples
- Updated this file with fixed issues and TODOs
- Added eccentric orbit feature to feature list
### Known Issues:
- **Old config files** still use 10-field format and need updating
- **Moon positions** in solar_system.txt are physically incorrect
- **No validation** for unrealistic body positions

Loading…
Cancel
Save