## 2 Materials and Methods
### PTP Implementation  
The data acquisition system designed in this paper is mainly applied to fast-moving crop phenotype acquisition platforms (such as UAV, greenhouse high-speed rail-guided platforms, etc.) [26]. To reduce costs, a relative time synchronization protocol that does not rely on an external clock and can synchronize each node to a time reference is selected to achieve time synchronization of multiple sensors. Therefore, this system selects inexpensive timing boards, gateways, and the LinuxPTP software package (linuxptp \(-\)4.0) with strong adaptability, universality, and stability. By building the PTP between the MAC and physical layers, synchronous acquisition and transmission of data between each component are realized.  
The system requires three timing boards to ensure the synchronization of the acquisition time of the three acquisition devices: the visible light camera, the near-infrared camera, and the lidar. After the three timing boards are powered on and started, the ptp4l and phc2 sys programs in the LinuxPTP software package are automatically run. The ptp4l program is used to achieve PTP clock synchronization between multiple devices, and the phc2 sys program is responsible for synchronizing the PTP clock and the system clock within a single device. It has been verified that when the \"hardware timestamp\" mode is selected in the ptp4l program and IEEE 802.3 network transmission is used, the PTP clock synchronization accuracy between the timing boards is better than that in the \"software timestamp\" mode. The phc2 sys program was set so that the system clock follows the PTP clock of the device.  
During PTP initialization, the Best Master Clock Algorithm (BMCA) was used to determine the master clock. Its principle is to automatically select the master clock of the PTP clock of timing board 1 by comparing the priority, clock level, accuracy, offset, time source, and other attributes of the participating clock devices [27]. When the PTP enters the normal working stage, the PTP clocks of timing boards 2 and 3 follow and synchronize with the PTP clock of timing board 1 (the master clock), and the system clocks of each timing board follow and synchronize with the PTP clocks within their respective devices. The system clocks of each timing board use the PTP clocks within their respective devices as an intermediate medium, and finally, the system clocks of each timing board are synchronized with the PTP clock of timing board 1. The specific clock-following and synchronization relationship, along with the flowchart for establishing the clock relationship in the PTP domain, are shown in Figure 2.  
\begin{table}
\begin{tabular}{c c c c} \hline
**No.** & **Item** & **Model** & **Main Parameters** & **Equipment Picture** \\ \hline \multirow{5}{*}{5} & \multirow{5}{*}{Lidar} & \multicolumn{3}{c}{Laser wavelength: 905 nm} \\  & & & FOV: 360\({}^{\circ}\)\(\times\) 59 & \\  & & & Distance random error (1\(\sigma\)): \(\leq\)2 cm (@10 m); \(\leq\)3 cm (@0.2 m) & \\  & & & Angular random error (1\(\sigma\)): \(<\)0.15\({}^{\circ}\) & \\  & & & Point cloud output: 200,000 points/second & \\  & & & Point cloud frame rate: 10 Hz (typical) & \\  & & & Data Port: 100 BASE-TX Ethernet & \\  & & Guangruntong & & Ports: 2 ports \\  & & Gigabit Dual Port & Connor: RJ45 \\  & & RJ45 Network Card & Speed: 5 GT/S & \\  & & F902T-V4.0 & Slot Width: \(\times\)4 Lane & \\ \hline \end{tabular}  
All technical specifications are taken from the product manual.  
\end{table}
Table 1: _Cont._