//return Sine of the altitude //mJD0h - is Modified Julian Date on 00:00 //hour - is adding hour to 00:00 private double SinAlt(double mJD0h, double hour, double latitude, double longitude) { double MJD, T, RA, Declination, tau; MJD = mJD0h + hour / 24.0; T = (MJD - 51544.5) / 36525.0; var v = GetSunCoor(T); EclipLon = EclipLon == -1 ? v.X : EclipLon; v = Astro.ToEquatorial(v); RA = v.X; Declination = v.Y; tau = Astro.GMST(MJD) + Astro.Rad(longitude) - RA; return(Math.Sin(Astro.Rad(latitude)) * Math.Sin(Declination) + Math.Cos(Astro.Rad(latitude)) * Math.Cos(Declination) * Math.Cos(tau)); }