public static string[] IN18toSTR(Model.INF_B562_0118 IN18) { string[] a = new string[2]; switch (IN18.stat) { case 0: a[0] = "NO solution"; break; case 1: a[0] = "FIX"; break; case 2: a[0] = "Float"; break; case 3: a[0] = "SBAS"; break; case 4: a[0] = "DGPS/DGNSS"; break; case 5: a[0] = "SINGLE"; break; } a[1] = IN18.Rsetn.ToString(); return(a); }
/// <summary> /// 流动站坐标ECEF转经纬度 /// </summary> /// <param name="IN18"></param> /// <returns></returns> public static double[] Ecef2Pos18(Model.INF_B562_0118 IN18) { double[] r = { IN18.Recefx, IN18.RecefY, IN18.Recefz }; double[] pos = new double[3]; CoordinateConverter.ecef2pos(r, pos); return(pos); }
/// <summary> /// IN18流动站数据解析 /// </summary> /// <param name="Data"></param> /// <param name="IN18"></param> public static void ParseDataIN18(byte[] Data, Model.INF_B562_0118 IN18) { for (int i = 0; i < Data.Length - 6; i++) { if ((Data[i] == 0xB5) && (Data[i + 1] == 0x62)) { if ((Data[i + 2] == 0x01) && (Data[i + 3] == 0x18)) { ushort len = BitConverter.ToUInt16(Data, i + 4); if (Data.Length - i - 8 >= len) { byte[] buffer = Data.Skip(i + 2).Take(len + 6).ToArray(); if (Protocol_UBX.Checksum(buffer)) { byte[] payload = buffer.Skip(4).Take(len).ToArray(); IN18 = Protocol_UBX.RoverStation(payload); break; } } } } } }
public static double[] ENUspeed(Model.INF_B562_0118 IN18) { double[] m = new double[3]; return(m); }