public bool RxProc(char rx) { string strRx = nmea0183.RxProc(rx); if (string.IsNullOrEmpty(strRx)) { return(false); } string[] Params = strRx.Split(','); if (Params[0] == ID) { if (bNMEA0183300) { if (Params.Length == 8) { Latitude = Params[1]; NorS = Params[2]; Longitude = Params[3]; EorW = Params[4]; UTCTime = Params[5]; State = Params[6]; Mode = Params[7].Substring(0, Params[7].IndexOf('*')); AllRx = strRx; return(true); } else if (Params.Length == 9) { Latitude = Params[1]; NorS = Params[2]; Longitude = Params[3]; EorW = Params[4]; UTCTime = Params[5]; State = Params[6]; Mode = Params[7]; AllRx = strRx; return(true); } } else if (Params.Length == 7) { Latitude = Params[1]; NorS = Params[2]; Longitude = Params[3]; EorW = Params[4]; UTCTime = Params[5]; // DateTime utc = DateTime.ParseExact(Params[5], "HHmmss.fff", null); // DateTime d = DateTime.SpecifyKind(utc, DateTimeKind.Utc); // DateTime d1 = d.ToLocalTime(); State = Params[6].Substring(0, Params[6].IndexOf('*')); AllRx = strRx; return(true); } } return(false); }
public bool RxProc(char rx) { string strRx = nmea0183.RxProc(rx); if (string.IsNullOrEmpty(strRx)) { return(false); } string[] Params = strRx.Split(','); if (Params[0] == ID) { if (Params.Length == 3) { Heading = Params[1]; True = Params[2].Substring(0, Params[2].IndexOf('*')); AllRx = strRx; return(true); } } return(false); }