public static void BufferManger(CASSubSegment subSegmentFromUdp) { if (subSegmentFromUdp.segID == 1) { if (segToBuffer != null) { if (segToBuffer.IsValid) { //if(segToBuffer.Data.Count < 192*64) //{ BeamsBuffer.WriteBeamsFromDictionary(segToBuffer.GetBeamsValues()); BeamsBuffer.Heading = segToBuffer.Heading; //} } } segToBuffer = new CASSegment(subSegmentFromUdp); } else { if (segToBuffer != null) { segToBuffer.AddSubSegment(subSegmentFromUdp); } } }
public static void onReceiveTracks(SystemTracks trackData) { double heading = BeamsBuffer.Heading; //retreive the actual beams from the BeamBuffer byte[][] beamArray = BeamsBuffer.getBeamsAndFlush(); if (beamArray == null) { return; } foreach (var track in trackData.systemTracks) { TrackBeamData trackBeamData = CalcBeams(track.trackID, heading, track.relativeBearing, beamArray); TrackBeamDataSender.sendTrackBeamData(trackBeamData); } }