Take the radial distance calculation as an example:
Chn_radius is 2-byte long, the unit is centimeters (cm), and the resolution is 0.5 cm.
Get the hexadecimal number of the radius value of a channel in the data packet: R1 is 0x03, R2 is
0xfc
0x03 is the high digit of the distance, converted to decimal is 3, 0xfc is the low digit of the distance,
converted into decimal is 252.
Therefore: the radial distance of this channel=R1*256+R2=3*256+252=1020.
According to the resolution of the coordinates, it is converted to meters: 1020 *0.005=5.10m.
Therefore, the radial distance of this channel in the corresponding elevation and azimuth direction is
5.1 m.
Calculation of XYZ coordinates:
Use Wireshark to capture the data packets of RS-Lidar-M1, as shown in the figure below:
Example of parameters calculation:
1. time_offset: data block time offset HEX: 0x00 -> DEC: 00 -> 0 ㎲
2. return_seq: HEX: 0x00 -> single return
3. radius: radial distance HEX: 0x0a,0x77 -> DEC: 10, 119
-> radius = (10 x256 + 119) x0.005 [m] = 13.395 m
4. elevation: vertical angle HEX: 0x83,0xa2 -> DEC: 131,162
-> elevation = ((131 x 256 + 162)-32768) x 0.01[degree] = 9.3
o