예제 #1
0
        public void Free()
        {
            Debug.WriteLine(m_DisplayName + ".Free()");

            m_CalcToolProvider          = null;
            m_VectorToolProvider        = null;
            m_ObjectTrajectoryCatesianX = null;
            m_ObjectTrajectoryCatesianZ = null;
        }
예제 #2
0
        public void Free()
        {
            Debug.WriteLine(m_DisplayName + ".Free()", "Entered:");

            m_Site                  = null;
            m_StkRootObject         = null;
            m_CalcToolProvider      = null;
            m_VectorToolProvider    = null;
            m_objectConfiguredPoint = null;

            Debug.WriteLine(m_DisplayName + ".Free()", "Exited:");
        }
        public bool Reset(AgCrdnCalcScalarPluginResultReset Result)
        {
            m_CalcToolProvider   = Result.CalcToolProvider;
            m_VectorToolProvider = Result.VectorToolProvider;

            if (FilePath != "")
            {
                ReadInputData(FilePath);
            }

            return(true);
        }
예제 #4
0
        public void Free()
        {
            try
            {
                Debug.WriteLine("--> Entered", this.m_Name + ".Free()");

                if (this.m_UPS != null)
                {
                    if (this.m_MsgStatus)
                    {
                        this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free():");
                        this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): PreNextCntr( " + this.m_PreNextCntr + " )");
                        this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): EvalCntr( " + this.m_EvalCntr + " )");
                        this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Free(): PostEvalCntr( " + this.m_PostEvalCntr + " )");
                    }

                    Marshal.ReleaseComObject(this.m_UPS);
                }
                this.m_UPS = null;

                if (this.m_SPS != null)
                {
                    Marshal.ReleaseComObject(this.m_SPS);
                }
                this.m_SPS = null;

                if (this.m_CPP != null)
                {
                    Marshal.ReleaseComObject(this.m_CPP);
                }
                this.m_CPP = null;

                if (this.m_CCV != null)
                {
                    Marshal.ReleaseComObject(this.m_CCV);
                }
                this.m_CCV = null;
            }
            catch (Exception ex)
            {
                if (this.m_UPS != null)
                {
                    this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Free(): Exception Message( " + ex.Message + " )");
                    this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Free(): Exception StackTr( " + ex.StackTrace + " )");
                }
                Debug.WriteLine("Exception Message( " + ex.Message + " )", this.m_Name + ".Free()");
                Debug.WriteLine("Exception StackTr( " + ex.StackTrace + " )", this.m_Name + ".Free()");
            }
            finally
            {
                Debug.WriteLine("<-- Exited", this.m_Name + ".Free()");
            }
        }
예제 #5
0
        public bool Reset(AgCrdnPointPluginResultReset Result)
        {
            Debug.WriteLine(m_DisplayName + ".Reset()", "Entered:");

            m_CalcToolProvider   = Result.CalcToolProvider;
            m_VectorToolProvider = Result.VectorToolProvider;

            m_objectConfiguredPoint = m_VectorToolProvider.ConfigurePoint("SubPoint(Detic)", "<MyObject>", "Body", "<MyObject>");

            Debug.WriteLine(m_DisplayName + ".Reset()", "Exited:");

            return(true);
        }
예제 #6
0
        public bool Reset(AgCrdnAxesPluginResultReset Result)
        {
            string objPath = "[" + Result.ObjectPath + "]";

            Debug.WriteLine(m_DisplayName + ".Reset()", "Entered:");

            m_CalcToolProvider   = Result.CalcToolProvider;
            m_VectorToolProvider = Result.VectorToolProvider;

            m_ICRFAxes = m_VectorToolProvider.ConfigureAxes("ICRF", "<MyObject>", "ICRF", "<MyObject>");

            Debug.WriteLine(m_DisplayName + ".Reset()", "Exited:");

            return(true);
        }
예제 #7
0
        public bool Reset(AgCrdnCalcScalarPluginResultReset Result)
        {
            string objPath = "[" + Result.ObjectPath + "]";

            Debug.WriteLine(m_DisplayName + ".Reset()", "Entered:");

            m_CalcToolProvider   = Result.CalcToolProvider;
            m_VectorToolProvider = Result.VectorToolProvider;

            m_ObjectTrajectoryCatesianX = m_CalcToolProvider.GetCalcScalar("Trajectory(CBF).Cartesian.X", "<MyObject>");
            m_ObjectTrajectoryCatesianZ = m_CalcToolProvider.GetCalcScalar("Trajectory(CBF).Cartesian.Z", "<MyObject>");

            Debug.WriteLine(m_DisplayName + ".Reset()", "Exited:");

            return(true);
        }
예제 #8
0
        public bool PreCompute(AgAccessConstraintPluginResultPreCompute Result)
        {
            // Get the topocentric Axes from the Vector Tool,
            // for the Facility/Target, to be used in the computation later

            AgAccessConstraintPluginObjectDescriptor baseDesc = Result.Base;
            string basePath = baseDesc.ObjectPath;

            if (basePath != "")
            {
                if (!m_AxesHash.ContainsKey(basePath))
                {
                    AgCrdnPluginProvider vgtProvider = baseDesc.VectorToolProvider;

                    if (vgtProvider != null)
                    {
                        string cbName = "Earth";                        //
                        cbName = baseDesc.CentralBodyName;
                        cbName = "CentralBody/" + cbName;

                        AgCrdnConfiguredAxes topoAxes = vgtProvider.ConfigureAxes(
                            "Fixed", cbName, "TopoCentric", "");

                        if (topoAxes != null && topoAxes.IsConfigured)
                        {
                            m_AxesHash.Add(basePath, topoAxes);
                        }
                    }
                }
            }

            if (m_Site != null && m_DebugMode)
            {
                Message(AgEUtLogMsgType.eUtLogMsgInfo, m_DisplayName + ": PreCompute()");
            }

            return(true);
        }
예제 #9
0
        public Example1() : base()
        {
            try
            {
                Debug.WriteLine("--> Entered", this.m_Name + ".Example1()");

                this.SetAttributeConfigDefaults();

                this.m_UPS = null;
                this.m_SPS = null;
                this.m_CPP = null;
                this.m_CCV = null;

                this.m_SRPArea      = 0.0;
                this.m_PreNextCntr  = 0;                                     // CLR initializes to zero, but do it anyways.
                this.m_EvalCntr     = 0;                                     // CLR initializes to zero, but do it anyways.
                this.m_PostEvalCntr = 0;                                     // CLR initializes to zero, but do it anyways.
                this.m_SrpIsOn      = false;
            }
            finally
            {
                Debug.WriteLine("<-- Exited", this.m_Name + ".Example1()");
            }
        }
 public void Free()
 {
     m_CalcToolProvider   = null;
     m_VectorToolProvider = null;
 }
예제 #11
0
        public bool Init(IAgUtPluginSite Ups)
        {
            try
            {
                Debug.WriteLine("--> Entered", this.m_Name + ".Init()");

                this.m_UPS = Ups;

                if (this.m_UPS != null)
                {
                    if (this.m_Enabled)
                    {
                        m_SPS = this.m_UPS as IAgStkPluginSite;

                        if (this.m_SPS != null)
                        {
                            this.m_CPP = this.m_SPS.VectorToolProvider;

                            if (this.m_CPP != null)
                            {
                                this.m_CCV = this.m_CPP.ConfigureVector(this.m_VectorName, "", "J2000", "CentralBody/Earth");
                            }

                            if (this.m_MsgStatus)
                            {
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init():");
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelRefFrame( " + this.AccelRefFrame + " )");
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelX( " + this.m_AccelX + " )");
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelY( " + this.m_AccelY + " )");
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): AccelZ( " + this.m_AccelZ + " )");
                            }

                            if (this.m_CCV == null)
                            {
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Could not obtain " + m_VectorName);
                                this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Turning off the computation of SRP Area");
                            }
                        }
                        else
                        {
                            this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Could not obtain IAgStkPluginSite from" + this.m_UPS.SiteName);
                            this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Turning off the computation of SRP Area");
                        }
                    }
                    else
                    {
                        if (this.m_MsgStatus)
                        {
                            this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgDebug, this.m_Name + ".Init(): Disabled");
                        }
                    }
                }
                else
                {
                    throw new Exception("UtPluginSite was null");
                }
            }
            catch (Exception ex)
            {
                this.m_Enabled = false;

                if (this.m_UPS != null)
                {
                    this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Init(): Exception Message( " + ex.Message + " )");
                    this.m_UPS.Message(AgEUtLogMsgType.eUtLogMsgAlarm, this.m_Name + ".Init(): Exception StackTr( " + ex.StackTrace + " )");
                }
                Debug.WriteLine("Exception Message( " + ex.Message + " )", this.m_Name + ".Init()");
                Debug.WriteLine("Exception StackTr( " + ex.StackTrace + " )", this.m_Name + ".Init()");
            }
            finally
            {
                Debug.WriteLine("<-- Exited", this.m_Name + ".Init()");
            }

            return(this.m_Enabled);
        }