feat(db): body_radius_km scatter + gas giant/moon scale classes

Deterministic ±scatter on body radii seeded by body_id hash — no two
bodies share the same radius. Gas giants 40k-60k km, moons 200-2600 km,
rocky planets ±15% from class base. Oort/asteroid skip radius (NULL).
Sol system gets real planetary radii. body_radius_km exported to
star_map_data.json for client orbital diagram sizing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 20:11:31 +02:00
co-authored by Claude Opus 4.6
parent e8b4dc74b5
commit 29f9945291
5 changed files with 8902 additions and 5636 deletions
+2 -1
View File
@@ -197,7 +197,7 @@ def generate() -> dict:
cur.execute("""
SELECT system_id, body_id, parent_body_id, orbit_index, body_type,
proper_name, atmosphere, inhabited, population,
terrain_reference, mass_class
terrain_reference, mass_class, body_radius_km
FROM bodies
ORDER BY system_id, orbit_index
""")
@@ -215,6 +215,7 @@ def generate() -> dict:
"population": int(row["population"] or 0),
"terrain_reference": row["terrain_reference"],
"mass_class": row["mass_class"],
"body_radius_km": float(row["body_radius_km"] or 0),
})
# Per-system station list for atlas orbital diagram (D-191 §6)