//private int count = 0; public override void Clot(Sector center, Sector nextSector, Sector preSector, AzimuthCell[] cells) { base.Clot(center, nextSector, preSector, cells); List<TargetDot> dots = ClotAzCells(new List<AzimuthCell>(cells)); foreach (var targetDot in dots) { if (center.IsAngleInArea(targetDot.Az)) center.AddNewDot(targetDot); if(nextSector.IsAngleInArea(targetDot.Az)) nextSector.AddPrepareDot(targetDot); if (preSector.IsAngleInArea(targetDot.Az)) preSector.AddPrepareDot(targetDot); } center.LoadPrepareDots(); NotifyUpdateSectorDot(center); //通知更新该扇区的目标点视图 }
protected void ShowOriginalVideo(Sector center, Sector right, Sector left, AzimuthCell[] cells) { foreach (AzimuthCell cell in cells) { foreach (object o in cell.DisCells.Values) { if (center.IsAngleInArea(cell.GetAngle())) { DistanceCell dis = (DistanceCell)o; TargetDot dot = new TargetDot(cell.GetAngle(), dis.el, dis.Distance) { AmValue = dis.sumAM }; center.AddNewDot(dot); } } } }
public override void Clot(Sector center, Sector right, Sector left, AzimuthCell[] cells) { List <TargetDot> dots = new List <TargetDot>(); MoveNewDotToOldDot(center); //上周期的新目标点变为本周起的自由点 foreach (AzimuthCell cell in cells) //将方位单元格中的每个距离单元格生成一个目标点 { dots.AddRange ( from DistanceCell dis in cell.DisCells.Values where !dis.adopted select new TargetDot(cell.GetAngle(), dis.el, dis.Distance) ); } List <TargetDot> ls = dots; for (int i = ls.Count - 1; i >= 0; i--) //从后向前遍历所有点,距离<50的点直接取均值,从后向前合并 { for (int j = i - 1; j >= 0; j--) { if (ls[i].DistanceTo(ls[j]) < 5) { ls[j] = ls[i].GetMiddleDot(ls[j]); ls.RemoveAt(i); break; } } } foreach (TargetDot dot in dots) { if (center.IsAngleInArea(dot.Az)) { center.AddNewDot(dot); } } NotifyUpdateSectorDot(center); //通知更新该扇区的目标点视图 }
public override void Clot(Sector center, Sector right, Sector left, AzimuthCell[] cells) { MoveNewDotToOldDot(center); foreach (AzimuthCell cell in cells) { foreach (object o in cell.DisCells.Values) { if (center.IsAngleInArea(cell.GetAngle())) { DistanceCell dis = (DistanceCell)o; TargetDot dot = new TargetDot(cell.GetAngle(), dis.el, dis.Distance) { AmValue = dis.sumAM }; center.AddNewDot(dot); } } } NotifyUpdateSectorDot(center); //通知更新该扇区的目标点视图 }