Exemplo n.º 1
0
        public void GetInfo(CelestialObjectInfo <Meteor> info)
        {
            Meteor     m = info.Body;
            SkyContext c = info.Context;

            string     constellation = Constellations.FindConstellation(c.Get(Equatorial, m), c.JulianDay);
            int        year          = c.GetDate(c.JulianDay).Year;
            var        offset        = c.GeoLocation.UtcOffset;
            var        jd0           = Date.DeltaT(c.JulianDay) / 86400.0 + Date.JulianDay0(year) - offset / 24;
            var        begin         = new Date(jd0 + m.Begin, offset);
            var        max           = new Date(jd0 + m.Max, offset);
            var        end           = new Date(jd0 + m.End, offset);
            SkyContext cMax          = new SkyContext(jd0 + m.Max, c.GeoLocation, c.PreferFastCalculation);
            var        phase         = LunarPhaseAtMax(cMax, m);

            info
            .SetTitle(string.Join(", ", info.Body.Names))
            .SetSubtitle(Text.Get("Meteor.Type"))
            .AddRow("Constellation", constellation)

            .AddHeader(Text.Get("Meteor.Equatorial"))
            .AddRow("Equatorial.Alpha")
            .AddRow("Equatorial.Delta")

            .AddHeader(Text.Get("Meteor.Horizontal"))
            .AddRow("Horizontal.Azimuth")
            .AddRow("Horizontal.Altitude")

            .AddHeader(Text.Get("Meteor.RTS"))
            .AddRow("RTS.Rise")
            .AddRow("RTS.Transit")
            .AddRow("RTS.Set")
            .AddRow("RTS.Duration")

            .AddHeader(Text.Get("Meteor.Activity"))
            .AddRow("Activity.Begin", begin, Formatters.Date)
            .AddRow("Activity.Max", max, Formatters.Date)
            .AddRow("Activity.End", end, Formatters.Date)
            .AddRow("Activity.LunarPhaseAtMax", phase, Formatters.Phase)

            .AddHeader(Text.Get("Meteor.Data"))
            .AddRow("Data.ZHR", m.ZHR)
            .AddRow("Data.ActivityClass", m.ActivityClass)
            .AddRow("Data.DriftRA", m.Drift.Alpha, Formatters.Angle)
            .AddRow("Data.DriftDec", m.Drift.Delta, Formatters.Angle);
        }
Exemplo n.º 2
0
        public void GetInfo(CelestialObjectInfo <Nova> info)
        {
            Nova       n             = info.Body;
            SkyContext c             = info.Context;
            string     constellation = Constellations.FindConstellation(c.Get(Equatorial, n), c.JulianDay);
            int        year          = c.GetDate(c.JulianDay).Year;
            var        offset        = c.GeoLocation.UtcOffset;
            var        jd0           = Date.DeltaT(c.JulianDay) / 86400.0 + Date.JulianDay0(year) - offset / 24;

            info
            .SetTitle(string.Join(", ", info.Body.Names))
            .SetSubtitle(Text.Get("Nova.Type"))
            .AddRow("Constellation", constellation)

            .AddHeader(Text.Get("Nova.Equatorial"))
            .AddRow("Equatorial.Alpha")
            .AddRow("Equatorial.Delta")

            .AddHeader(Text.Get("Nova.Equatorial0"))
            .AddRow("Equatorial0.Alpha", n.Equatorial0.Alpha, Formatters.RA)
            .AddRow("Equatorial0.Delta", n.Equatorial0.Delta, Formatters.Dec)

            .AddHeader(Text.Get("Nova.Horizontal"))
            .AddRow("Horizontal.Azimuth")
            .AddRow("Horizontal.Altitude")

            .AddHeader(Text.Get("Nova.Properties"))
            .AddRow("Magnitude")
            .AddRow("PeakDate", new Date(n.JulianDayPeak), Formatters.Date)
            .AddRow("MaxMagnitude", n.MaxMagnitude, Formatters.Magnitude)
            .AddRow("MinMagnitude", n.MinMagnitude, Formatters.Magnitude)
            .AddRow("Type", n.NovaType + NovaTypeDescription(n))

            .AddHeader(Text.Get("Nova.RTS"))
            .AddRow("RTS.Rise")
            .AddRow("RTS.Transit")
            .AddRow("RTS.Set")
            .AddRow("RTS.Duration");
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets nearest phase date
 /// </summary>
 private Date NearestPhase(SkyContext c, MoonPhase p)
 {
     return(c.GetDate(LunarEphem.NearestPhase(c.JulianDay, p)));
 }
Exemplo n.º 4
0
 private Date Seasons(SkyContext c, Season s)
 {
     return(c.GetDate(SolarEphem.Season(c.JulianDay, s)));
 }