/// <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); }
/// <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) { 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); }
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); }
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); }
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); }
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); }
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); }
/// <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); }
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); }
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); }
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); }
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); }
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); }
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); }