# Development and Performance Assessment of a Low-Cost UAV Laser Scanner System (LasUAV)
## Materials and Methods
### Data Postprocessing and LiDAR Point Cloud Generation  
In postprocessing, laser scanner and INS binary data are decoded to a readable format via decoding routines. The laser scanner data are decoded in MATLAB (MathWorks Inc., Natick, MA, USA), and two files are generated by this process, one with the data about the laser pulses and one with the data about the returns. The INS data are first parsed by proprietary software (Binary Output Configuration Tools, VectorNav Technologies LLC, USA), and the output, still in binary format, is decoded in MATLAB. The GNSS RTK data are differentially corrected in postprocessing using RTKLIB [17], an open source program package for GNSS positioning.  
Figure 4: Details of the sensors integrated in the LasUAV and isolated by the case.  
Figure 5: Workflow of the laser scanner LUX 4L and GNSS/INS VN-300 data acquisition process.  
Once the data have been decoded, the next phase is the LiDAR point cloud generation. The first step is to interpolate the yaw, pitch, and roll based on the time of INS and latitude, longitude, and altitude based on the time of the GNSS RTK receiver to the time of the laser pulse transmission. In this way, a matrix with the laser scanner points and the associated position and orientation of the LiDAR sensor is generated. The second step is to generate the LiDAR point cloud by means of the LiDAR equation [18], which was adapted considering that the laser scanner acquires in four parallel layers. The position of the laser point is derived through the summation of three vectors after applying three appropriate rotation matrixes [18]. The position of each return was calculated using Equation (1):  
\[\overset{\rightarrow}{\mathrm{X}}_{\mathrm{G}}=\overset{\rightarrow}{ \mathrm{X}}_{0}+\mathrm{R}_{\omega,\phi,\kappa}\ \mathrm{R}_{\Delta\omega,\Delta\phi,\Delta\kappa}\ \overset{ \rightarrow}{\mathrm{P}}_{\mathrm{G}}+\mathrm{R}_{\omega,\phi,\kappa}\ \mathrm{R}_{\Delta\omega,\Delta\phi,\Delta\kappa}\ \mathrm{R}_{\alpha,\beta}\left[ \begin{array}{c}0\\ 0\\ -\overset{\rightarrow}{\rho}\end{array}\right] \tag{1}\]  
where \(\overset{\rightarrow}{\mathrm{X}}_{\mathrm{G}}\) represents the ground coordinates of the return; \(\overset{\rightarrow}{\mathrm{X}}_{0}\) represents the ground coordinates of the GNSS RTK antenna phase center; \(\overset{\rightarrow}{\mathrm{P}}_{\mathrm{G}}\) is the offset between the laser scanner and the GNSS RTK antenna phase center with respect to the laser scanner coordinate system (lever-arm offsets); and \(\overset{\rightarrow}{\rho}\) is the laser range vector, whose magnitude is equivalent to the distance from the laser firing point to its target. The term \(\mathrm{R}_{\omega,\phi,\kappa}\) stands for the rotation matrix relating the ground and INS coordinate systems; \(\mathrm{R}_{\Delta\omega,\Delta\phi,\Delta\kappa}\) represents the rotation matrix relating the INS and laser unit coordinate systems (bore-sighting angles); and \(\mathrm{R}_{\alpha,\beta}\) refers to the rotation matrix relating the laser unit and laser beam coordinate systems, with \(\alpha\) and \(\beta\) being the mirror scan angles [18].  
The lever-arm offset between the laser scanner and the GNSS RTK antenna phase center was measured in the laboratory. As the INS was mounted corresponding to the point of laser beam emission, it was not necessary to measure the lever-arm offset between the laser scanner and the INS.