Ejemplo n.º 1
0
      /// <summary>
      /// Standard constructor.
      /// </summary>
      /// <param name="tle">Two-line element orbital parameters.</param>
      public Orbit(TwoLineElement tle)
      {
         TwoLineElement     = tle;
         Epoch = TwoLineElement.EpochJulian;

         m_Inclination   = GetRad(TwoLineElement.Field.Inclination);
         m_Eccentricity  = TwoLineElement.GetField(TwoLineElement.Field.Eccentricity);
         m_RAAN          = GetRad(TwoLineElement.Field.Raan);              
         m_ArgPerigee    = GetRad(TwoLineElement.Field.ArgPerigee);        
         m_BStar         = TwoLineElement.GetField(TwoLineElement.Field.BStarDrag);   
         m_Drag          = TwoLineElement.GetField(TwoLineElement.Field.MeanMotionDt);
         m_MeanAnomaly   = GetRad(TwoLineElement.Field.MeanAnomaly);
         m_TleMeanMotion = TwoLineElement.GetField(TwoLineElement.Field.MeanMotion);  

         // Recover the original mean motion and semimajor axis from the
         // input elements.
         double mm     = TleMeanMotion;
         double rpmin  = mm * OrbitConsts.TwoPi / OrbitConsts.MinPerDay;   // rads per second

         double a1     = Math.Pow(OrbitConsts.Xke / rpmin, 2.0 / 3.0);
         double e      = Eccentricity;
         double i      = Inclination;
         double temp = (1.5 * OrbitConsts.Ck2 * (3.0 * GeoMath.Sqr(Math.Cos(i)) - 1.0) / 
                         Math.Pow(1.0 - e * e, 1.5));   
         double delta1 = temp / (a1 * a1);
         double a0     = a1 * 
                        (1.0 - delta1 * 
                        ((1.0 / 3.0) + delta1 * 
                        (1.0 + 134.0 / 81.0 * delta1)));

         double delta0 = temp / (a0 * a0);

         m_rmMeanMotionRec    = rpmin / (1.0 + delta0);
         m_aeAxisSemiMajorRec = a0 / (1.0 - delta0);
         m_aeAxisSemiMinorRec = m_aeAxisSemiMajorRec * Math.Sqrt(1.0 - (e * e));
         m_kmPerigeeRec       = OrbitConsts.RadiusOfEquator * (m_aeAxisSemiMajorRec * (1.0 - e) - OrbitConsts.Ae);
         m_kmApogeeRec        = OrbitConsts.RadiusOfEquator * (m_aeAxisSemiMajorRec * (1.0 + e) - OrbitConsts.Ae);

         //针对周期的不同,选择不同的模型。
         if (Period.TotalMinutes >= 225.0)
         {
            // SDP4 - period >= 225 minutes.
            NoradModel = new NoradSDP4(this);
         }
         else
         {
            // SGP4 - period < 225 minutes
            NoradModel = new NoradSGP4(this);
         }
      }
Ejemplo n.º 2
0
 // //////////////////////////////////////////////////////////////////////////
 public TwoLineElement(TwoLineElement tle) :
     this(tle.Name, tle.Line1, tle.Line2)
 {
 }
Ejemplo n.º 3
0
 protected double GetDeg(TwoLineElement.Field fld) 
 { 
    return TwoLineElement.GetField(fld, AngleUnit.Degree); 
 }
Ejemplo n.º 4
0
 protected double GetRad(TwoLineElement.Field fld) 
 { 
    return TwoLineElement.GetField(fld, AngleUnit.Radian); 
 }