Repository navigation
Conversation
Replace the mean synodic month (counted from the 2000-01-06 new moon) with the Moon's true elongation from the Sun: the mean elongation D plus the six largest periodic terms in D, M and M' (Meeus, Astronomical Algorithms, ch. 48, eq. 48.4). Adds no_std sin for arbitrary angles, floor and degree normalisation; still no dependencies. Against 2026's published new and full moons, including the four eclipses, the error is -32 to +16 minutes, where the mean model could be off by up to ~14 hours. Phase windows, multipliers and the JSON contract are unchanged. Tests now check real instants (eclipses, a year's count of 12 new and 13 full moons, smooth minute-by-minute motion); the Android tests use the same instants instead of inverting the old formula. Refs #10 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #10. This makes the next release 0.1.0: what the brain reports at a given moment changes.
What
cycle_positionnow uses the Moon's true elongation from the Sun instead of counting mean synodic months from the 2000-01-06 new moon. That is Meeus, Astronomical Algorithms (2nd ed.), eq. 48.4: the mean elongation D plus the six largest periodic terms in D, M (Sun's mean anomaly) and M′ (Moon's mean anomaly).no_stdwith no dependencies. Addssinfor any angle (by range reduction onto the existing cosine series),floor, and degree normalisation.Accuracy
Measured against 2026's published instants (
cargo test true_moon -- --nocapture):The mean-month model could be off by up to ~14 hours.
Tests
The brain has 17 tests:
sinagainststdfor angles up to ±195,000°, plusfloorand normalisation;The Android unit tests (4) now use the same real instants instead of inverting the old formula. They run the rebuilt WASM through Chicory.
Not done
CHANGELOG.mdalone to avoid conflicting with one another.— Claude-Opus-5.5
🤖 Generated with Claude Code