Exemplo n.º 1
0
 public Phenomenon(DateTime utc, RelationKind theKind, double inDegrees, double exDegrees)
 {
     this.exactUtcTime    = utc;
     this.kind            = new RelationKind(theKind);
     this.interiorDegrees = inDegrees.Round(Decimals);
     this.exteriorDegrees = exDegrees.Round(Decimals);
 }
Exemplo n.º 2
0
        public Relation(PlanetPosition ppA, PlanetPosition ppB)
        {
            this.apart = ppA.Rectascension - ppB.Rectascension;
            AspectType type = Aspect.AspectTypeOf(apart);

            this.kind = new RelationKind(ppA.Id, ppB.Id, type);
            if (ppA.Id <= ppB.Id)
            {
                this.inLongitude  = ppA.Rectascension.Degrees;
                this.outLongitude = ppB.Rectascension.Degrees;
            }
            else
            {
                this.inLongitude  = ppB.Rectascension.Degrees;
                this.outLongitude = ppA.Rectascension.Degrees;
            }
        }
Exemplo n.º 3
0
 public AspectHelper(RelationKind kind, DateTime time)
 {
     this.kind            = kind;
     this.referencePoint  = SweWrapper.ToJulianDay(time);
     this.cachedAspects   = new SortedDictionary <double, double>(new JulianUtComparer());
     this.concernedAngles = new List <double>();
     if (kind.Pattern != AspectType.None)
     {
         this.concernedAngles.Add(Aspect.DegreesOf(kind.Pattern));
     }
     else
     {
         foreach (double degrees in Aspect.Concerned.Keys)
         {
             this.concernedAngles.Add(degrees);
         }
     }
     initiateCache();
 }