Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
        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);
            }
        }