This patch uses a revised version of the algorithm from Astronomical algorithms - Jean Meeus to calculate the correct dates of Equinox and Solstice in Calculator.
BUG: 387929
Details
- Reviewers
mutlaqja - Commits
- R321:de594e589673: Fixed Equinox and Solstice dates in Calculator
Diff Detail
- Repository
- R321 KStars
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Nice bug fix! I haven't tested the changes yet, just please check the commit and update accordignly.
kstars/tools/modcalcvizequinox.h | ||
---|---|---|
51 | What's n? use a better variable name. Also what's the range for n? for year, we prefer to use uint32_t, int32_t...etc, not just int, short. Add a comment block on top to explain what the function does ..etc in the standard doxygen format we use. |
Added comment block and removed choice variable with a single function call to compute all Solstices and Equinoxes.
Great job! I doubled checked with other sources and we are very close. However, it appears all the times we have are almost exactly 1 minute later. Not sure what is causing this. Perhaps as a "hack" solution, we subtract 60 seconds from the final results?
The offset thing wouldn't have worked. I looked through some corrections in chapter 10 of the book and this makes it the closest to the online calculators. If we reduce the time by huge numbers(say 800 years), even the online versions produce different results.