Пример #1
0
 public IndexData(DateTime packetTimeStamp, DateTime internalTimeStamp, long position, String nmea)
 {
     this.PacketTimeStamp   = packetTimeStamp;
     this.Nmea              = VelodyneNmeaPacket.Parse(nmea);
     this.InternalTimeStamp = internalTimeStamp;
     this.Position          = position;
 }
Пример #2
0
        public static VelodyneNmeaPacket ReadRecordNMEA(byte[] packet)
        {
            int    i  = 42 + 198;
            double ts = BitConverter.ToUInt32(new byte[] { packet[i], packet[i + 1], packet[i + 2], packet[i + 3] }, 0) / 1000000.00;

            i = i + 8;
            byte[] nmeaMessageArray = new byte[75];
            for (int j = 0; j < 75; j++)
            {
                nmeaMessageArray[j] = packet[i + j];
            }

            String             nmeaStr    = System.Text.Encoding.ASCII.GetString(nmeaMessageArray);
            VelodyneNmeaPacket nmeaPacket = VelodyneNmeaPacket.Parse(nmeaStr);

            return(nmeaPacket);
        }