
User Manual LR-16F
OMEN-16F-202012
24
Appendix D: GPS code analysis
//GPS Timestam Parse and lidar Timestam Parse
var temp = new byte[4];
Buffer.BlockCopy(DataBytes, 1200, temp, 0, temp.Length);
// 1.Reverse
var t = temp.Reverse().ToArray();
var str1 = Convert.ToString(t[0], 2).PadLeft(8, '0');
var str2 = Convert.ToString(t[1], 2).PadLeft(8, '0');
var str3 = Convert.ToString(t[2], 2).PadLeft(8, '0');
var str4 = Convert.ToString(t[3], 2).PadLeft(8, '0');
//2.reassemble
var tt1 = $"{str1}{str2.Substring(0, 4)}".PadLeft(16,'0');
var tt2 = $"{str2.Substring(4, 4)}{str3}{str4}".PadLeft(24, '0');
var
a
=
IrAdvanced.ConvertBase(tt1,
2,
16).PadLeft(4,'0').ToHexBytes().Reverse().ToArray();
var
b
=
IrAdvanced.ConvertBase(tt2,
2,
16).PadLeft(8,'0').ToHexBytes().Reverse().ToArray();
//Second(uint16)
TimeS = BitConverter.ToUInt16(a, 0);
//Microsecond(uint32)
TimeM = (int)BitConverter.ToUInt32(b, 0);
// $"Second:{TimeS} Microsecond:{TimeM}".ToDebug();
return true;
Appendix E: analysis of 3D lidar coordinate code
public class Lpoint3DTemp:Lpoint3D
{
/// <summary> Temperature correction factor </summary>
public int Temperature { get; set; } = 0;
public override void Init()
{
R = R - SubConst - Temperature;
var ang = (Angle + Ch * 0.00108 * 10) * Math.PI / 180; // Horizontal angle
linear error compensation
var wTemp = W * Math.PI / 180; //Angle radian conversion
/*
Definitions
:
The measured distance output by each channel of the radar is set as R.
(
Note
that the unit of the radar input is 2mm, please convert to 1mm first)
Rotating speed of radar is set as H (usually 10Hz)
The vertical angle of each channel of the radar is set as ω
The horizontal angle output by the radar is set as α