Exemplo n.º 1
0
 public TranscensionEvent(PlanetId id, DateTimeOffset time, Position pos, Rectascension refDegree, Double theAspectDegree)
     : base(id, time, pos)
 {
     RefRecscension = refDegree;
     AspectDegree   = theAspectDegree;
     Kind           = PlanetEventFlag.Transcended;
 }
Exemplo n.º 2
0
        public RelationFlag(Relation relation)
        {
            this.detail          = new BitVector32();
            this.kind            = new BitVector32();
            kind[superiorMask]   = (int)(relation.Superior);
            kind[inferiorMask]   = (int)relation.Inferior;
            kind[aspectTypeMask] = (int)relation.Aspect.Kind;
            kind[directionMask]  = (relation.Aspect.Degrees > 180) ? 1 : 0;


            detail[superiorDirection] = relation.SuperiorPosition.LongitudeVelocity >= 0 ? 0 : 1;
            detail[inferiorDirection] = relation.InferiorPosition.LongitudeVelocity >= 0 ? 0 : 1;
            detail[sameDirection]     = (detail[superiorDirection] == detail[inferiorDirection]) ? 1 : 0;

            Angle current = new Rectascension(relation.InferiorPosition.Longitude - relation.SuperiorPosition.Longitude).Reference;
            Angle next    = new Angle(relation.SuperiorPosition.Longitude + relation.SuperiorPosition.LongitudeVelocity
                                      - relation.InferiorPosition.Longitude - relation.InferiorPosition.LongitudeVelocity).Reference;

            detail[angleExpanding] = (next.Degrees > current.Degrees) ? 1 : 0;

            detail[superiorNorthOrSouth] = relation.SuperiorPosition.Latitude >= 0 ? 0 : 1;
            detail[superiorInclination]  = relation.SuperiorPosition.LatitudeVelocity >= 0 ? 1 : 0;
            detail[inferiorNorthOrSouth] = relation.InferiorPosition.Latitude >= 0 ? 0 : 1;
            detail[inferiorInclination]  = relation.InferiorPosition.LatitudeVelocity >= 0 ? 1 : 0;
        }
Exemplo n.º 3
0
        public Relation(DateTimeOffset moment, Position one, Position another)
        {
            Moment = moment;
            if (one.Owner > another.Owner)
            {
                SuperiorPosition = one;
                InferiorPosition = another;
            }
            else
            {
                SuperiorPosition = another;
                InferiorPosition = one;
            }
            Aspect = Aspects.AspectBetween(SuperiorPosition.Longitude, InferiorPosition.Longitude);

            ReferenceAngle = new Rectascension(InferiorPosition.Longitude - SuperiorPosition.Longitude).Reference;

            if (Aspect != null)
            {
                Orb  = Aspect.OrbOf(InferiorPosition.Longitude - SuperiorPosition.Longitude);
                Flag = new RelationFlag(this);
            }
        }
Exemplo n.º 4
0
 public string ToString(string format, IFormatProvider formatProvider)
 {
     return(String.Format("{0}: {1}({2:F3})", Planet.SymbolOf(Owner), Rectascension.FormattedStringOf(Longitude, format), LongitudeVelocity));
 }
Exemplo n.º 5
0
 public override string ToString()
 {
     return(String.Format("[{0}:{1}, Speed={2:F4}]", Planet.All[Owner], Rectascension.AstroStringOf(Longitude), LongitudeVelocity));
 }