Ublox-M8N GPS接收机UBX协议解析
//============================================代码补充===============================================//
参考github项目:https://github.com/loginov-rocks/UbxGps
//==================================================================================================//
原始数据:
B5 62 01 03 10 00 D0 EC C2 0C 03 DD 00 FC69 27 00 00 21 78 01 00 A4 3F
B5 62 01 02 1C 00 D0 EC C2 0C 48 64 14 41 B7 9F 7C 14 09 25 07 00 5F 90 07 007E 21 00 00 B5 14 00 00 23 06
B5 62 01 12 24 00 D0 EC C2 0C B9 FF FF FF07 00 00 00 07 00 00 00 48 00 00 00 47 00 00 00 21 AB 08 01 57 00 00 00 1B 0825 00 88 18
B5 62 01 06 34 00 98 ED C2 0C 30 A0 05 00 94 07 03 DD 19 1E AD F5 AF 7E AB 1D06 D2 57 15 F2 03 00 00 EE FF FF FF 1A 00 00 00 C4 FF FF FF 57 00 00 00 84 0102 05 AC 4C 02 00 88 0F
1. Class0x01, ID 0x03
B5 62 01 03 10 00 08 EC C2 0C 03 DD 00 FC 6927 00 00 59 77 01 00 13 9C
解析:
B5 62:协议Header.
01: Class 0x01.
03: ID 0x03.
08 EC C2 0C:Name: iTOW; Unit: ms; Description: GPS time of Week ofthe navigation epoch.
03: Name:gpsFix; Description:0x03=3D-fix;
DD: Name:flags; Description:Navigation Status Flags;
13 9C:校验位,下同(最后两位).
2. Class0x01, ID 0x02
B5 62 01 02 1C 00 08 EC C2 0C 4A 64 14 41 B5 9F 7C 14 BE 24 07 00 14 90 07 00 63 21 00 00 BA 14 00 00 AE 27
解析:
B5 62:协议Header.
01: Class 0x01.
02: ID 0x02.
08 EC C2 0C:Name: iTOW; Unit: ms; Description: GPS time of Week ofthe navigation epoch.
4A 64 14 41:Name:lon; Unit: deg;Description: Longitude;经度------------ E,由低位向高位依次读取,下同。
B5 9F7C 14:Name:lat; Unit: deg; Description:Latitude; 纬度----------- N
BE 24 07 00:Name:height; Unit: mm;Description: Height above ellipsoid;离地高度--4.68158m
14 90 07 00:Name:hMSL; Unit: mm;Description: Height above mean sea level;海拔高度
63 21 00 00:Name:hAcc; Unit: mm;Description: Horizontal accuracy estimate;水平精度
BA 14 00 00:Name:vAcc; Unit: mm;Description: Vertical accuracy estimate;垂直精度
3. Class0x01, ID 0x12
B5 62 01 12 24 00 08 EC C2 0C B4 FF FF FF 0A 00 00 00 08 00 00 00 4D 00 00 00 4C 00 00 00 18 94 07 01 57 00 00 00 46 9C 22 00 64 67
解析:
B5 62:协议Header.
01: Class 0x01.
12: ID 0x12.
08 ECC2 0C: Name: iTOW; Unit: ms;Description: GPS time of Week of the navigation epoch.
B4 FF FF FF: Name: velN; Unit: cm/s; Description:North velocity component.
0A 00 00 00: Name: velE; Unit: cm/s; Description: Eastvelocity component.
08 00 00 00: Name: velD; Unit: cm/s; Description: Downvelocity component.
4D 00 00 00: Name: speed; Unit: cm/s; Description:Speed(3-D).
4C 00 00 00: Name: gSpeed; Unit: cm/s; Description:Ground speed(2-D).
18 94 07 01: Name: heading; Unit: cm/s; Description:Heading of motion 2-D.
57 00 00 00: Name: sAcc; Unit: cm/s; Description: Speedaccuracy Estimate.
46 9C 22 00: Name: cAcc; Unit: deg; Description:Course/Heading accuracy estimate.
4. Class0x01, ID 0x06
B5 62 01 06 3400 D0 EC C2 0C 59 A0 05 00 94 07 03 DD 16 1E AD F5 B3 7E AB 1D F9 D1 57 15 F0 03 00 00 EE FF FF FF 1E 00 00 00 C2 FF FF FF 57 00 00 00 84 01 02 05 AC 4C 02 00 DB 3D
解析:
B5 62:协议Header.
01: Class 0x01.
06: ID 0x06.
D0 EC C2 0C:Name: iTOW; Unit: ms; Description: GPS time of Week ofthe navigation epoch.
59 A0 05 00:Name: fTOW; Unit: ns; Description: Fractional part ofiTOW(range:+/-50000).
94 07: Name: week; Unit: weeks; Description: GPS weeks number of thenavigation epoch;
03: Name:gpsFix; Description:0x03=3D-fix;
DD: Name: flags; Description: Fix Status Flags;
16 1E AD F5: Name: ecefX; Unit: cm; Description: ECEF Xcoordinate;地心坐标系---X
B3 7E AB 1D: Name: ecefY; Unit: cm; Description: ECEF Ycoordinate;地心坐标系---Y
F9 D1 57 15: Name: ecefZ; Unit: cm; Description: ECEF Zcoordinate; 地心坐标系---Z
------------------------------------------------------------------------------------------------
实测数据:
B5 62 01 03 10 00 D0 EC C2 0C 03 DD 00 FC69 27 00 00 21 78 01 00 A4 3F
B5 62 01 02 1C 00 D0 EC C2 0C 48 64 14 41 B7 9F 7C 14 09 25 07 00 5F 90 07 007E 21 00 00 B5 14 00 00 23 06
B5 62 01 12 24 00 D0 EC C2 0C B9 FF FF FF07 00 00 00 07 00 00 00 48 00 00 00 47 00 00 00 21 AB 08 01 57 00 00 00 1B 0825 00 88 18
B5 62 01 06 34 00 98 ED C2 0C 30 A0 05 00 94 07 03 DD 19 1E AD F5 AF 7E AB 1D06 D2 57 15 F2 03 00 00 EE FF FF FF 1A 00 00 00 C4 FF FF FF 57 00 00 00 84 0102 05 AC 4C 02 00 88 0F
B5 62 01 03 10 00 98 ED C2 0C 03 DD 00 FC69 27 00 00 E9 78 01 00 35 EE
B5 62 01 02 1C 00 98 ED C2 0C 46 64 14 41 C2 9F 7C 14 26 25 07 00 7C 90 07 0095 21 00 00 B1 14 00 00 42 81
B5 62 01 12 24 00 98 ED C2 0C BD FF FF FF 09 00 00 00 08 00 00 00 44 00 00 0043 00 00 00 29 17 08 01 57 00 00 00 B4 39 27 00 90 9A
B5 62 01 06 34 00 60 EE C2 0C 06 A0 05 00 94 07 03 DD 19 1E AD F5 B2 7E AB 1D08 D2 57 15 F3 03 00 00 F0 FF FF FF 1D 00 00 00 C3 FF FF FF 58 00 00 00 84 0102 05 AC 4C 02 00 32 32
----------------Powerd By Dawn