diff --git a/docs/TODO b/docs/TODO index bcf058b..df9e603 100644 --- a/docs/TODO +++ b/docs/TODO @@ -8,6 +8,7 @@ If you see modifications to this file in git status, IGNORE them and do not comm === next steps === - UI fixes - SOI boundary testing + - draw SOI boundry in graphical sim - interplanetary transfers @@ -27,6 +28,8 @@ If you see modifications to this file in git status, IGNORE them and do not comm - interplanetary/SOI changing transfers - remove bodies on non closed orbits after they are a certain distance from the root body, or bary-center + - should try to use the same code path for bodies and craft on 'update' functions + as much as possible === Simulation Config Files === - a format with nested children would be nice @@ -37,3 +40,4 @@ If you see modifications to this file in git status, IGNORE them and do not comm === UI === - need to fix UI text overlapping - remove '?' unavailble characters + - reset sim / load new config diff --git a/src/simulation.cpp b/src/simulation.cpp index c0597d2..a734ea4 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -68,6 +68,7 @@ int add_spacecraft(SimulationState* sim, Spacecraft* craft) { return new_idx; } +// FIXME: dead code // Add a body to the simulation at runtime int add_body_to_simulation(SimulationState* sim, CelestialBody* body) { if (sim->body_count >= sim->max_bodies) { @@ -146,6 +147,8 @@ int find_dominant_body(SimulationState* sim, int body_index) { return new_parent; } + +// FIXME: dead code: don't remove before updating calculate_soi_radius // Update sphere of influence radius using Hill sphere approximation // r_soi = a * (m/M)^(2/5) where a = semi-major axis, m = body mass, M = parent mass void update_soi(CelestialBody* body, CelestialBody* parent, double semi_major_axis) { @@ -168,6 +171,8 @@ void update_simulation(SimulationState* sim) { sim->time += sim->dt; } +// FIXME: fails to check for root body +// need set: body->soi_radius = 1e15; // 1000 AU in meters // Calculate SOI radius for a single body // r_soi = a * (m/M)^(2/5) where a = semi-major axis, m = body mass, M = parent mass // Returns SOI radius in meters