GeraldR63 / AstroNavi

Simple methods to offer valid position by using Watch, Sextant and Almanac.
GNU General Public License v2.0
1 stars 0 forks source link

Calculation of the declination of SUN is only nearby #4

Closed GeraldR63 closed 1 year ago

GeraldR63 commented 1 year ago

I use

===============Code snippet begin double calc=(360. / 365.) ((Seconds/(24.60.60.))-81.);
double da=23.43640
Math.sin(Math.toRadians(calc));
===============Code snippet end

to get the declination. Since earth is a sphere and the planet travels on an ellipse around the sun and there is also an axis shift of nearby 23.5 degree this calculation is just a good estimation. Not good enough for navigators.

I worked on SPA algorithm from Solar Radiation Research Laboratory to get better results and also on the PSA+ Algorithm from Energy Environment and Water Research Center but they use "Declination", "Azimuth" and so on in a different way.

The major problem here is that I want easy to understand solutions. The "23.43640*sin();" solution is a simple to understand first step. All of the published algorithms base upon a lot of constants not really described. I want to have a much more generic solution.

To use "correction multiplier" do not work for this. This works, more or less, good for the Stars but not for sun.

GeraldR63 commented 1 year ago

Fixed. Poor persons algorithm replaced by a much better one.