Esempio n. 1
0
 void FillPointSpec(CMCheckedGeoPoint point)
 {
     point.Angle    = Math.Round(CMGeoBase.GetAsimut(APInf.KTA, point, 0), 2);
     point.Distance = Math.Round(CMGeoBase.GetDistance(APInf.KTA, point), 2);
     point.HeightAboveRunwayBegin = point.Height - APInf.CRW.RunwayBegin.Height;
     point.Offset = OffsetRunwayBegin(point);
 }
Esempio n. 2
0
        /// <summary>
        /// Проверка конической поверхности
        /// </summary>
        /// <param name="Input"></param>
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, CMAPSurfaceC SurfaceC)
        {
            double height     = 100;
            bool   IsObstacle = false;
            double dif        = 0;

            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Граница района аэродрома";
            height += APInf.AirfieldHeight;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                if (CMGeoBase.IsPointInPolygon(SurfaceC.PointsList, Input.Coordinates) == false)
                {
                    CheckedResult.ResultText = "Попадает в границы района аэродрома";
                }
            }

            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;
            return(CheckedResult);
        }
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, double X)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Поверхность прерванной посадки";
            CheckedResult.PointHeight = Input.Height;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                PointLatLng temp = CMGeoBase.OtstupVPP(Offset, APInf.CRW.TakeoffSurfaceDirection, APInf.CRW.RunwayBegin.Coordinates);

                GeoCoordinate sCoord = new GeoCoordinate(temp.Lat, temp.Lng);
                GeoCoordinate eCoord = new GeoCoordinate(Input.Lat, Input.Lng);
                double        length = sCoord.GetDistanceTo(eCoord);
                double        angle  = CMGeoBase.Azimut(temp, Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayBegin.Coordinates, APInf.CRW.RunwayEnd.Coordinates);

                length *= Math.Cos(Math.Abs(angle) * CMGeoBase.DegToRad);
                CheckedResult.SurfaceHeight = HeightAngle * (Math.Abs(X) - 1800) + APInf.AirfieldHeight;

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }

                CheckedResult.ResultText = string.Format("Попадает в область прерванной посадки и {0} превышает допустимую высоту{1}", (CheckedResult.IsObstacle == true ? "" : " не "), (CheckedResult.IsObstacle == true ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }
            return(CheckedResult);
        }
Esempio n. 4
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = SurfaceName;//"Поверхность взлета";
            CheckedResult.PointHeight = Input.Height;

            if (CMGeoBase.IsPointInPolygon(PointsList, Input.Coordinates))
            {
                Visible = true;

                double Angle   = Math.Abs(CMGeoBase.Azimut(APInf.CRW.RunwayEnd.Coordinates, Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayBegin.Coordinates, APInf.CRW.RunwayEnd.Coordinates));
                double _length = CMGeoBase.GetDistance(Input.Coordinates, APInf.CRW.RunwayEnd.Coordinates) * Math.Cos(Angle * CMGeoBase.DegToRad);
                CheckedResult.SurfaceHeight = _length * HeightAngle;

                CheckedResult.SurfaceHeight += APInf.CRW.RunwayBegin.Height;

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }
                CheckedResult.ResultText = string.Format("Попадает в {0} и {1} превышает допустимую высоту{2}", SurfaceName, (CheckedResult.IsObstacle == true ? "" : " не "), (CheckedResult.IsObstacle == true ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }

            return(CheckedResult);
        }
Esempio n. 5
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, CMBAPSurfaceNoise APSurfaceNoiseInner)
        {
            double height     = 100;
            bool   IsObstacle = false;
            double dif        = 0;

            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = SurfaceName;//string.Format("Поверхность R-{0}", Radius);
            height += APInf.AirfieldHeight;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                if (CMGeoBase.IsPointInPolygon(APSurfaceNoiseInner.PointsList, Input.Coordinates) == false)
                {
                    CheckedResult.ResultText = string.Format("Попадает в {0}", SurfaceName);
                }
            }

            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;
            return(CheckedResult);
        }
Esempio n. 6
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, CMAPSurfaceB SurfaceB)
        {
            double height     = Height + APInf.AirfieldHeight;
            bool   IsObstacle = false;
            double dif        = 0;

            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = SurfaceName;


            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                if (CMGeoBase.IsPointInPolygon(SurfaceB.PointsList, Input.Coordinates) == false)
                {
                    CheckedResult.ResultText = string.Format("Попадает в {0}", SurfaceName);
                    if (Height > 0)
                    {
                        if (height <= Input.Height)
                        {
                            IsObstacle = true;
                            dif        = Input.Height - height;
                        }
                        CheckedResult.ResultText += string.Format(" и {0} превышает допустимую высоту {1} ", ((IsObstacle == true) ? "" : "не"), ((IsObstacle == true) ? (string.Format(" на {0} / {1}", Math.Round((Input.Height - height), 2), Math.Round(height, 2))) : ""));
                    }
                }
            }

            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;
            return(CheckedResult);
        }
Esempio n. 7
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, CMAPSurfaceB SurfaceB)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Горизонтальная поверхность";
            bool   IsObstacle = false;
            double dif        = 0;
            double height     = Height + APInf.AirfieldHeight;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                if (height <= Input.Height)
                {
                    IsObstacle = true;
                    dif        = Input.Height - height;
                }

                CheckedResult.ResultText = string.Format("Попадает во внутреннюю горизонтальную поверхность и {0} превышает допустимую высоту{1}", (IsObstacle == true ? "" : " не "), (IsObstacle == true ? string.Format(" на {0} / {1}", dif, height) : ""));
            }

            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;

            return(CheckedResult);
        }
Esempio n. 8
0
        /// <summary>
        /// Проверка на вхождение точки во внутреннюю горизонтальную поверхность
        /// </summary>
        /// <param name="Input">Проверяемая точка</param>
        public CMCGPCheckedResult CheckHorizSurface___(CMCheckedGeoPoint Input, CMAPSurfaceB SurfaceB)
        {
            double distance = CMGeoBase.GetDistance(Input, CMGeoBase.GetZone(Input, SurfaceB.Radius, APInf.CRW.TakeoffSurfaceDirection, APInf.CRW.RunwayBegin, APInf.CRW.RunwayEnd), APInf.CRW.RunwayBegin, APInf.CRW.RunwayEnd);

            double height = Height + APInf.AirfieldHeight; //HeightA + APInf.AirfieldHeight; //абсолютная высота внутренней горизонтальной поверхности

            bool   IsObstacle = false;
            double dif        = 0;

            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Горизонтальная поверхность";

            if (distance <= Radius)
            {
                if (height <= Input.Height)
                {
                    IsObstacle = true;
                    dif        = Input.Height - height;
                }

                CheckedResult.ResultText = string.Format("Попадает во внутреннюю горизонтальную поверхность и {0} превышает допустимую высоту{1}", (IsObstacle == true ? "" : " не "), (IsObstacle == true ? string.Format(" на {0} / {1}", dif, height) : ""));
            }


            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;

            return(CheckedResult);
        }
Esempio n. 9
0
        /// <summary>
        /// Проверка конической поверхности
        /// </summary>
        /// <param name="Input"></param>
        public CMCGPCheckedResult CheckConeSurface__(CMCheckedGeoPoint Input, CMAPSurfaceA SurfaceA)
        {
            double distance   = CMGeoBase.GetDistance(Input, CMGeoBase.GetZone(Input, Radius, APInf.CRW.TakeoffSurfaceDirection, APInf.CRW.RunwayBegin, APInf.CRW.RunwayEnd), APInf.CRW.RunwayBegin, APInf.CRW.RunwayEnd);
            double height     = HeigthPlaneB(distance, SurfaceA);
            bool   IsObstacle = false;
            double dif        = 0;

            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Коническая поверхность";

            ////если попал, считаем высоту
            height += APInf.AirfieldHeight;

            if (distance <= Radius)
            {
                if (distance > SurfaceA.Radius)
                {
                    if (height <= Input.Height)
                    {
                        IsObstacle = true;
                        dif        = Input.Height - height;
                    }
                    CheckedResult.ResultText = string.Format("Попадает в коническую поверхность и {0} превышает допустимую высоту {1} ", ((IsObstacle == true) ? "" : "не"), ((IsObstacle == true) ? (string.Format(" на {0} / {1}", Math.Round((Input.Height - height), 2), Math.Round(height, 2))) : ""));
                }
            }
            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;
            return(CheckedResult);
        }
Esempio n. 10
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Внутренняя поверхность захода на посадку";
            CheckedResult.PointHeight = Input.Height;


            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                double length = CMGeoBase.GetDistance(Input.Coordinates, APInf.CRW.RunwayBegin.Coordinates) - Offset;
                double angle  = Math.Abs(CMGeoBase.Azimut(CMGeoBase.OtstupVPP(Offset, APInf.CRW.TransitionSurfaceDirection, APInf.CRW.RunwayBegin.Coordinates), Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayEnd.Coordinates, APInf.CRW.RunwayBegin.Coordinates));
                length *= Math.Cos(angle * CMGeoBase.DegToRad);
                CheckedResult.SurfaceHeight = length * HeightAngle;
                //
                CheckedResult.SurfaceHeight += APInf.CRW.RunwayBegin.Height;
                //
                //TextResult.Text += CheckedResult.SurfaceHeight <= Input.Height ? "Попадает во внутренюю поверхность захода на посадку и превышает высоту на :" + (Input.Height - height).ToString() + " / " + height.ToString() + Environment.NewLine : " Попадает во внутренюю поверхность захода на посадку и не превышает высоту" + Environment.NewLine;

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }
                CheckedResult.ResultText = string.Format("Попадает во внутренюю поверхность захода на посадку и {0} превышает высоту{1}", (CheckedResult.IsObstacle ? "" : " не "), (CheckedResult.IsObstacle ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }


            return(CheckedResult);
        }
Esempio n. 11
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Переходная поверхность";
            CheckedResult.PointHeight = Input.Height;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates) || CMGeoBase.IsPointInPolygon(mPointsList2, Input.Coordinates))
            {
                CheckedResult.SurfaceHeight = HeightAngle * (Math.Abs(Input.Offset.Lng) - 150) + APInf.AirfieldHeight;

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }
                CheckedResult.ResultText = string.Format("Попадание в переходную плоскость и {0} превышает допустимую высоту{1}", (CheckedResult.IsObstacle == true ? "" : " не "), (CheckedResult.IsObstacle == true ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }

            return(CheckedResult);
        }
Esempio n. 12
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Полоса воздушных подходов";
            bool   IsObstacle = false;
            bool   Forward    = false;
            double dif        = 0;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                IsObstacle = true;
                Forward    = true;
            }

            if (CMGeoBase.IsPointInPolygon(mPointsList2, Input.Coordinates))
            {
                IsObstacle = true;
                Forward    = false;
            }

            if (IsObstacle)
            {
                CheckedResult.ResultText = string.Format("Попадает в {0}полосу воздушных подходов", (Forward == true ? "" : " обратную "));
            }

            CheckedResult.PointHeight = Input.Height;
            CheckedResult.Exceeding   = dif;
            return(CheckedResult);
        }
Esempio n. 13
0
 public CMFrmCheckedGeoPointEdt(CMAirPortInfo apinf, enumGeoPointType geodottype, double lat, double lng, double height = 0, string DotName = "")
 {
     InitializeComponent();
     mAPInf = apinf;
     //txtText.Text = DotName;
     mCheckedGeoPoint      = new CMCheckedGeoPoint(geodottype, lat, lng, height);
     mCheckedGeoPoint.Text = DotName;
 }
Esempio n. 14
0
        void StartCheck(CMCheckedGeoPoint STpoint)
        {
            FillPointSpec(STpoint);

            //TODO - убрать в класс
            STpoint.WriteResultCheck(string.Format("Lat {0}; Lng {1}", CMBaseGeoPoint.ShowDegMiSec(STpoint.Lat), CMBaseGeoPoint.ShowDegMiSec(STpoint.Lng)));
            STpoint.WriteResultCheck(string.Format("Азимут {0}; Дальность {1}; Абсолютная высота {2}", STpoint.Angle.ToString(), STpoint.Distance.ToString(), STpoint.Height.ToString()));
            STpoint.WriteResultCheck(string.Format("X ={0}; Y ={1}", STpoint.Offset.Lat.ToString(), STpoint.Offset.Lng.ToString()));


            // Проверка плоскостей
            //Перевести все проверки к такому виду
            STpoint.AddData(APSurfaces.SurfaceA.CheckSurface(STpoint, APSurfaces.SurfaceB));               //горизонтальная
            STpoint.AddData(APSurfaces.SurfaceB.CheckSurface(STpoint, APSurfaces.SurfaceA));               //коническая
            STpoint.AddData(APSurfaces.SurfaceC.CheckSurface(STpoint, APSurfaces.SurfaceB));               //круглая
            STpoint.AddData(APSurfaces.SurfaceOuterHorizontal.CheckSurface(STpoint, APSurfaces.SurfaceB)); //круглая
            STpoint.AddData(APSurfaces.SurfaceE.CheckSurface(STpoint, APSurfaces.SurfaceC));               //круглая
            STpoint.AddData(APSurfaces.SurfaceD.CheckSurface(STpoint, APSurfaces.SurfaceE));               //круглая

            STpoint.AddData(APSurfaces.SurfaceNoiseG.CheckSurface(STpoint));                               //Эллипс
            STpoint.AddData(APSurfaces.SurfaceNoiseV.CheckSurface(STpoint, APSurfaces.SurfaceNoiseG));     //Эллипс
            STpoint.AddData(APSurfaces.SurfaceNoiseB.CheckSurface(STpoint, APSurfaces.SurfaceNoiseV));     //Эллипс

            STpoint.AddData(APSurfaces.ApproachSurface.CheckSurface(STpoint));
            STpoint.AddData(APSurfaces.TakeoffSurface.CheckSurface(STpoint));
            STpoint.AddData(APSurfaces.TakeoffSurfaceInfo.CheckSurface(STpoint));

            STpoint.AddData(APSurfaces.InnerApproachSurface.CheckSurface(STpoint));
            STpoint.AddData(APSurfaces.CancelledApproachSurface.CheckSurface(STpoint, STpoint.Offset.Lat));
            STpoint.AddData(APSurfaces.InnerTransitionSurface.CheckSurface(STpoint, APSurfaces.InnerApproachSurface, APSurfaces.CancelledApproachSurface));
            STpoint.AddData(APSurfaces.TransitionSurface.CheckSurface(STpoint));
            STpoint.AddData(APSurfaces.APPVP_B.CheckSurface(STpoint));

            //Перевести все проверки к такому виду

            TextResult.Text += TextResult.Text.Length > 0 ? Environment.NewLine + "***********************************" + Environment.NewLine : "";
            TextResult.Text += STpoint.ResultCheck + Environment.NewLine;
            TextResult.Text += STpoint.CheckResult() + Environment.NewLine;

            mCheckedGeoPoin.Add(STpoint);
            rtxtDotDescription.Text  = STpoint.ResultCheck + Environment.NewLine;
            rtxtDotDescription.Text += STpoint.CheckResult();

            GMap.NET.WindowsForms.Markers.GMarkerGoogle marker = STpoint.GetGMarkerGoogle(GMap.NET.WindowsForms.Markers.GMarkerGoogleType.green);
            //marker.ToolTipText = STpoint.ResultCheck;

            marker.Tag = new CMBaseGeoPoint(STpoint.GeoDotType, mCheckedGeoPoin.Count - 1);
            polyOverlay.Markers.Add(marker);

            listBox1.Items.Add(STpoint.GetCaption());
        }
Esempio n. 15
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Поверхность захода на посадку";
            CheckedResult.PointHeight = Input.Height;

            if (CMGeoBase.IsPointInPolygon(PointsList, Input.Coordinates))
            {
                Visible = true;

                double angle  = Math.Abs(CMGeoBase.Azimut(APInf.CRW.RunwayBegin.Coordinates, Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayEnd.Coordinates, APInf.CRW.RunwayBegin.Coordinates));
                double length = CMGeoBase.GetDistance(Input.Coordinates, APInf.CRW.RunwayBegin.Coordinates) * Math.Cos(angle * CMGeoBase.DegToRad);


                if (length <= Length1)
                {
                    CheckedResult.SurfaceHeight = (length - Offset) * HeightAngle1;
                }
                else
                if (length > Length1 && length <= (Length1 + Length2))
                {
                    CheckedResult.SurfaceHeight = (length - (Length1 + Offset)) * HeightAngle2 + Length1 * HeightAngle1;
                }
                else
                {
                    CheckedResult.SurfaceHeight = Length2 * HeightAngle2 + Length1 * HeightAngle1;
                }

                CheckedResult.SurfaceHeight += APInf.CRW.RunwayBegin.Height;;

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }
                //TextResult.Text += height <= DataStorage.Height ? "Попадает в область захода на посадку и превышает допустимую высоту на "
                //                     + (DataStorage.Height - height).ToString() + " / " + height.ToString() + Environment.NewLine : "Попадает в область захода на посадку и не превышает допустимую высоту" + Environment.NewLine;
                CheckedResult.ResultText = string.Format("Попадает в область захода на посадку и {0} превышает допустимую высоту{1}", (CheckedResult.IsObstacle == true ? "" : " не "), (CheckedResult.IsObstacle == true ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));

                //   CheckedResult.ResultText = string.Format("Попадает во внутреннюю горизонтальную поверхность и {0} превышает допустимую высоту{1}", (IsObstacle == true ? "" : " не "), (IsObstacle == true ? string.Format(" на {0} / {1}", dif, height) : ""));
            }
            else
            {
                Visible = false;
            }


            return(CheckedResult);
        }
Esempio n. 16
0
        private void btnFileOpen_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string FileName = openFileDialog1.FileName;
                if (File.Exists(FileName))
                {
                    FileStream   FS = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
                    StreamReader sr = new StreamReader(FS, Encoding.Default);
                    btnClear_Click(sender, e);

                    while (sr.EndOfStream == false)
                    {
                        string sGeoPoint;
                        sGeoPoint = sr.ReadLine();

                        MatchCollection coll;
                        Regex           rStr = new Regex("^(?<PointName>[а-яА-Яa-zA-Z0-9 ]*)[;](?<LatDegree>[0-9]*)[;](?<LatMinutes>[0-9]*)[;](?<LatSeconds>[0-9.,]*)[;](?<LngDegree>[0-9]*)[;](?<LngMinutes>[0-9]*)[;](?<LngSeconds>[0-9.,]*)[;](?<Height>[0-9.,]*)[;](?<Description>[а-яА-Яa-zA-Z0-9 ]*)$");

                        coll = rStr.Matches(sGeoPoint);
                        if (coll.Count <= 0)
                        {
                            rStr = new Regex("^(?<PointName>[а-яА-Яa-zA-Z0-9 ]*)[;](?<LatDegree>[0-9]*)[;](?<LatMinutes>[0-9]*)[;](?<LatSeconds>[0-9.,]*)[;](?<LngDegree>[0-9]*)[;](?<LngMinutes>[0-9]*)[;](?<LngSeconds>[0-9.,]*)[;](?<X>[-0-9.,]*)[;](?<Y>[-0-9.,]*)[;](?<Angle>[-0-9.,]*)[;](?<Distance>[-0-9.,]*)[;](?<Height>[0-9.,]*)[;](?<Description>[а-яА-Яa-zA-Z0-9 ]*)$");

                            coll = rStr.Matches(sGeoPoint);
                        }

                        if (coll.Count > 0)
                        {
                            CMCheckedGeoPoint CheckedGeoPoint = new CMCheckedGeoPoint(enumGeoPointType.geoptObstacleDot);
                            CheckedGeoPoint.Text        = coll[0].Groups["PointName"].ToString();
                            CheckedGeoPoint.Height      = Convert.ToDouble(coll[0].Groups["Height"].ToString());
                            CheckedGeoPoint.Description = coll[0].Groups["Description"].ToString();
                            CheckedGeoPoint.Lat         = CMBaseGeoPoint.ShowDegreeFraction(Convert.ToDouble(coll[0].Groups["LatDegree"].ToString()), Convert.ToDouble(coll[0].Groups["LatMinutes"].ToString()), Convert.ToDouble(coll[0].Groups["LatSeconds"].ToString()));
                            CheckedGeoPoint.Lng         = CMBaseGeoPoint.ShowDegreeFraction(Convert.ToDouble(coll[0].Groups["LngDegree"].ToString()), Convert.ToDouble(coll[0].Groups["LngMinutes"].ToString()), Convert.ToDouble(coll[0].Groups["LngSeconds"].ToString()));

                            StartCheck(CheckedGeoPoint);
                        }
                    }

                    sr.Close();
                    FS.Close();
                    FS = null;
                }
            }
        }
Esempio n. 17
0
        public CMCGPCheckedResult CheckHorizSurface_(CMCheckedGeoPoint Input, CMAPSurfaceB SurfaceB)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Горизонтальная поверхность";
            bool   inZone     = false;
            bool   IsObstacle = false;
            double dif        = 0;
            double height     = Height + APInf.AirfieldHeight;
            int    Zone       = 0;



            List <PointLatLng> Plane1 = new List <PointLatLng>();

            Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse - 90, Radius).Coordinates);
            Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse + 90, Radius).Coordinates);
            Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse - 90, Radius).Coordinates);
            Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse + 90, Radius).Coordinates);

            if (CMGeoBase.IsPointInPolygon(Plane1, Input.Coordinates))
            {
                Zone = 1;
            }
            else
            {
                Plane1.Clear();
                Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse + 90, Radius).Coordinates);
                Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse - 90, Radius).Coordinates);
                Plane1.Add(CMGeoBase.GetCoordinate(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse, Radius), APInf.CRW.RunwayEnd.BackTrueCourse - 90, Radius).Coordinates);
                Plane1.Add(CMGeoBase.GetCoordinate(CMGeoBase.GetCoordinate(APInf.CRW.RunwayEnd, APInf.CRW.RunwayEnd.BackTrueCourse, Radius), APInf.CRW.RunwayEnd.BackTrueCourse + 90, Radius).Coordinates);

                if (CMGeoBase.IsPointInPolygon(Plane1, Input.Coordinates))
                {
                    Zone = 2;
                }
                else
                {
                    Plane1.Clear();
                    Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse + 90, Radius).Coordinates);
                    Plane1.Add(CMGeoBase.GetCoordinate(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse + 90, Radius), APInf.CRW.RunwayBegin.BackTrueCourse, Radius).Coordinates);
                    Plane1.Add(CMGeoBase.GetCoordinate(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse - 90, Radius), APInf.CRW.RunwayBegin.BackTrueCourse, Radius).Coordinates);
                    Plane1.Add(CMGeoBase.GetCoordinate(APInf.CRW.RunwayBegin, APInf.CRW.RunwayBegin.BackTrueCourse - 90, Radius).Coordinates);
                    if (CMGeoBase.IsPointInPolygon(Plane1, Input.Coordinates))
                    {
                        Zone = 3;
                    }
                }
            }

            switch (Zone)
            {
            case 1:
                inZone = true;
                break;

            case 2:
                if (CMGeoBase.GetDistance(APInf.CRW.RunwayEnd, Input) <= Radius)
                {
                    inZone = true;
                }

                break;

            case 3:
                if (CMGeoBase.GetDistance(APInf.CRW.RunwayBegin, Input) <= Radius)
                {
                    inZone = true;
                }
                break;

            default:
                break;
            }

            if (inZone)
            {
                if (height <= Input.Height)
                {
                    IsObstacle = true;
                    dif        = Input.Height - height;
                }

                CheckedResult.ResultText = string.Format("Попадает во внутреннюю горизонтальную поверхность и {0} превышает допустимую высоту{1}", (IsObstacle == true ? "" : " не "), (IsObstacle == true ? string.Format(" на {0} / {1}", dif, height) : ""));
            }



            CheckedResult.IsObstacle    = IsObstacle;
            CheckedResult.PointHeight   = Input.Height;
            CheckedResult.SurfaceHeight = height;
            CheckedResult.Exceeding     = dif;

            return(CheckedResult);
        }
Esempio n. 18
0
        public CMFrmCheckedGeoPointEdt(enumGeoPointType geodottype, double lat, double lng, double height = 0)
        {
            InitializeComponent();

            mCheckedGeoPoint = new CMCheckedGeoPoint(geodottype, lat, lng, height);
        }
Esempio n. 19
0
 public CMFrmCheckedGeoPointEdt(CMAirPortInfo apinf, enumGeoPointType geodottype, double lat, double lng, double height = 0)
 {
     InitializeComponent();
     mAPInf           = apinf;
     mCheckedGeoPoint = new CMCheckedGeoPoint(geodottype, lat, lng, height);
 }
Esempio n. 20
0
 public CMFrmCheckedGeoPointEdt(CMCheckedGeoPoint checkedgeopoint)
 {
     InitializeComponent();
     mCheckedGeoPoint = checkedgeopoint;
 }
Esempio n. 21
0
 public CMFrmCheckedGeoPointEdt(CMAirPortInfo apinf, CMCheckedGeoPoint checkedgeopoint)
 {
     InitializeComponent();
     mCheckedGeoPoint = checkedgeopoint;
     mAPInf           = apinf;
 }
Esempio n. 22
0
 public Report(CMCheckedGeoPoint value)
 {
     InitializeComponent();
     mCheckedGeoPoint = value;
 }
Esempio n. 23
0
        public CMCGPCheckedResult CheckSurface(CMCheckedGeoPoint Input, CMInnerApproachSurfaceData InnerApproachSurface, CMCancelledApproachSurfaceData CancelledApproachSurface)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Внутренняя переходная поверхность";
            CheckedResult.PointHeight = Input.Height;

            List <PointLatLng> temp1 = new List <PointLatLng>();

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates))
            {
                temp1 = mPointsList;
            }
            else
            if (CMGeoBase.IsPointInPolygon(mPointsList2, Input.Coordinates))
            {
                temp1 = mPointsList2;
            }

            if (temp1.Count > 0)
            {
                List <PointLatLng> temp2 = new List <PointLatLng>();

                temp2.Clear();
                temp2.Add(temp1[0]);
                temp2.Add(temp1[1]);
                temp2.Add(temp1[6]);

                if (CMGeoBase.IsPointInPolygon(temp2, Input.Coordinates))
                {
                    CheckedResult.SurfaceHeight = HeightAngle3 * (Math.Abs(Input.Offset.Lat) - 1800.0) + HeightAngle3Calc() * (Math.Abs(Input.Offset.Lng) - Width2 / 2) + APInf.CRW.RunwayBegin.Height1800;
                }
                else
                {
                    temp2.Clear();
                    temp2.Add(temp1[1]);
                    temp2.Add(temp1[2]);
                    temp2.Add(temp1[5]);
                    temp2.Add(temp1[6]);
                    if (CMGeoBase.IsPointInPolygon(temp2, Input.Coordinates))
                    {
                        CheckedResult.SurfaceHeight = HeightAngle * (Math.Abs(Input.Offset.Lng) - Width2 / 2) + APInf.CRW.RunwayBegin.AvgHeight1800;
                    }
                    else
                    {
                        temp2.Clear();
                        temp2.Add(temp1[2]);
                        temp2.Add(temp1[3]);
                        temp2.Add(temp1[4]);
                        temp2.Add(temp1[5]);
                        if (CMGeoBase.IsPointInPolygon(temp2, Input.Coordinates))
                        {
                            CheckedResult.SurfaceHeight = HeightAngle2 * (Math.Abs(Input.Offset.Lat) - offset2) + HeightAngle2Calc() * (Math.Abs(Input.Offset.Lng) - Width2 / 2) + APInf.CRW.RunwayBegin.Height;
                        }
                    }
                }

                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }

                CheckedResult.ResultText = string.Format("Попадает во внутреннюю переходную поверхность и {0} превышает высоту{1}", (CheckedResult.IsObstacle ? "" : " не "), (CheckedResult.IsObstacle ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }

            return(CheckedResult);
        }
Esempio n. 24
0
        public CMCGPCheckedResult CheckInnerTransitionSurface_(CMCheckedGeoPoint Input, CMInnerApproachSurfaceData InnerApproachSurface, CMCancelledApproachSurfaceData CancelledApproachSurface)
        {
            CMCGPCheckedResult CheckedResult = new CMCGPCheckedResult();

            CheckedResult.SurfaceName = "Внутренняя переходная поверхность";
            CheckedResult.PointHeight = Input.Height;

            if (CMGeoBase.IsPointInPolygon(mPointsList, Input.Coordinates) || CMGeoBase.IsPointInPolygon(mPointsList2, Input.Coordinates))
            {
                int    misc   = CMGeoBase.ZoneChecker(Input.Coordinates, mPointsList);
                double length = 0;
                double angle  = 0;

                GeoCoordinate eCoord = new GeoCoordinate(Input.Lat, Input.Lng);
                PointLatLng   temp1  = new PointLatLng();

                switch (misc)
                {
                case 1:
                {
                    temp1 = CMGeoBase.OtstupVPP(InnerApproachSurface.Offset, APInf.CRW.TransitionSurfaceDirection, APInf.CRW.RunwayBegin.Coordinates);
                    GeoCoordinate sCoord = new GeoCoordinate(temp1.Lat, temp1.Lng);
                    length = eCoord.GetDistanceTo(sCoord);
                    angle  = CMGeoBase.Azimut(temp1, Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayEnd.Coordinates, APInf.CRW.RunwayBegin.Coordinates);
                    //aa *= Math.Cos(Math.Abs(angle) * DegToRad);
                    double length2 = length * Math.Cos(Math.Abs(angle) * CMGeoBase.DegToRad);
                    double length3 = length * Math.Sin(Math.Abs(angle) * CMGeoBase.DegToRad);
                    CheckedResult.SurfaceHeight = length2 * InnerApproachSurface.HeightAngle;          //основание

                    double w1 = InnerApproachSurface.Width / 2 * 1000;
                    double w2 = Math.Abs(length3);
                    if (w2 > w1)
                    {
                        CheckedResult.SurfaceHeight += HeightAngle * (w2 - w1);
                    }
                    break;
                }

                case 2:
                {
                    length = CMGeoBase.GetDistance(Input, 2, APInf.CRW.RunwayBegin, APInf.CRW.RunwayEnd);
                    if (length > Width / 2)
                    {
                        CheckedResult.SurfaceHeight = (length - Width / 2) * HeightAngle;
                    }

                    break;
                }

                case 3:
                {
                    temp1 = CMGeoBase.OtstupVPP(CancelledApproachSurface.Offset, APInf.CRW.TakeoffSurfaceDirection, APInf.CRW.RunwayBegin.Coordinates);
                    GeoCoordinate sCoord = new GeoCoordinate(temp1.Lat, temp1.Lng);
                    length = eCoord.GetDistanceTo(sCoord);
                    angle  = CMGeoBase.Azimut(temp1, Input.Coordinates) - CMGeoBase.Azimut(APInf.CRW.RunwayBegin.Coordinates, APInf.CRW.RunwayEnd.Coordinates);
                    double length2 = length * Math.Cos(Math.Abs(angle) * CMGeoBase.DegToRad);
                    double length3 = length * Math.Sin(Math.Abs(angle) * CMGeoBase.DegToRad);
                    CheckedResult.SurfaceHeight = length2 * CancelledApproachSurface.HeightAngle;         //основание

                    //new
                    double Width1 = 60 + length2 * 0.1;
                    double Width2 = Math.Abs(length3);

                    if (Width2 > Width1)
                    {
                        CheckedResult.SurfaceHeight += HeightAngle * (Width2 - Width1);
                    }
                    break;
                }

                default: break;
                }
                //
                CheckedResult.SurfaceHeight += APInf.CRW.RunwayBegin.Height;
                //
                if (CheckedResult.SurfaceHeight <= Input.Height)
                {
                    CheckedResult.IsObstacle = true;
                    CheckedResult.Exceeding  = Input.Height - CheckedResult.SurfaceHeight;
                }

                CheckedResult.ResultText = string.Format("Попадает во внутреннюю переходную поверхность и {0} превышает высоту{1}", (CheckedResult.IsObstacle ? "" : " не "), (CheckedResult.IsObstacle ? string.Format(" на {0} / {1}", CheckedResult.Exceeding, CheckedResult.SurfaceHeight) : ""));
            }
            else
            {
                Visible = false;
            }
            return(CheckedResult);
        }