Esempio n. 1
0
        public static SiteEccentricity ParseLine(string line)
        {
            SiteEccentricity b = new SiteEccentricity();

            b.SiteCode                    = line.Substring(1, 4);
            b.PointCode                   = line.Substring(6, 2).Trim();
            b.SolutionID                  = line.Substring(9, 4).Trim();
            b.ObservationCode             = line.Substring(14, 1);
            b.DateStart                   = Time.ParseYds(line.Substring(16, 12));
            b.DateEnd                     = Time.ParseYds(line.Substring(29, 12));
            b.EccentricityReferenceSystem = line.Substring(42, 3);
            string[] strs = line.Substring(46, 26).Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            int      i    = 0;

            b.Une = new HEN(double.Parse(strs[i++]), double.Parse(strs[i++]), double.Parse(strs[i++]));

            return(b);
        }
Esempio n. 2
0
        /// <summary>
        /// 便于使用的测站信息。
        /// </summary>
        /// <returns></returns>
        public List <SinexSiteDetail> GetSinexSites()
        {
            List <SinexSiteDetail> list = new List <SinexSiteDetail>();

            foreach (var item in SiteIdBlock.Items)
            {
                SinexSiteDetail site = new SinexSiteDetail()
                {
                    Name           = item.SiteCode,
                    ApproxGeoCoord = item.GeoCoord
                };
                list.Add(site);
            }

            foreach (var item in list)
            {
                if (SiteEccentricityBlock != null)
                {
                    SiteEccentricity siteEccentricity = SiteEccentricityBlock.Items.Find(m => m.SiteCode == item.Name);
                    if (siteEccentricity != null)
                    {
                        item.Eccentricity = siteEccentricity.Une;
                    }
                }
                if (SolutionEpochBlock != null)
                {
                    SolutionEpoch epoch = SolutionEpochBlock.Items.Find(m => m.SiteCode.ToLower() == item.Name.ToLower());
                    if (epoch != null)
                    {
                        item.DateStart = epoch.DateStart;
                        item.DateEnd   = epoch.DateEnd;
                    }
                }

                if (SolutionEstimateBlock != null && SolutionEstimateBlock.Count != 0)
                {
                    SolutionValue esX = SolutionEstimateBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAX);
                    SolutionValue esY = SolutionEstimateBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAY);
                    SolutionValue esZ = SolutionEstimateBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAZ);

                    if (esX != null && esY != null && esZ != null)
                    {
                        item.EstimateXYZ       = new XYZ(esX.ParameterValue, esY.ParameterValue, esZ.ParameterValue);
                        item.EstimateXyzStdDev = new XYZ(esX.StdDev, esY.StdDev, esZ.StdDev);
                        item.EstimateGeoCoord  = CoordTransformer.XyzToGeoCoord(item.EstimateXYZ);
                    }
                }

                if (SolutionAprioriBlock != null && SolutionAprioriBlock.Count != 0)
                {
                    SolutionValue apX = SolutionAprioriBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAX);
                    SolutionValue apY = SolutionAprioriBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAY);
                    SolutionValue apZ = SolutionAprioriBlock.Items.Find(
                        m => m.SiteCode == item.Name && m.ParameterType == ParameterType.STAZ);
                    if (apX != null && apY != null && apZ != null)
                    {
                        item.AprioriXYZ       = new XYZ(apX.ParameterValue, apY.ParameterValue, apZ.ParameterValue);
                        item.AprioriXyzStdDev = new XYZ(apX.StdDev, apY.StdDev, apZ.StdDev);
                        item.AprioriGeoCoord  = CoordTransformer.XyzToGeoCoord(item.EstimateXYZ);
                    }
                }
                if (SiteReceiverBlock != null)
                {
                    SiteReceiver receiver = SiteReceiverBlock.Items.Find(m => m.SiteCode == item.Name);
                    if (receiver != null)
                    {
                        item.Receiver = receiver.ReceiverType;
                    }
                }
                if (SiteAntennaBlock != null)
                {
                    SiteAntenna antenna = SiteAntennaBlock.Items.Find(m => m.SiteCode == item.Name);
                    if (antenna != null)
                    {
                        item.Antenna = antenna.AntennaType;
                    }
                }
            }

            return(list);
        }
Esempio n. 3
0
        public override bool Equals(object obj)
        {
            SiteEccentricity site = obj as SiteEccentricity;

            return(site == null ? false : SiteCode.Equals(site.SiteCode));
        }