# Acquisition and Processing of UAV Fault Data Based on Time Line Modeling Method
## 3 The Design of Simulation Environments and Simulation Tasks
### GPS Parameter Adjustment  
The Number of Visible Satellites is an important indicator of whether the UAV experienced GPS failure. In the simulation experiment, the \"Number of Visible Satellites\" variation range is too obvious. When the GPS signal is normal, the value of \"Number of Visible Satellites\" is always 10; when the GPS signal is abnormal, the value is always 3. In  
Figure 5: Changes in waypoints before and after using interpolation and the Savitzky-Golay algorithm.  
Figure 6: The trajectory of the UAV under QGroundControl during fault simulation.  
the actual flight process, the \"Number of Visible Satellites\" change is jittered, so a jitter should be added to this feature. In the real situation, the value of the \"Number of Visible Satellites\" is between 15 and 20 when no one is flying normally, and the value is between 5 and 10 when there is a GPS failure [20].  
The function of Equation (3) is used to generate the \"Number of Visible Satellites\" when the GPS fails and when the GPS works normally. In Equation (3), \(x\in[Min_{Sate},Max_{Sate}]\), \(f(x)\in[0,Max_{Sate}]\), where \(\mu\) is the parameter controlling the curvature of the curve, \(\mu\in(0,\infty)\); the smaller the \(\mu\), the gentler the curve, and the larger the \(\mu\), the steeper the curve. \(Min_{Sate}\) is the minimum number of satellites generated, \(Max_{Sate}\) is the maximum number of satellites generated, and \(Min_{Sate},Max_{Sate}\in N^{*}\).  
Take \(Min_{Sate}\) as 3 and \(Max_{Sate}\) as 10 in the fault state, at this time \(x\in[3,10]\), \(f(x)\in[0,10]\). The Number of Visible Satellites is 0, which means that there is no satellite to provide services for the UAV under the GPS failure state, and the Number of Visible Satellites is 10, which means that the GPS service provider can provide the maximum number of GPS usage in the GPS failure state. Take \(Min_{Sate}\) as 8 and \(Max_{Sate}\) as 20 in the normal state, at this time \(x\in[8,20]\), \(f(x)\in[0,20]\). The Number of Visible Satellites generated is between 0 and 20, and the number of satellites taken at this time is 8 to 20. The Number of Visible Satellites is 8, which is the number of GPS required to maintain the normal flight of the drone under normal GPS conditions. The Number of Visible Satellites is 20, which is the maximum number of GPS usages that the GPS service provider can provide when the GPS is working normally.  
\[f(x)=\frac{Max_{Sate}}{\sqrt{2\pi}*\mu}e^{-(\frac{(x-Max_{Sate})^{2}}{2*(\mu)^ {2}})} \tag{3}\]  
The \"Number of Visible Satellites\" produced by Equation (3) follows a normal distribution. The graphs produced by Equation (1) under normal and abnormal conditions are shown in Figure 7. The solid orange line represents the image of the \"Number of Visible Satellites\" generated by when the GPS fails, and the dotted orange line represents the unused value range beyond the specified range. The solid gray line represents the \"Number of Visible Satellites\" function image generated when the GPS is normal. The gray dotted line represents the unused value range beyond the specified range.  
The change in the \"Number of Visible Satellites\" before and after adding dithering is shown in Figure 8. As shown in Figure 8a, before adding dithering, the value of \"Number of Visible Satellites\" is 3 or 10; after adding jitter, it has more abundant values.  
Figure 7: \(f(x)\) under normal and abnormal GPS conditions.