예제 #1
0
        public void set_InitStateJx(object InitStateObj, string name, double value)
        {
            if (name == "SemiMajorAxis")
            {
                SemiMajorAxis = value;
            }
            else if (name == "Eccentricity")
            {
                Eccentricity = value;
            }
            else if (name == "Inclination")
            {
                Inclination = value;
            }
            else if (name == "ArgOfPerigee")
            {
                ArgOfPerigee = value;
            }
            else if (name == "RAAN")
            {
                RAAN = value;
            }
            else if (name == "TrueAnomaly")
            {
                TrueAnomaly = value;
            }

            IAgSatellite sat = InitStateObj as IAgSatellite;

            if (sat.PropagatorType == AgEVePropagatorType.ePropagatorJ2Perturbation)
            {
                IAgVePropagatorJ2Perturbation prop = sat.Propagator as IAgVePropagatorJ2Perturbation;
                prop.InitialState.Representation.AssignClassical(AgECoordinateSystem.eCoordinateSystemICRF, SemiMajorAxis, Eccentricity, Inclination, ArgOfPerigee, RAAN, TrueAnomaly);
                prop.Propagate();
            }
            if (sat.PropagatorType == AgEVePropagatorType.ePropagatorJ4Perturbation)
            {
                IAgVePropagatorJ4Perturbation prop = sat.Propagator as IAgVePropagatorJ4Perturbation;
                prop.InitialState.Representation.AssignClassical(AgECoordinateSystem.eCoordinateSystemICRF, SemiMajorAxis, Eccentricity, Inclination, ArgOfPerigee, RAAN, TrueAnomaly);
                prop.Propagate();
            }
            if (sat.PropagatorType == AgEVePropagatorType.ePropagatorTwoBody)
            {
                IAgVePropagatorTwoBody prop = sat.Propagator as IAgVePropagatorTwoBody;
                prop.InitialState.Representation.AssignClassical(AgECoordinateSystem.eCoordinateSystemICRF, SemiMajorAxis, Eccentricity, Inclination, ArgOfPerigee, RAAN, TrueAnomaly);
                prop.Propagate();
            }
        }
예제 #2
0
        public Satellite_OrbitData(IAgStkObject Object0)
        {
            m_ElemsType = "Classical";

            if (Object0.ClassName == "Satellite")
            {
                IAgSatellite sat = Object0 as IAgSatellite;
                if (sat.PropagatorType == AgEVePropagatorType.ePropagatorJ2Perturbation)
                {
                    IAgVePropagatorJ2Perturbation prop = sat.Propagator as IAgVePropagatorJ2Perturbation;
                    m_ObjectTimes = prop.EphemerisInterval as AgCrdnEventIntervalSmartInterval;
                    Step_Size     = prop.Step;
                    IAgOrbitStateClassical keplerState = prop.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical) as IAgOrbitStateClassical;
                    m_ultimateObject = Object0;
                    get_InitStateJx(keplerState);
                }

                else if (sat.PropagatorType == AgEVePropagatorType.ePropagatorJ4Perturbation)
                {
                    IAgVePropagatorJ4Perturbation prop = sat.Propagator as IAgVePropagatorJ4Perturbation;
                    m_ObjectTimes = prop.EphemerisInterval as AgCrdnEventIntervalSmartInterval;
                    Step_Size     = prop.Step;
                    IAgOrbitStateClassical keplerState = prop.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical) as IAgOrbitStateClassical;
                    m_ultimateObject = keplerState;
                    get_InitStateJx(keplerState);
                }
                else if (sat.PropagatorType == AgEVePropagatorType.ePropagatorTwoBody)
                {
                    IAgVePropagatorTwoBody prop = sat.Propagator as IAgVePropagatorTwoBody;
                    m_ObjectTimes = prop.EphemerisInterval as AgCrdnEventIntervalSmartInterval;
                    Step_Size     = prop.Step;
                    IAgOrbitStateClassical keplerState = prop.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical) as IAgOrbitStateClassical;
                    m_ultimateObject = keplerState;
                    get_InitStateJx(keplerState);
                }
            }
        }
예제 #3
0
        //Satellite helpers
        public static void ChangeSatelliteInterval(IAgSatellite sat, string startTime, string stopTime, bool astgRun)
        {
            AgEVePropagatorType propType = sat.PropagatorType;

            //IAgVePropagator prop = sat.Propagator;

            switch (propType)
            {
            case AgEVePropagatorType.eUnknownPropagator:
                break;

            case AgEVePropagatorType.ePropagatorHPOP:
                IAgVePropagatorHPOP prop = sat.Propagator as IAgVePropagatorHPOP;
                prop.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorJ2Perturbation:
                IAgVePropagatorJ2Perturbation prop1 = sat.Propagator as IAgVePropagatorJ2Perturbation;
                prop1.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop1.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorJ4Perturbation:
                IAgVePropagatorJ4Perturbation prop2 = sat.Propagator as IAgVePropagatorJ4Perturbation;
                prop2.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop2.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorLOP:
                IAgVePropagatorLOP prop3 = sat.Propagator as IAgVePropagatorLOP;
                prop3.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop3.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorSGP4:
                IAgVePropagatorSGP4 prop4 = sat.Propagator as IAgVePropagatorSGP4;
                prop4.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop4.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorSPICE:
                IAgVePropagatorSPICE prop5 = sat.Propagator as IAgVePropagatorSPICE;
                prop5.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop5.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorStkExternal:
                IAgVePropagatorStkExternal prop6 = sat.Propagator as IAgVePropagatorStkExternal;
                //prop6.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                break;

            case AgEVePropagatorType.ePropagatorTwoBody:
                IAgVePropagatorTwoBody prop7 = sat.Propagator as IAgVePropagatorTwoBody;
                prop7.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop7.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorUserExternal:
                break;

            case AgEVePropagatorType.ePropagatorGreatArc:
                IAgVePropagatorGreatArc prop8 = sat.Propagator as IAgVePropagatorGreatArc;
                prop8.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop8.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorBallistic:
                break;

            case AgEVePropagatorType.ePropagatorSimpleAscent:
                break;

            case AgEVePropagatorType.ePropagatorAstrogator:
                if (astgRun)
                {
                    IAgVADriverMCS driver = sat.Propagator as IAgVADriverMCS;
                    driver.RunMCS();
                }
                break;

            case AgEVePropagatorType.ePropagatorRealtime:
                break;

            case AgEVePropagatorType.ePropagatorGPS:
                IAgVePropagatorGPS prop9 = sat.Propagator as IAgVePropagatorGPS;
                prop9.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop9.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorAviator:
                break;

            case AgEVePropagatorType.ePropagator11Param:
                IAgVePropagator11Param prop10 = sat.Propagator as IAgVePropagator11Param;
                prop10.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                prop10.Propagate();
                break;

            case AgEVePropagatorType.ePropagatorSP3:
                IAgVePropagatorSP3 prop11 = sat.Propagator as IAgVePropagatorSP3;
                //prop11.EphemerisInterval.SetExplicitInterval(startTime, stopTime);
                break;

            default:
                break;
            }
        }