// /////////////////////////////////////////////////////////////////// public Orbit(Tle tle) { m_NoradModel = null; m_tle = tle; m_tle.Initialize(); int epochYear = (int)m_tle.getField(Tle.eField.FLD_EPOCHYEAR); double epochDay = m_tle.getField(Tle.eField.FLD_EPOCHDAY); if (epochYear < 57) epochYear += 2000; else epochYear += 1900; m_jdEpoch = new Julian(epochYear, epochDay); m_secPeriod = -1.0; // Recover the original mean motion and semimajor axis from the // input elements. double mm = mnMotion(); double rpmin = mm * 2 * Globals.PI / Globals.MIN_PER_DAY; // rads per minute double a1 = Math.Pow(Globals.XKE / rpmin, Globals.TWOTHRD); double e = Eccentricity(); double i = Inclination(); double temp = (1.5 * Globals.CK2 * (3.0 * Globals.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_mnMotionRec = rpmin / (1.0 + delta0); m_aeAxisSemiMinorRec = a0 / (1.0 - delta0); m_aeAxisSemiMajorRec = m_aeAxisSemiMinorRec / Math.Sqrt(1.0 - (e * e)); m_kmPerigeeRec = Globals.XKMPER * (m_aeAxisSemiMinorRec * (1.0 - e) - Globals.AE); if (2.0 * Globals.PI / m_mnMotionRec >= 225.0) { // SDP4 : period >= 225 minutes. m_NoradModel = new NoradSDP4(this); } else { // SGP4 : period < 225 minutes m_NoradModel = new NoradSGP4(this); } }
// /////////////////////////////////////////////////////////////////// public Orbit(Tle tle) { m_NoradModel = null; m_tle = tle; m_jdEpoch = m_tle.EpochJulian; m_secPeriod = -1.0; // Recover the original mean motion and semimajor axis from the // input elements. double mm = mnMotion; double rpmin = mm * 2 * Globals.PI / Globals.MIN_PER_DAY; // rads per minute double a1 = Math.Pow(Globals.XKE / rpmin, Globals.TWOTHRD); double e = Eccentricity; double i = Inclination; double temp = (1.5 * Globals.CK2 * (3.0 * Globals.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_mnMotionRec = rpmin / (1.0 + delta0); m_aeAxisSemiMinorRec = a0 / (1.0 - delta0); m_aeAxisSemiMajorRec = m_aeAxisSemiMinorRec / Math.Sqrt(1.0 - (e * e)); m_kmPerigeeRec = Globals.XKMPER * (m_aeAxisSemiMajorRec * (1.0 - e) - Globals.AE); m_kmApogeeRec = Globals.XKMPER * (m_aeAxisSemiMajorRec * (1.0 + e) - Globals.AE); if (2.0 * Globals.PI / m_mnMotionRec >= 225.0) { // SDP4 - period >= 225 minutes. m_NoradModel = new NoradSDP4(this); } else { // SGP4 - period < 225 minutes m_NoradModel = new NoradSGP4(this); } }