Example #1
0
        public static List <Relation> RelationsOn(DateTimeOffset date, PlanetId refStar)
        {
            List <Relation> allRelations = new List <Relation>();

            Position refPos = CurrentEphemeris[date, refStar];

            Position anotherPos;
            Angle    distance;
            Aspects  aspect;

            for (PlanetId anotherId = PlanetId.SE_SUN; anotherId <= PlanetId.SE_CHIRON; anotherId++)
            {
                if (anotherId == refStar || !Masters.Contains(anotherId))
                {
                    continue;
                }

                anotherPos = CurrentEphemeris[date, anotherId];
                distance   = refPos.Longitude - anotherPos.Longitude;

                aspect = Aspects.CurrentAspectOf(distance);

                if (aspect != null)
                {
                    allRelations.Add(new Relation(date, anotherPos, refPos));
                }
            }

            return(allRelations);

            //List<Relation> allRelations = RelationsOn(around);
            //return (from relation in allRelations
            //        where relation.Inferior == refStar || relation.Superior == refStar
            //        select relation).ToList();
        }
Example #2
0
        public static List <Relation> RelationsOn(DateTimeOffset date)
        {
            List <Position> positions = CurrentEphemeris[date];

            List <Relation> allRelations = new List <Relation>();

            Position superiorPos, inferiorPos;
            Angle    distance;
            Aspects  aspect;

            for (int i = Masters.Count - 1; i > 0; i--)
            {
                PlanetId superiorId = Masters[i];
                superiorPos = CurrentEphemeris.PositionOf(positions, superiorId);

                for (int j = i - 1; j >= 0; j--)
                {
                    PlanetId inferiorId = Masters[j];
                    inferiorPos = CurrentEphemeris.PositionOf(positions, inferiorId);
                    distance    = inferiorPos.Longitude - superiorPos.Longitude;
                    aspect      = Aspects.CurrentAspectOf(distance);

                    if (aspect != null)
                    {
                        allRelations.Add(new Relation(date, superiorPos, inferiorPos));
                    }
                }
            }

            return(allRelations);
        }
Example #3
0
 public Aspects CurrentAspectOf(Angle angle)
 {
     return(Aspects.CurrentAspectOf(Outstandings, angle));
 }