Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="path"></param>
 /// <param name="Version"></param>
 /// <param name="IsUseRangeCorrections">是否使用伪距改正</param>
 public EpochRinexObsFileWriter(string path, double Version, bool IsUseRangeCorrections = false)
 {
     EpochInfoToRinex           = new EpochInfoToRinex(Version, IsUseRangeCorrections);
     this.RinexWriter           = new RinexObsFileWriter(path, Version);
     RinexObsFileHeader         = null;
     this.IsUseRangeCorrections = IsUseRangeCorrections;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 写一个。
        /// </summary>
        /// <param name="epoch"></param>
        public void Write(EpochInformation epoch)
        {
            if (epoch == null || epoch.Count == 0)
            {
                return;
            }
            if (RinexObsFileHeader == null)
            {
                List <string> comments = new List <string>();
                if (IsUseRangeCorrections)
                {
                    // comments info
                    var names = epoch.First.ObsCorrectionNames;

                    if (names.Contains(CorrectionNames.DcbP1C1))
                    {
                        comments.Add("code C1 corrected to P1 by  DcbP1C1");
                    }
                    if (names.Contains(CorrectionNames.DcbP2C2))
                    {
                        comments.Add("code C2 corrected to P2 by  DcbP2C2");
                    }
                    //smoooth range info how to judge???
                    if (names.Contains(CorrectionNames.PhaseSmoothRangeA))
                    {
                        comments.Add("Psuedorange A corrected by carrier smooth range A");
                    }
                    if (names.Contains(CorrectionNames.PhaseSmoothRangeB))
                    {
                        comments.Add("Psuedorange B corrected by carrier smooth range B");
                    }
                    if (names.Contains(CorrectionNames.PhaseSmoothRangeC))
                    {
                        comments.Add("Psuedorange C corrected by carrier smooth range C");
                    }

                    //update
                    epoch.TryUpdateObsWithCorrections();
                }

                RinexObsFileHeader = EpochInfoToRinex.BuildHeader(epoch);
                RinexObsFileHeader.Comments.AddRange(comments);
                RinexWriter.WriteHeader(RinexObsFileHeader);
            }

            //是否更新
            if (IsUseRangeCorrections && RinexObsFileHeader != null)
            {
                epoch.TryUpdateObsWithCorrections();
            }

            var obs = EpochInfoToRinex.Build(epoch);

            RinexWriter.WriteEpochObservation(obs);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 初始化
        /// </summary>
        public override void Init()
        {
            base.Init();
            InitWriter(FileName);


            this.BufferedStream.MaterialEnded += BufferedStream_MaterialEnded;
            var OldHeader = ReadOriginalHeader(FilePath);

            this.InputTimeInMinutes = (OldHeader.EndTime - OldHeader.StartTime) / 60.0;
            this.CurrentStartTime   = OldHeader.StartTime;
            this.OldHeader          = OldHeader;
            this.TableTextManager   = new ObjectTableManager(10000, OutputDirectory);
            this.TableTextManager.Clear();
            EpochInfoToRinex = new EpochInfoToRinex(OldHeader.Version, true);
            LastEpoch        = this.OldHeader.EndTime;
            //医学院, 75-112,33, 900-9500,学区房,五证全
        }