Ejemplo n.º 1
0
        /// <summary>
        /// Constructor for SurveyPoint
        /// </summary>
        /// <param name="TypeOrder">Type</param>
        /// <param name="SecondaryOrder">Secondary</param>
        /// <param name="TertiaryOrder">Tertiary</param>
        /// <param name="Delay">Order delay</param>
        /// <param name="SPOrder">survey point target of order</param>
        public Order(Constants.ShipTN.OrderType TypeOrder, int SecondaryOrder, int TertiaryOrder, int Delay, SurveyPoint SPOrder)
        {
            TypeOf           = TypeOrder;
            Target           = SPOrder;
            Secondary        = SecondaryOrder;
            Tertiary         = TertiaryOrder;
            SurveyPointOrder = SPOrder;
            OrderDelay       = Delay;

            OrderTimeRequirement = -1;

            Name = TypeOrder.ToString() + " " + SurveyPointOrder.Name.ToString();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This should be done after mass has been assigned to Stars[0]. The pattern here is the one in use in TN Aurora. I am using angle from top, for my numbers, but
        /// that is 90 degrees internally.
        /// </summary>
        public void GenerateSurveyPoints()
        {
            double RingValue = Math.Sqrt(Stars[0].Orbit.MassRelativeToSol) * Constants.SensorTN.EarthRingDistance;

            /// <summary>
            /// Ring one is 0,60,120,180,240,300.
            /// </summary>
            for (int surveyPointIterator = 30; surveyPointIterator < 360; surveyPointIterator += 60)
            {
                double dAngle = surveyPointIterator * ((Math.PI) / 180.0); //this would be 2 * PI / 360
                double fX     = Math.Cos(dAngle) * RingValue;
                double fY     = Math.Sin(dAngle) * RingValue;

                SurveyPoint SP = new SurveyPoint(this, fX, fY);
                _SurveyPoints.Add(SP);
            }

            /// <summary>
            /// Ring two is 15,45,75,105,135,165,195,225,255,285,315,345.
            /// </summary>
            for (int surveyPointIterator = 15; surveyPointIterator < 360; surveyPointIterator += 30)
            {
                double dAngle = surveyPointIterator * ((Math.PI) / 180.0); //this would be 2 * PI / 360
                double fX     = Math.Cos(dAngle) * (RingValue * 2);
                double fY     = Math.Sin(dAngle) * (RingValue * 2);

                SurveyPoint SP = new SurveyPoint(this, fX, fY);
                _SurveyPoints.Add(SP);
            }

            /// <summary>
            /// Ring three is 0,30,60,90,120,150,180,210,240,270,300,330.
            /// </summary>
            for (int surveyPointIterator = 0; surveyPointIterator < 360; surveyPointIterator += 30)
            {
                double dAngle = surveyPointIterator * ((Math.PI) / 180.0); //this would be 2 * PI / 360
                double fX     = Math.Cos(dAngle) * (RingValue * 3);
                double fY     = Math.Sin(dAngle) * (RingValue * 3);

                SurveyPoint SP = new SurveyPoint(this, fX, fY);
                _SurveyPoints.Add(SP);
            }
        }