Esempio n. 1
0
        /// <summary>
        /// 插值器
        /// </summary>
        /// <param name="prnStr"></param>
        /// <returns></returns>
        private ClockInterpolator GetClockInterpolator(string prnStr)
        {
            if (clockInterpolators.ContainsKey(prnStr))
            {
                return(clockInterpolators[prnStr]);
            }
            lock (locker2)
            {
                if (clockInterpolators.ContainsKey(prnStr))
                {
                    return(clockInterpolators[prnStr]);
                }
                if (SatelliteNumber.IsPrn(prnStr))
                {
                    var prn   = SatelliteNumber.Parse(prnStr);
                    var items = ClockFile.Get(prn);
                    if (items == null || items.Count == 0)
                    {
                        return(null);
                    }

                    var inter = new ClockInterpolator(items.Values);
                    clockInterpolators.TryAdd(prnStr, inter);
                    return(inter);
                }
            }

            return(null);
        }
Esempio n. 2
0
        private void button_view_Click(object sender, EventArgs e)
        {
            bool isValOrRms = checkBox_valOrRMS.Checked;
            var  name       = namedStringControl1.GetValue();
            var  timePeriod = timePeriodControl1.TimePeriod;
            var  strs       = name.Split(new char[] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries);

            var ionoService = GlobalIgsGridIonoDcbService.Instance;

            ObjectTableStorage table = new ObjectTableStorage();

            for (var time = timePeriod.StartDateTime; time < timePeriod.EndDateTime; time += TimeSpan.FromDays(1))
            {
                table.NewRow();
                table.AddItem("Epoch", time);
                foreach (var item in strs)
                {
                    if (item.Length == 3 && SatelliteNumber.IsPrn(item))
                    {
                        var prn = SatelliteNumber.Parse(item);
                        var val = ionoService.GetDcb(new Time(time), prn);
                        if (isValOrRms)
                        {
                            table.AddItem(prn, val.Value);
                        }
                        else
                        {
                            table.AddItem(prn, val.Rms);
                        }
                    }
                    else
                    {
                        var val = ionoService.GetDcb(new Time(time), item);
                        if (isValOrRms)
                        {
                            table.AddItem(item, val.Value);
                        }
                        else
                        {
                            table.AddItem(item, val.Rms);
                        }
                    }
                }
            }


            objectTableControl1.DataBind(table);
        }
Esempio n. 3
0
        /// <summary>
        /// 生成集合
        /// </summary>
        /// <returns></returns>
        public new SatSimpleClockCollection GetSatClockCollection()
        {
            SatSimpleClockCollection satClockCollection = new SatSimpleClockCollection(true, SourceCode);

            foreach (var kv in Data)
            {
                if (SatelliteNumber.IsPrn(kv.Key))
                {
                    var prn  = SatelliteNumber.Parse(kv.Key);
                    var list = satClockCollection.GetOrCreate(prn);
                    foreach (var item in this.Get(prn.ToString()))
                    {
                        list.Add(item);
                    }
                }
            }
            return(satClockCollection);
        }