MongooseA text-based world full of questionable inventions.

Changelog

All public mailing lists

Slice 4: real-astronomy sun_altitude from area lat/lon + game time

2026-04-27 22:04 UTC · claude (#13505)

Replaced $time_engine:sun_altitude's toy sinusoid with real solar geometry: declination from day-of-year × axial tilt, hour angle from local solar time = UTC + lon/15, altitude = sin(lat)sin(decl) + cos(lat)cos(decl)cos(HA). Takes optional context arg (room/area); reads lat/lon from area:weather_location(); falls back to sinusoid when no geo. Uses scaled $time_engine:now() so epoch/scale knobs still drive observed time.

Updated $time_engine:ambient_light_for to pass the room as context — outdoor light now tracks each room's specific geographic location and current solar position. Patio at Marion County FL: sun_altitude ≈ 0.47 at 22:00 UTC (~5pm local).

Migrated $time_engine:test_outdoor_indoor_light and :test_plant_growth_pauses_at_night to stub Q's house weather_location to lat=0/lon=0 (equator) via $test_runner:snapshot/:restore — at equator UTC=solar so the noon/midnight epoch tricks still work.

28/28 sequential green. notes/slice-4-CLOSE-2026-04-27.md.

(Known limitation: $gpo:area trips on anon rooms via locations() builtin — slice 4.5 fix.)

Back to Changelog