# Climate constants for district temperature derivation (T-1024, D-239 §2). # # Source-canonical — loaded by the Rust simulation at runtime. # These values mirror the tuned constants from tooling/planet-gen/planet_simulation.py. # Changing these constants does NOT require a DB migration (runtime file, not DB). # To tune: edit here, rerun the server, inspect Atlas temperature maps. # # Two tables are required: # [greenhouse_offset_c] — mean-annual base temperature offset by atmosphere class. # [diurnal_amplitude_c] — day/night swing AMPLITUDE by atmosphere class. # # Temperature derivation formula (D-239 §2): # T_base = T_stellar_equilibrium + greenhouse_offset_c[atmosphere] # T_mean = T_base + latitude_term + elevation_lapse_term # T_diurnal_amplitude = diurnal_amplitude_c[atmosphere] # # No atmosphere → temperature_c = None (airless body; D-227). [greenhouse_offset_c] # Greenhouse warming contribution per atmosphere class (°C above bare rock). # "none" is not present — airless bodies skip the climate branch entirely (D-227). # Values from planet_simulation.py STAR_LUMINOSITY + greenhouse table. thin = 8 standard = 33 toxic = 33 # treated as standard greenhouse for thermal purposes breathable = 33 # synonym for standard dense = 80 [diurnal_amplitude_c] # Day/night swing amplitude (°C). The actual swing is ±amplitude around the # mean temperature; the morning minimum is T_mean - amplitude, noon maximum is # T_mean + amplitude. Thick/dense atmosphere = small swing (heat redistribution); # thin/no atmosphere = large swing. # # "none" is excluded — airless bodies have no climate temperature (D-227). # Values are plausible physics; tune without recompile by editing this file. thin = 50 # ~50°C day/night swing: large, like Mars standard = 15 # ~15°C: Earth-like moderate swing toxic = 20 # intermediate: thick but maybe less redistribution breathable = 15 # synonym for standard dense = 3 # ~3°C: Venus-like near-uniform temperature # --------------------------------------------------------------------------- # Stellar luminosity lookup (relative to Sol = 1.0). # Midpoint per spectral type, matching planet_simulation.py STAR_LUMINOSITY. # Used to derive distance_au at runtime from orbital_period_days via Kepler's 3rd law. # # These values are also used to compute T_stellar_equilibrium: # T_eq_K = 278.5 * (luminosity ^ 0.25) / sqrt(distance_au) # --------------------------------------------------------------------------- [star_luminosity] O = 100000.0 B = 1000.0 A = 10.0 F = 2.5 G = 1.0 K = 0.4 M = 0.04