static public Rtcm2Header2 Parse(string binString) { Rtcm2Header2 RtcmHeader = new Rtcm2Header2(); if (binString.Length != 30) { throw new Exception("应该是30位。"); } RtcmHeader.CharString = binString; RtcmHeader.FixZCount = Convert.ToInt32(binString.Substring(0, 13), 2); //转回十进制 RtcmHeader.SerialNumber = Convert.ToInt32(binString.Substring(13, 3), 2); //转回十进制 RtcmHeader.FrameLength = Convert.ToInt32(binString.Substring(16, 5), 2); //转回十进制 RtcmHeader.HealthStatus = Convert.ToInt32(binString.Substring(21, 3), 2); //转回十进制 RtcmHeader.CheckBit = Convert.ToInt32(binString.Substring(24, 6), 2); //转回十进制 return(RtcmHeader); }
public Rtcm2Header(Rtcm2Header1 RtcmByte1, Rtcm2Header2 RtcmByte2) { this.RtcmByte1 = RtcmByte1; this.RtcmByte2 = RtcmByte2; }