コード例 #1
0
ファイル: SiteAntenna.cs プロジェクト: yxw027/GNSSer
        public static SiteAntenna ParseLine(string line)
        {
            SiteAntenna b = new SiteAntenna();

            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.AntennaType         = line.Substring(42, 20);
            b.AntennaSerialNumber = line.Substring(63, 5);

            return(b);
        }
コード例 #2
0
ファイル: SiteAntenna.cs プロジェクト: yxw027/GNSSer
        public override bool Equals(object obj)
        {
            SiteAntenna site = obj as SiteAntenna;

            return(site == null ? false : SiteCode.Equals(site.SiteCode));
        }
コード例 #3
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);
        }