Esempio n. 1
0
        /// <summary>
        /// 将对象深度拷贝到目标dest
        /// </summary>
        /// <param name="dest"></param>
        public void Clone(TimeSweepParam dest)
        {
            if (dest != null)
            {
                dest.P1 = this.p1;
                dest.P2 = this.p2;

                dest.F1 = this.f1;
                dest.F2 = this.f2;

                dest.Rx = this.rx;
                dest.N1 = this.n1;
                dest.N  = this.n;
            }
        }
Esempio n. 2
0
        ///<summary>
        ///获取指定的时间扫描数据
        ///</summary>
        internal TimeSweepParam GetTimeSweepParam(Settings_Pim settings,
                                                  string filePath,
                                                  string gsm,
                                                  string mode,
                                                  int imOrder,
                                                  string cate,
                                                  float num)
        {
            TimeSweepParam tsp = new TimeSweepParam();

            IniFile.SetFileName(filePath);
            string name = GetName(gsm, mode, imOrder, cate);

            tsp.F1 = float.Parse(IniFile.GetString(name, "tx1", "935"));
            tsp.F2 = float.Parse(IniFile.GetString(name, "tx2", "960"));
            tsp.Rx = float.Parse(IniFile.GetString(name, "rx", "910"));
            if (App_Configure.Cnfgs.Cal_Use_Table)
            {
                //----------------------------------------

                tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1);
                tsp.P2 = (float)settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx2, Tx_Tables.pim_rev_offset2);

                //if (settings.PimSchema == ImSchema.REV)
                //{
                //    tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1);
                //    tsp.P2 = (float)settings.Tx + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx, Tx_Tables.pim_rev_offset2);
                //}
                //else
                //{
                //    tsp.P1 = (float)settings.Tx + Tx_Tables.pim_frd_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_frd_offset1);
                //    tsp.P2 = (float)settings.Tx + Tx_Tables.pim_frd_tx2.Offset(tsp.F2, settings.Tx, Tx_Tables.pim_frd_offset2);
                //}
                //----------------------------------------
            }
            else
            {
                tsp.P1 = (float)App_Factors.pim_tx1.ValueWithOffset(tsp.F1, settings.Tx);
                tsp.P2 = (float)App_Factors.pim_tx2.ValueWithOffset(tsp.F2, settings.Tx2);
            }
            tsp.N1 = num;
            return(tsp);
        }
Esempio n. 3
0
        ///<summary>
        ///获取不使用指定的时间扫描参数
        ///</summary>
        /// <param name="order"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        internal TimeSweepParam TimeSweep(Settings_Pim settings, int order, int num)
        {
            int n, m;

            m = (order - 1) / 2;
            n = m + 1;
            TimeSweepParam tsp = new TimeSweepParam();

            tsp.F1 = settings.F1s;
            tsp.F2 = settings.F2e;
            if (App_Configure.Cnfgs.Cal_Use_Table)
            {
                //tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1);
                //tsp.P2 = (float)settings.Tx + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx, Tx_Tables.pim_rev_offset2);

                //ygq
                if (App_Configure.Cnfgs.Mode >= 2)
                {
                    if (PimForm.port1_rev_fwd == 1 || PimForm.port1_rev_fwd == 2)
                    {
                        tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1);
                        tsp.P2 = (float)settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx2, Tx_Tables.pim_rev_offset2);
                    }
                    else
                    {
                        tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev2_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev2_offset1);
                        tsp.P2 = (float)settings.Tx2 + Tx_Tables.pim_rev2_tx2.Offset(tsp.F2, settings.Tx2, Tx_Tables.pim_rev2_offset2);
                    }
                }
                else
                {
                    tsp.P1 = (float)settings.Tx + Tx_Tables.pim_rev_tx1.Offset(tsp.F1, settings.Tx, Tx_Tables.pim_rev_offset1);
                    tsp.P2 = (float)settings.Tx2 + Tx_Tables.pim_rev_tx2.Offset(tsp.F2, settings.Tx2, Tx_Tables.pim_rev_offset2);
                }
                //ygq
            }
            else
            {
                tsp.P1 = (float)App_Factors.pim_tx1.ValueWithOffset(tsp.F1, settings.Tx);
                tsp.P2 = (float)App_Factors.pim_tx2.ValueWithOffset(tsp.F2, settings.Tx2);
            }
            if (App_Configure.Cnfgs.Mode >= 2)
            {
                if (PimForm.port1_rev_fwd == 1 || PimForm.port1_rev_fwd == 2)
                {
                    tsp.Rx = n * tsp.F1 - m * tsp.F2;
                }
                else
                {
                    tsp.Rx = m * tsp.F1 - n * tsp.F2;
                }
            }
            else
            {
                if (App_Configure.Cnfgs.Mode == 1)
                {
                    tsp.Rx = n * tsp.F1 - m * tsp.F2;
                }
                else if (App_Configure.Cnfgs.Mode == 0)
                {
                    tsp.Rx = n * tsp.F2 - m * tsp.F1;
                }
                else
                {
                    tsp.Rx = n * tsp.F1 - m * tsp.F2;
                }
            }

            tsp.N = num;

            return(tsp);
        }