Beispiel #1
0
        //public static List<Relation> RelationsDuring(PlanetId superior, PlanetId inferior, MatchRules during)
        //{
        //    reorder(ref superior, ref inferior);

        //    List<Relation> prices = new List<Relation>();
        //    Relation newRelation = null;
        //    Double around = during.StartJulianUtc;

        //    do
        //    {
        //        newRelation = FirstRelationSince(superior, inferior, around);

        //        if (newRelation == null || newRelation.Moment > during.Until || newRelation.Moment < during.Since)
        //            break;

        //        prices.Add(newRelation);
        //        around = Utilities.ToJulianDay(newRelation.Moment);

        //    } while (true);

        //    return prices;
        //}

        //public static List<Relation> AllRelationsDuring(MatchRules during)
        //{
        //    List<Relation> allRelations = new List<Relation>();

        //    List<PlanetId> planets = Planet.All.Keys.ToList();

        //    for (int i = 9; i >= 1; i--)
        //    {
        //        for (int j = i - 1; j >= 0; j--)
        //        {
        //            List<Relation> relations = Relation.RelationsDuring(planets[i], planets[j], during);

        //            allRelations.AddRange(relations);
        //        }
        //    }

        //    return allRelations;
        //}

        public static string BriefOf(List <Relation> relations)
        {
            StringBuilder sb = new StringBuilder();

            foreach (Relation rel in relations)
            {
                sb.AppendFormat("{0}{1}{2}, ", Planet.SymbolOf(rel.Superior), rel.Aspect.Symbol, Planet.SymbolOf(rel.Inferior));
            }

            return(sb.ToString());
        }
Beispiel #2
0
        public string BriefOf(ConcernedEvent focused)
        {
            switch (focused)
            {
            case ConcernedEvent.None:
                return(String.Format("{0}: {1}, H={2:F3}, D={3:F3}",
                                     Planet.SymbolOf(Current.Owner), Current.Longitude.AstrologyFormat(), Current.Latitude, Current.Distance));

            case ConcernedEvent.Rectascension:
                return(LongitudeStatus == RectascensionMode.None ? "" :
                       String.Format("{0} {1}", RectascensionSymbols[LongitudeStatus], DaysToRectascensionMode));

            case ConcernedEvent.Declination:
                return(LatitudeStatus == DeclinationMode.None ? "":
                       String.Format("{0} {1}", DeclinationSymbols[LatitudeStatus], DaysToDeclinationMode));

            case ConcernedEvent.Distance:
                return(DistanceStatus == DistanceMode.None ? "" :
                       String.Format("{0}{1}", DistanceSymbols[DistanceStatus], DaysToDistanceMode));

            case ConcernedEvent.Relations:
                if (RelationWithOthers.Count == 0)
                {
                    return("");
                }

                StringBuilder sb = new StringBuilder();
                foreach (Relation rel in RelationWithOthers)
                {
                    if (NeglectMoon && rel.Inferior == PlanetId.SE_MOON || rel.Superior == PlanetId.SE_MOON)
                    {
                        continue;
                    }
                    sb.AppendFormat("{0}{1} ",
                                    rel.Aspect.Symbol, Planet.SymbolOf(rel.Inferior == Current.Owner ? rel.Superior : rel.Inferior));
                }

                return(sb.ToString());

            case ConcernedEvent.All:
            default:
                return(Brief);
            }
        }
Beispiel #3
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0}@{1}: Long={2}", Planet.SymbolOf(Current.Owner), Date.DayOfWeek, Current.Longitude.AstrologyFormat());

            if (LongitudeStatus != RectascensionMode.None)
            {
                sb.AppendFormat(", {0}({1}days)", LongitudeStatus, DaysToRectascensionMode);
            }

            if (LatitudeStatus != DeclinationMode.None)
            {
                sb.AppendFormat("\r\nLat={0}, {1}({2}days)", Current.Latitude.ToString("F4"), LatitudeStatus, DaysToDeclinationMode);
            }
            else
            {
                sb.AppendFormat("\r\nLat={0}", Current.Latitude.ToString("F4"));
            }

            if (DistanceStatus != DistanceMode.None)
            {
                sb.AppendFormat("\r\nDist={0}, {1}({2}days)", Current.Distance.ToString("F4"), DistanceStatus, DaysToDistanceMode);
            }
            else
            {
                sb.AppendFormat("\r\nDist={0}", Current.Distance.ToString("F4"));
            }

            foreach (Relation rel in RelationWithOthers)
            {
                if (NeglectMoon && rel.Inferior == PlanetId.SE_MOON || rel.Superior == PlanetId.SE_MOON)
                {
                    continue;
                }

                sb.AppendFormat("\r\n{0}{1}{2}, orb={3}",
                                Planet.SymbolOf(rel.Superior), rel.Aspect.Symbol, Planet.SymbolOf(rel.Inferior), rel.Orb.ToString("F3"));
            }

            return(sb.ToString());
        }
Beispiel #4
0
        public string StatusOf(ConcernedEvent focused)
        {
            StringBuilder sb = new StringBuilder();

            switch (focused)
            {
            case ConcernedEvent.None:
                return(String.Format("{0} on {1}: Long={2}, Lat={3:F4}, Dist={4:F4}",
                                     Planet.SymbolOf(Current.Owner), Date.DayOfWeek, Current.Longitude.AstrologyFormat(), Current.Latitude, Current.Distance));

            case ConcernedEvent.Rectascension:
                return(String.Format("{0} on {1}: Long={2}, Speed={3:F2}, Status={4} {5}",
                                     Planet.SymbolOf(Current.Owner), Date.DayOfWeek, Current.Longitude.AstrologyFormat(), Current.LongitudeVelocity,
                                     LongitudeStatus, DaysToRectascensionMode));

            case ConcernedEvent.Declination:
                return(String.Format("{0} on {1}: Lat={2:F3}, Speed={3:F2}, Status={4} {5}",
                                     Planet.SymbolOf(Current.Owner), Date.DayOfWeek, Current.Latitude, Current.LatitudeVelocity,
                                     LatitudeStatus, DaysToDeclinationMode));

            case ConcernedEvent.Distance:
                return(String.Format("{0} on {1}: Dist={2:F3}, Speed={3:F2}, Status={4} {5}",
                                     Planet.SymbolOf(Current.Owner), Date.DayOfWeek, Current.Distance, Current.DistanceVelocity,
                                     DistanceStatus, DaysToDistanceMode));

            case ConcernedEvent.Relations:
                foreach (Relation rel in RelationWithOthers)
                {
                    if (NeglectMoon && rel.Inferior == PlanetId.SE_MOON || rel.Superior == PlanetId.SE_MOON)
                    {
                        continue;
                    }
                    sb.AppendFormat("{0}º{1}({2}) ",
                                    rel.Aspect.Degrees, rel.Inferior == Current.Owner ? rel.Superior : rel.Inferior, rel.Orb.ToString("F3"));
                }
                return(sb.ToString());

            case ConcernedEvent.All:
            default:
                sb.AppendFormat("{0}@{1}:", Planet.SymbolOf(Current.Owner), Date.DayOfWeek);
                if (LongitudeStatus != RectascensionMode.None)
                {
                    sb.AppendFormat(" {0}{1}, Long={2}({3:F3}//day)",
                                    LongitudeStatus, DaysToRectascensionMode, Current.Longitude.AstrologyFormat(), Current.LongitudeVelocity);
                }
                if (LatitudeStatus != DeclinationMode.None)
                {
                    sb.AppendFormat(" {0}{1}, Lat={2:F3}({3:F3}//day)",
                                    LatitudeStatus, DaysToDeclinationMode, Current.Latitude, Current.LatitudeVelocity);
                }
                if (DistanceStatus != DistanceMode.None)
                {
                    sb.AppendFormat(" {0}{1}, Long={2:F3}({3:F3}//day)",
                                    DistanceStatus, DaysToDistanceMode, Current.Distance, Current.DistanceVelocity);
                }
                foreach (Relation rel in RelationWithOthers)
                {
                    if (NeglectMoon && rel.Inferior == PlanetId.SE_MOON || rel.Superior == PlanetId.SE_MOON)
                    {
                        continue;
                    }
                    sb.AppendFormat("{0}º{1}({2}) ",
                                    rel.Aspect.Degrees, rel.Inferior == Current.Owner ? rel.Superior : rel.Inferior, rel.Orb.ToString("F3"));
                }
                return(sb.ToString());
            }
        }
Beispiel #5
0
 public string ToString(string format, IFormatProvider formatProvider)
 {
     return(String.Format("{0}: {1}({2:F3})", Planet.SymbolOf(Owner), Rectascension.AngleFormatOf(Longitude, format), LongitudeVelocity));
 }
Beispiel #6
0
 public override string ToString()
 {
     return(String.Format("[{0}:{1}, Speed={2:F4}]", Planet.SymbolOf(Owner), Longitude.AstrologyFormat(), LongitudeVelocity));
 }
Beispiel #7
0
 public static string LableOf(PlanetId id, OrbitInfoType kind)
 {
     return(String.Format("{0}{1}", Planet.SymbolOf(id), OrbitTypeAbbrv[kind]));
 }
Beispiel #8
0
 public override string ToString()
 {
     return(String.Format("{0} {1} {2}", Planet.SymbolOf(SupperiorId), Aspects.Symbols[Type], Planet.SymbolOf(InferiorId)));
 }