Implement apparent sidereal time (equation of the equinoxes)#12
Open
MattBlack85 wants to merge 3 commits intomainfrom
Open
Implement apparent sidereal time (equation of the equinoxes)#12MattBlack85 wants to merge 3 commits intomainfrom
MattBlack85 wants to merge 3 commits intomainfrom
Conversation
Add get_apparent_sidereal_time_from_date() to sidereal_time.rs. Apparent sidereal time = mean sidereal time + Δψ cos ε, where Δψ is nutation in longitude and ε is the true obliquity of the ecliptic (Meeus, Astronomical Algorithms 2nd ed., Ch. 12, p. 87-88). Also adds mean_obliquity() helper (Meeus eq. 22.2), a test against Example 12.a (1987 April 10), and a Criterion benchmark.
Replace the full 63-term IAU 1980 nutation series (126 trig calls) with the 4-term approximation from Meeus p. 88 (4 sin + 1 cos). Accurate to ~0.5" (~0.03s of time), which is sufficient for sidereal time purposes. Drops the nutation module dependency from sidereal_time.rs entirely.
…accuracy Replace the 4-term approximation with the full 63-term IAU 1980 nutation series, keeping accuracy while optimizing with three techniques: - Skip delta_eps/cos accumulation entirely (only Δψ is needed for the equation of the equinoxes) — halves trigonometric calls vs get_nutation - FMA (mul_add) chains for all argument and amplitude arithmetic - AVX2 SIMD (delta_psi_avx2_fma): batches arg computation and amplitude accumulation 4 rows at a time using _mm256_fmadd_pd; sin is still evaluated per-lane (std has no vectorised trig) Also tightens get_nutation to use sin_cos() so both components share a single trig call per row.
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.
Add get_apparent_sidereal_time_from_date() to sidereal_time.rs.
Apparent sidereal time = mean sidereal time + Δψ cos ε, where Δψ is
nutation in longitude and ε is the true obliquity of the ecliptic
(Meeus, Astronomical Algorithms 2nd ed., Ch. 12, p. 87-88).
Also adds mean_obliquity() helper (Meeus eq. 22.2), a test against
Example 12.a (1987 April 10), and a Criterion benchmark.