public override Similarity SimilarityWith(IPlanetEvent another) { if (!IsSimilar(another)) { return(null); } return(new Similarity(PlanetEventFlag.LunarEclipse, PlanetId.SE_MOON)); }
public override Similarity SimilarityWith(IPlanetEvent another) { if (!IsSimilar(another)) { return(null); } return(new Similarity(PlanetEventFlag.LunarOccultation, Who)); }
public override Similarity SimilarityWith(IPlanetEvent another) { if (!IsSimilar(another)) { return(null); } return(new Similarity(Pair)); }
public virtual Similarity SimilarityWith(IPlanetEvent another) { if (!IsSimilar(another)) { return(null); } return(new Similarity(PlanetEventFlag.EclipseOccultationCategory, Who)); }
public override bool IsSimilar(IPlanetEvent another) { if (!base.IsSimilar(another) || !(another is ExactAspectEvent)) { return(false); } ExactAspectEvent anotherAspect = another as ExactAspectEvent; return(anotherAspect.Pair == this.Pair); }
public override Similarity SimilarityWith(IPlanetEvent another) { if (!IsSimilar(another)) { return(null); } else { return(new Similarity(this.Category, Who)); } }
public int CompareTo(IPlanetEvent other) { if (this.When == other.When) { return(0); } else if (this.When > other.When) { return(1); } else { return(-1); } }
public override bool IsSimilar(IPlanetEvent another) { if (!base.IsSimilar(another)) { return(false); } SignEntrance signChange = another as SignEntrance; if (signChange == null) { return(false); } return(this.To == signChange.To && this.IsRetrograde == signChange.IsRetrograde); }
public override bool IsSimilar(IPlanetEvent another) { if (!base.IsSimilar(another) || !(another is DeclinationEvent)) { return(false); } DeclinationEvent anotherDecl = another as DeclinationEvent; return(anotherDecl.Kind == this.Kind); // return true; //else if (anotherDecl.Kind == PlanetEventFlag.OnEquator || this.Kind == PlanetEventFlag.OnEquator) // return false; //else // return true; }
private void markPlanetEvent() { List <IPlanetEvent> events = Ephemeris.Geocentric[intradaySince, intradayUntil]; IPlanetEvent lunarAspect = null; double x; foreach (PlanetId id in Ephemeris.Geocentric.Luminaries) { if (id == PlanetId.SE_MOON || id > PlanetId.SE_FICT_OFFSET) { continue; } lunarAspect = Ephemeris.Geocentric.ExactAspectEventOf(PlanetId.SE_MOON, id, intradaySince); if (lunarAspect != null && lunarAspect.When >= intradaySince && lunarAspect.When <= intradayUntil) { events.Add(lunarAspect); } } events.Sort(); foreach (IPlanetEvent evt in events) { x = evt.When.LocalDateTime.ToOADate(); ArrowObj newArrow = new ArrowObj(x, 0, x, geoIntraDay.GraphPane.YAxis.Scale.Max / 10); newArrow.Line.Style = System.Drawing.Drawing2D.DashStyle.Dot; newArrow.IsArrowHead = false; geoIntraDay.GraphPane.GraphObjList.Add(newArrow); string description = evt.ShortDescription; TextObj text = new TextObj(description, x, 0); text.FontSpec.Size = 6; text.FontSpec.Angle = 45; text.FontSpec.Family = "AstroSymbols"; text.FontSpec.Border.IsVisible = false; text.FontSpec.Fill.IsVisible = false; text.Location.AlignH = AlignH.Right; text.Location.AlignV = AlignV.Center; geoIntraDay.GraphPane.GraphObjList.Add(text); } }
private string zedLongTerm_PointValueEvent(ZedGraphControl sender, GraphPane pane, CurveItem curve, int iPt) { LineItem line = curve as LineItem; if (line == null) { return(""); } string name = curve.Label.Text; PlanetId id = Planet.GlyphToPlanetId[name[0]]; if (line.Symbol.Type == SymbolType.None) { PointPair pt = curve.Points[iPt]; DateTimeOffset time = new DateTimeOffset(DateTime.FromOADate(pt.X), TimeSpan.Zero); return(string.Format("{0}: {1} @ {2:F1}", time.ToString("MM-dd"), name, pt.Y)); } else { PlanetEventFlag category = (from kvp in defaultEventSymbolType where kvp.Value == line.Symbol.Type select kvp.Key).FirstOrDefault(); if (category != PlanetEventFlag.AspectCategory) { IPlanetEvent evt = TheAspectarian[category][id][iPt]; return(evt.ToString()); } else { PointPair pt = curve.Points[iPt]; DateTimeOffset time = new DateTimeOffset(DateTime.FromOADate(pt.X), TimeSpan.Zero); IPlanetEvent closestEvt = (from one in TheAspectarian[category][id] orderby Math.Abs((one.When - time).TotalDays) select one ).First(); return(closestEvt.ToString()); } } }
public static Similarity Between(IPlanetEvent event1, IPlanetEvent event2) { if (event1.Category == event2.Category && event1.Who == event2.Who) { if (event1.Kind == event2.Kind) { return(new Similarity(event1.Kind, event1.Who)); } else { return(new Similarity(event1.Category, event1.Who)); } } else { return(null); } }
public virtual Similarity SimilarityWith(IPlanetEvent another) { return(Similarity.Between(this, another)); }
public static int CompareByPlanetId(IPlanetEvent event1, IPlanetEvent event2) { return(event1.Who - event2.Who); }
public override bool IsSimilar(IPlanetEvent another) { return(another is LunarOccultation && this.Who == another.Who); }
public override bool IsSimilar(IPlanetEvent another) { return(another is LunarEclipse); }
public virtual bool IsSimilar(IPlanetEvent another) { return(this.Who == another.Who && this.Category == another.Category); }