Ejemplo n.º 1
0
        private void CreateSat1TwoBody()
        {
            try
            {
                try
                { root.ExecuteCommand("Unload / */Satellite/Sat1"); }
                catch
                { }

                IAgSatellite sat1 = root.CurrentScenario.Children.New(AgESTKObjectType.eSatellite, "Sat1") as IAgSatellite;
                sat1.SetPropagatorType(AgEVePropagatorType.ePropagatorTwoBody);

                IAgVePropagatorTwoBody propSat1 = sat1.Propagator as IAgVePropagatorTwoBody;
                propSat1.Step = 60;

                IAgVeGfxAttributesOrbit sat1Graph = sat1.Graphics.Attributes as IAgVeGfxAttributesOrbit;
                sat1Graph.Color      = Color.LimeGreen;
                sat1Graph.Line.Width = AgELineWidth.e2;

                //'Definisco i parametri Kepleriani classici del satellite
                IAgOrbitStateClassical classical2B = propSat1.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical) as IAgOrbitStateClassical;
                classical2B.CoordinateSystemType = AgECoordinateSystem.eCoordinateSystemJ2000;

                //'Uso il semiasse maggiore e l'eccentricità per definire la forma e la dimensione dell'orbita
                classical2B.SizeShapeType = AgEClassicalSizeShape.eSizeShapeSemimajorAxis;
                IAgClassicalSizeShapeSemimajorAxis semi2B = classical2B.SizeShape as IAgClassicalSizeShapeSemimajorAxis;
                semi2B.SemiMajorAxis = semimajorAxisSat1;
                semi2B.Eccentricity  = eccentricitySat1;

                //'Per definire l'orientamento dell'orbita nello spazio uso l'inclinazione, l'argomento del perigeo e la RAAN
                classical2B.Orientation.Inclination  = inclinationSat1;
                classical2B.Orientation.ArgOfPerigee = argOfPerigeeSat1;
                classical2B.Orientation.AscNodeType  = AgEOrientationAscNode.eAscNodeRAAN;
                IAgOrientationAscNodeRAAN raan = classical2B.Orientation.AscNode as IAgOrientationAscNodeRAAN;
                raan.Value = raanSat1;

                //'uso l'anomalia vera per definire la posizione iniziale del satellite lungo la sua orbita
                classical2B.LocationType = AgEClassicalLocation.eLocationTrueAnomaly;
                IAgClassicalLocationTrueAnomaly trueAnomaly = classical2B.Location as IAgClassicalLocationTrueAnomaly;
                trueAnomaly.Value = trueAnomSat1;

                //'Infine assegno i parametri orbtali così definiti al satellite e lo propago
                propSat1.InitialState.Representation.Assign(classical2B);
                propSat1.Propagate();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 3
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);
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 新建一个SARSYS在当前sc文件中
        /// 需要建立最基础的系统
        /// 参数大多数有默认值
        /// </summary>
        public void newsarsys()
        {
            #region 写入信息
            AGI.STKX.IAgExecCmdResult resultmsg = rootapp.ExecuteCommand("SetDescription * long SARSYS");
            #endregion

            #region 设定单位、仿真时间
            // Reset the units to the STK defaults
            dimensions = root.UnitPreferences;
            dimensions.ResetUnits();

            // Set the date unit, acquire an interface to the scenario and use
            // it to set the time period and epoch
            dimensions.SetCurrentUnit("DateFormat", "UTCG");

            scene = (IAgScenario)root.CurrentScenario;
            scene.StartTime = simstarttime;
            scene.StopTime = simstoptime;
            scene.Epoch = simstarttime;

            // Set new preference for Temperature
            dimensions.SetCurrentUnit("Temperature", "degC");
            #endregion

            #region 放置发射站
            //SATELLITE #1: TDRS
            //Assign a two-body propagator to propagate it
            tdrs = (IAgSatellite)root.CurrentScenario.Children.New(AgESTKObjectType.
                eSatellite, "TDRS");
            tdrs.SetPropagatorType(AgEVePropagatorType.ePropagatorTwoBody);
            twobody = (IAgVePropagatorTwoBody)tdrs.Propagator;

            //Define the TDRS satellite's orbit using
            //classical (Keplerian) orbital elements
            classical = (IAgOrbitStateClassical)twobody.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical);

            //Set J2000 as the coordinate system
            //and set the time period and time step
            classical.CoordinateSystemType = AgECoordinateSystem.eCoordinateSystemJ2000;
            twobody.EphemerisInterval.SetStartAndStopTimes(simstarttime, simstoptime);
            twobody.Step = 60;

            //定义半主轴长度,离心率
            //Use period and eccentricity to define the size
            //and shape of the orbit
            classical.SizeShapeType = AgEClassicalSizeShape.eSizeShapeSemimajorAxis;
            IAgClassicalSizeShapeSemimajorAxis semi = (IAgClassicalSizeShapeSemimajorAxis)classical.SizeShape;
            semi.SemiMajorAxis = 35860;
            semi.Eccentricity = 0.0;

            //定义轨道倾角,升交点赤经,近地点幅角
            //Use argument of perigee, inclination
            //and longitude of ascending node to
            //define the orientation of the orbit
            classical.Orientation.ArgOfPerigee = 15.0;
            classical.Orientation.Inclination = 40.0;
            classical.Orientation.AscNodeType = AgEOrientationAscNode.eAscNodeLAN;
            IAgOrientationAscNodeLAN lan = (IAgOrientationAscNodeLAN)classical.Orientation.AscNode;
            lan.Value = 259.999982;

            //定义真近点角(?)来定义初始位置
            //Use true anomaly to specify the position of
            //the satellite in orbit
            classical.LocationType = AgEClassicalLocation.eLocationTrueAnomaly;
            IAgClassicalLocationTrueAnomaly trueAnomaly = (IAgClassicalLocationTrueAnomaly)classical.Location;
            trueAnomaly.Value = 178.845262;

            //Assign the orbital elements to the TDRS
            //satellite's propagator and propagate the orbit
            twobody.InitialState.Representation.Assign(classical);
            twobody.Propagate();

            root.Rewind();

            #endregion

            #region 放置接收站
            cruise = (IAgAircraft)root.CurrentScenario.Children.New(AgESTKObjectType.eAircraft, "Cruise");
            cruise.SetRouteType(AgEVePropagatorType.ePropagatorGreatArc);
            greatArc = (IAgVePropagatorGreatArc)cruise.Route;
            greatArc.EphemerisInterval.SetStartAndStopTimes(simstarttime, simstoptime);
            greatArc.Method = AgEVeWayPtCompMethod.eDetermineTimeAccFromVel;

            ((IAgVOModelFile)cruise.VO.Model.ModelData).Filename = @"\STKData\VO\Models\Air\e-3a_sentry_awacs.mdl";
            cruise.VO.Offsets.Rotational.Enable = true;
            cruise.VO.Offsets.Rotational.X = 180;

            //Use the convenience method defined above
            //to add waypoints specifying the ship's route
            AddWaypoint(greatArc.Waypoints, -42.1, -121.5, 3.0, .15, 0.0);
            AddWaypoint(greatArc.Waypoints, 62.0, -56.6, 3.0, .15, 0.0);

            cruise.SetAttitudeType(AgEVeAttitude.eAttitudeStandard);
            IAgVeRouteAttitudeStandard attitude = (IAgVeRouteAttitudeStandard)cruise.Attitude;
            attitude.Basic.SetProfileType(AgEVeProfile.
                eProfileECFVelocityAlignmentWithRadialConstraint);
            cruise.Graphics.WaypointMarker.IsWaypointMarkersVisible = true;
            cruise.Graphics.WaypointMarker.IsTurnMarkersVisible = true;
            greatArc.Propagate();
            root.Rewind();

            #endregion

            #region 放置发射站雷达
            horizon = (IAgSensor)root.CurrentScenario.Children["TDRS"].Children.
                    New(AgESTKObjectType.eSensor, "Horizon");
            horizon.SetPatternType(AgESnPattern.eSnSimpleConic);
            IAgSnSimpleConicPattern simpleConic = (IAgSnSimpleConicPattern)horizon.Pattern;
            simpleConic.ConeAngle = 0.1;

            //Select a Fixed pointing type and the Az-El
            //orientation type, and set the elevation angle to
            //90 deg, so that the sensor points straight down
            //with reference to the satellite
            horizon.SetPointingType(AgESnPointing.eSnPtFixed);
            IAgSnPtFixed fixedPt = (IAgSnPtFixed)horizon.Pointing;
            IAgOrientationAzEl azEl = (IAgOrientationAzEl)fixedPt.Orientation.ConvertTo(AgEOrientationType.eAzEl);
            azEl.Elevation = 89.2;
            azEl.AboutBoresight = AgEAzElAboutBoresight.eAzElAboutBoresightRotate;
            fixedPt.Orientation.Assign(azEl);

            root.Rewind();

            #endregion
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 读出当前sc文件中已经存在的SARSYS
        /// </summary>
        public void readsarsys()
        {

            AGI.STKX.IAgExecCmdResult resultmsg = rootapp.ExecuteCommand("GetDescription * long");


            dimensions = root.UnitPreferences;
            scene = (IAgScenario)root.CurrentScenario;
            tdrs = (IAgSatellite)root.CurrentScenario.Children["TDRS"];
            
            twobody = (IAgVePropagatorTwoBody)tdrs.Propagator;
            classical = (IAgOrbitStateClassical)twobody.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical);

            cruise = (IAgAircraft)root.CurrentScenario.Children["Cruise"];
            greatArc = (IAgVePropagatorGreatArc)cruise.Route;

            radar_t = (IAgSensor)root.CurrentScenario.Children["TDRS"].Children["radar_t"];

            radar_r = (IAgSensor)root.CurrentScenario.Children["Cruise"].Children["radar_r"];

            target = (IAgSensor)root.CurrentScenario.Children["TDRS"].Children["target"];

            simstarttime = scene.StartTime;
            simstoptime = scene.StopTime;
            simstep = scene.Animation.AnimStepValue;
            IAgClassicalSizeShapeSemimajorAxis semi = (IAgClassicalSizeShapeSemimajorAxis)classical.SizeShape;
            sasem = semi.SemiMajorAxis;
            saecc = semi.Eccentricity;
            saaop = classical.Orientation.ArgOfPerigee;
            sainc = classical.Orientation.Inclination;
            salan = ((IAgOrientationAscNodeLAN)classical.Orientation.AscNode).Value;
            satra = ((IAgClassicalLocationTrueAnomaly)classical.Location).Value;
            racoang = ((IAgSnSimpleConicPattern)radar_t.Pattern).ConeAngle;

            IAgSnPtFixed fixedPt = (IAgSnPtFixed)radar_t.Pointing;
            IAgOrientationAzEl azEl = (IAgOrientationAzEl)fixedPt.Orientation.ConvertTo(AgEOrientationType.eAzEl);
            raeleva = azEl.Elevation;

            plwaypoints = new double[5 * greatArc.Waypoints.Count];
            for(int ii=0;ii<greatArc.Waypoints.Count;ii++)
            {
                plwaypoints[ii * 5] = greatArc.Waypoints[ii].Latitude;
                plwaypoints[ii * 5 + 1] = greatArc.Waypoints[ii].Longitude;
                plwaypoints[ii * 5 + 2] = greatArc.Waypoints[ii].Altitude;
                plwaypoints[ii * 5 + 3] = greatArc.Waypoints[ii].Speed;
                plwaypoints[ii * 5 + 4] = greatArc.Waypoints[ii].TurnRadius;
            }




        }
Ejemplo n.º 6
0
        /// <summary>
        /// 新建一个SARSYS在当前sc文件中
        /// 需要建立最基础的系统
        /// 参数大多数有默认值
        /// </summary>
        public void newsarsys()
        {
            #region 写入信息
            AGI.STKX.IAgExecCmdResult resultmsg = rootapp.ExecuteCommand("SetDescription * long SARSYS");
            #endregion


            #region 设定单位、仿真时间
            // Reset the units to the STK defaults
            dimensions = root.UnitPreferences;
            dimensions.ResetUnits();

            // Set the date unit, acquire an interface to the scenario and use
            // it to set the time period and epoch
            dimensions.SetCurrentUnit("DateFormat", "UTCG");

            scene = (IAgScenario)root.CurrentScenario;
            scene.StartTime = simstarttime;
            scene.StopTime = simstoptime;
            scene.Epoch = simstarttime;

            //rootapp.ExecuteCommand("MapTracking * UTM");

            // Set new preference for Temperature
            dimensions.SetCurrentUnit("Temperature", "degC");
            #endregion

            #region 放置发射站
            //SATELLITE #1: TDRS
            //Assign a two-body propagator to propagate it
            tdrs = (IAgSatellite)root.CurrentScenario.Children.New(AgESTKObjectType.
                eSatellite, "TDRS");
            tdrs.SetPropagatorType(AgEVePropagatorType.ePropagatorTwoBody);
            twobody = (IAgVePropagatorTwoBody)tdrs.Propagator;

            //Define the TDRS satellite's orbit using
            //classical (Keplerian) orbital elements
            classical = (IAgOrbitStateClassical)twobody.InitialState.Representation.ConvertTo(AgEOrbitStateType.eOrbitStateClassical);

            //Set J2000 as the coordinate system
            //and set the time period and time step
            classical.CoordinateSystemType = AgECoordinateSystem.eCoordinateSystemJ2000;
            twobody.EphemerisInterval.SetStartAndStopTimes(simstarttime, simstoptime);
            twobody.Step = 60;

            //定义半主轴长度,离心率
            //Use period and eccentricity to define the size
            //and shape of the orbit
            classical.SizeShapeType = AgEClassicalSizeShape.eSizeShapeSemimajorAxis;
            IAgClassicalSizeShapeSemimajorAxis semi = (IAgClassicalSizeShapeSemimajorAxis)classical.SizeShape;
            semi.SemiMajorAxis = sasem;
            semi.Eccentricity = saecc;


            //定义轨道倾角,升交点赤经,近地点幅角
            //Use argument of perigee, inclination
            //and longitude of ascending node to
            //define the orientation of the orbit
            classical.Orientation.ArgOfPerigee = saaop;
            classical.Orientation.Inclination = sainc;
            classical.Orientation.AscNodeType = AgEOrientationAscNode.eAscNodeLAN;
            IAgOrientationAscNodeLAN lan = (IAgOrientationAscNodeLAN)classical.Orientation.AscNode;
            lan.Value = salan;

            //定义真近点角(?)来定义初始位置
            //Use true anomaly to specify the position of
            //the satellite in orbit
            classical.LocationType = AgEClassicalLocation.eLocationTrueAnomaly;
            IAgClassicalLocationTrueAnomaly trueAnomaly = (IAgClassicalLocationTrueAnomaly)classical.Location;
            trueAnomaly.Value = satra;


            //Assign the orbital elements to the TDRS
            //satellite's propagator and propagate the orbit	
            twobody.InitialState.Representation.Assign(classical);
            twobody.Propagate();

            root.Rewind();

            #endregion

            
            #region 放置接收站
            cruise = (IAgAircraft)root.CurrentScenario.Children.New(AgESTKObjectType.eAircraft, "Cruise");
            cruise.SetRouteType(AgEVePropagatorType.ePropagatorGreatArc);
            greatArc = (IAgVePropagatorGreatArc)cruise.Route;
            greatArc.EphemerisInterval.SetStartAndStopTimes(simstarttime, simstoptime);
            greatArc.Method = AgEVeWayPtCompMethod.eDetermineTimeAccFromVel;

            ((IAgVOModelFile)cruise.VO.Model.ModelData).Filename = @"\STKData\VO\Models\Air\rq-4a_globalhawk.mdl";
            cruise.VO.Offsets.Rotational.Enable = true;
            cruise.VO.Offsets.Rotational.X = 180;

            //Use the convenience method defined above
            //to add waypoints specifying the ship's route
            for (int ii = 0; ii < plwaypoints.Length; ii += 5)
            {
                AddWaypoint(greatArc.Waypoints, plwaypoints[ii], plwaypoints[ii + 1], plwaypoints[ii + 2], plwaypoints[ii + 3], plwaypoints[ii + 4]);
            }
              
            
            cruise.SetAttitudeType(AgEVeAttitude.eAttitudeStandard);
            IAgVeRouteAttitudeStandard attitude = (IAgVeRouteAttitudeStandard)cruise.Attitude;
            attitude.Basic.SetProfileType(AgEVeProfile.
                eProfileECFVelocityAlignmentWithRadialConstraint);
            cruise.Graphics.WaypointMarker.IsWaypointMarkersVisible = true;
            cruise.Graphics.WaypointMarker.IsTurnMarkersVisible = true;
            greatArc.Propagate();
            root.Rewind();


            #endregion

            #region 放置发射站雷达
            radar_t = (IAgSensor)root.CurrentScenario.Children["TDRS"].Children.New(AgESTKObjectType.eSensor, "radar_t");
            radar_t.SetPatternType(AgESnPattern.eSnSimpleConic);
            ((IAgSnSimpleConicPattern)radar_t.Pattern).ConeAngle = racoang;



            //Select a Fixed pointing type and the Az-El
            //orientation type, and set the elevation angle to
            //90 deg, so that the sensor points straight down
            //with reference to the satellite
            radar_t.SetPointingType(AgESnPointing.eSnPtFixed);
            IAgSnPtFixed fixedPt = (IAgSnPtFixed)radar_t.Pointing;
            IAgOrientationAzEl azEl = (IAgOrientationAzEl)fixedPt.Orientation.ConvertTo(AgEOrientationType.eAzEl);
            azEl.Elevation = raeleva;
            azEl.AboutBoresight = AgEAzElAboutBoresight.eAzElAboutBoresightRotate;
            fixedPt.Orientation.Assign(azEl);

            radar_t.Graphics.FillVisible = true;
            radar_t.VO.FillVisible = true;
            

            root.Rewind();


            #endregion


            #region 放置接收站雷达


            target = (IAgSensor)root.CurrentScenario.Children["TDRS"].Children.New(AgESTKObjectType.eSensor, "target");

            target.SetLocationType(AgESnLocation.eSnLocationCrdnPoint);
            IAgLocationCrdnPoint vgtPoint = target.LocationData as IAgLocationCrdnPoint;
            //vgtPoint.PointPath = "TDRS/radar_t BoresightIntersection(Terrain)";
            vgtPoint.PointPath = "Satellite/TDRS/Sensor/radar_t BoresightIntersection(Terrain)";
            target.SetPatternType(AgESnPattern.eSnSimpleConic);
            ((IAgSnSimpleConicPattern)target.Pattern).ConeAngle = 0.00001;
           
            

            IAgSnPtTargeted targetedSensor1 = target.CommonTasks.SetPointingTargetedTracking(
   AgETrackModeType.eTrackModeTranspond, AgEBoresightType.eBoresightRotate, "*/Aircraft/Cruise");


            target.SetPointingType(AgESnPointing.eSnPtTargeted);
            IAgSnPtTargeted rpt1 = (IAgSnPtTargeted)target.Pointing;
            rpt1.Boresight = AgESnPtTrgtBsightType.eSnPtTrgtBsightTracking;
            root.Rewind();
            rootapp.ExecuteCommand("Graphics */Satellite/TDRS/Sensor/target Show Off");


            /////////////////////////
            radar_r = (IAgSensor)root.CurrentScenario.Children["Cruise"].Children.New(AgESTKObjectType.eSensor, "radar_r");
            radar_r.SetPatternType(AgESnPattern.eSnSimpleConic);
            ((IAgSnSimpleConicPattern)radar_r.Pattern).ConeAngle = 3;
        

            IAgSnPtTargeted targetedSensor = radar_r.CommonTasks.SetPointingTargetedTracking(
    AgETrackModeType.eTrackModeTranspond, AgEBoresightType.eBoresightRotate, "*/Satellite/TDRS/Sensor/target");   

            
            radar_r.SetPointingType(AgESnPointing.eSnPtTargeted);
            IAgSnPtTargeted rpt = (IAgSnPtTargeted)radar_r.Pointing;
            rpt.Boresight = AgESnPtTrgtBsightType.eSnPtTrgtBsightTracking;
            

            root.Rewind();
            #endregion
        }
Ejemplo n.º 7
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;
            }
        }