New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solstice and Equinox #144
Comments
Thank you for the great suggestion. After a bit of research, it would be best to use approximation algorithms (Meeus) to obtain equinox and solstice values. This would keep overhead small, but still give a comfortable accuracy level for most uses intended for the library. Approximation algorithms will eliminate the need to run iterations which would increase algorithm benchmarks by 3 times. Approximation's largest error margin between 1950-2050 is about 51 seconds. This will be approached using "Last/Next Solstice/Equinox" properties from the specified Once benchmarks are determined an eager loading approach will be specified. |
A slight change from the plan above: Instead of "Last/Next", the event values will be "Current" based on the provided year. Example Usage:
This will be available with the next release. |
This has been added to v2.7.1.1 (Released on 7/12/2020) Coordinate c = new Coordinate(45,112, new DateTime(2020,3,6));
Console.WriteLine(c.CelestialInfo.Solstices.Summer);//20-Jun-2020 21:44 (UTC)
Console.WriteLine(c.CelestialInfo.Equinoxes.Spring);//20-Mar-2020 03:51 (UTC) Eager loading extensions were also added last minute. Performance hits were negligible, but we wanted the option to turn the new feature off as lower powered processors may need to maximize performance where able. We didn't want to force users to take the hit. Values are eager loaded by default however. To turn off calculations application wide. //Set this in the application startup logic
GlobalSettings.Default_EagerLoad.Extensions.Solstice_Equinox = false; Note: |
I would be great if CoordinateSharp could calculate Solstice and Equinox
The text was updated successfully, but these errors were encountered: