Esempio n. 1
0
        public static void SetDetails(string location, Position pos, UTCDate udt)
        {
            SetValue(registry[Id.DETAIL_LOCATION], location);
            SetValue(registry[Id.DETAIL_POSITION], Formatter.FormatPosition(pos));
            SetValue(registry[Id.DETAIL_TIMEZONE], Formatter.FormatTimezone(udt.Timezone,
                                                                            udt.Timezone + udt.GetDST()));
            SetValue(registry[Id.DETAIL_DATE], udt.PrintDate());
            SetValue(registry[Id.DETAIL_TIME], Formatter.FormatTimeLong(udt, true));

            SolarPosition sp = Orbit.CalcSolarPosition(pos, udt);
            SetValue(registry[Id.DETAIL_ELEVATION], Formatter.FormatAngle(sp.Elevation));
            SetValue(registry[Id.DETAIL_AZIMUTH], Formatter.FormatAngle(sp.Azimuth));

            SolarTimes st_ss = Orbit.CalcSolarTimes(pos, udt);
            SetValue(registry[Id.DETAIL_SUNRISE], Formatter.FormatMaybeTimeLong(st_ss.Sunrise, false));
            SetValue(registry[Id.DETAIL_SOLARNOON], Formatter.FormatTimeLong(st_ss.Noon, false));
            SetValue(registry[Id.DETAIL_SUNSET], Formatter.FormatMaybeTimeLong(st_ss.Sunset, false));
            SetValue(registry[Id.DETAIL_SOLARDAYLENGTH], Formatter.FormatDayLength(st_ss, sp));

            SolarTimes st_dd = PointFinder.FindDawnDusk(pos, udt);
            SetValue(registry[Id.DETAIL_DAWN], Formatter.FormatMaybeTimeLong(st_dd.Sunrise, false));
            SetValue(registry[Id.DETAIL_DUSK], Formatter.FormatMaybeTimeLong(st_dd.Sunset, false));
            SetValue(registry[Id.DETAIL_DAYLENGTH], Formatter.FormatDayLength(st_dd, sp));
        }
Esempio n. 2
0
 public static string FormatCaptionDate(UTCDate udt)
 {
     return string.Format("date: {0}", udt.PrintDate());
 }