Esempio n. 1
0
        public void updateSunriseTimes(GPGregorianTime vct, GPLocationProvider earth)
        {
            arunodaya_deg      = sunrise_deg - 24.0;
            longitude_arun_deg = eclipticalLongitude - 24.0 / 365.25;
            arunodaya          = new GPGregorianTime(vct);
            rise = new GPGregorianTime(vct);

            if (sunPosMethod == SUNPOSMETHOD_CALCULATOR)
            {
                // arunodaya is 96 min before sunrise
                //  sunrise_deg is from range 0-360 so 96min=24deg
                arunodaya.setDayHours(SetDegTime(arunodaya_deg + earth.getTimeZoneOffsetHours() * 15.0));
                rise.setDayHours(SetDegTime(sunrise_deg + earth.getTimeZoneOffsetHours() * 15.0));
            }
            else
            {
                arunodaya.setJulianGreenwichTime(GPAstroEngine.ConvertDynamicToUniversal(julianDayRise - 96 / 1440.0));
                rise.setJulianGreenwichTime(GPAstroEngine.ConvertDynamicToUniversal(julianDayRise));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// This can be used only after calculating sunrise and sunset time
 /// using functions calculateRise and calculateSet
 /// </summary>
 /// <param name="vct"></param>
 /// <param name="earth"></param>
 private void updateNoonTimes(GPGregorianTime vct, GPLocationProvider earth)
 {
     noon = new GPGregorianTime(vct);
     if (sunPosMethod == SUNPOSMETHOD_CALCULATOR)
     {
         noon.setDayHours(SetDegTime((sunset_deg + sunrise_deg) / 2 + earth.getTimeZoneOffsetHours() * 15.0));
     }
     else
     {
         noon.setJulianGreenwichTime(GPAstroEngine.ConvertDynamicToUniversal(julianDayNoon));
     }
 }