Keywords

1 Introduction

Since general aviation aircraft do not have advanced communication facilities, General Aviation cannot monitor real track curves like civil aviation. In practice, the navigation track monitoring can only detect discrete points of the navigation path of the navigable aircraft. This is very unfavorable for the recording, research and planning of the navigation path of the navigable aircraft, and there are huge security risks [6]. This paper expects to use the cubic spline method to process the discrete points of the track and make it a smooth track curve, so as to realize the monitoring and processing of the general aviation aircraft track.

2 Navigation Path Smoothing Algorithm Based on Cubic Spline Curve

2.1 Algorithm Principle

The basic idea of the algorithm is to construct a cubic curve equation between two adjacent points of the unsmooth track, and obtain the interpolation between the two points according to the curve equation. Then, the track points and the interpolation points are sequentially connected by a straight line according to the time. When the density of the track point and the interpolation point reaches a certain level, the track can reach a smooth state [2, 5].

First, a cubic spline function is generated between two points, and N interpolation points are determined according to the obtained cubic spline function. The main function of the algorithm in this process is to process the flight data of the aircraft we are monitoring, including the geographic coordinate points of the aircraft flight and the heading angle of the aircraft at that point. Then through the coordinates of the two discrete tracks, we can find the cubic spline function between these two points.

To simplify the calculation, this derivation will use the coordinate vector method [3]. Let two points \( P_{1} \) and \( P_{2} \) be known, as shown in Fig. 1. Since the cubic spline function is a cubic equation, we can set the three-parameter vector equation of the curve over \( P_{1} \) and \( P_{2} \) to the following form.

Fig. 1.
figure 1

Description of unknown meaning

$$ {\text{P}}\left( {\text{t}} \right) = B_{0} + B_{1} t + B_{2} t^{2} + B_{3} t^{3} \quad \left( {0 \le t \le t_{1} } \right) $$
(1)

The meaning of each unknown is shown in Fig. 1.

When \( {\text{t}} = 0 \), the curve passes through point \( P_{1} \), and the tangent vector of the curve segment at that point is \( P_{1}^{{\prime }} \). When \( {\text{t}} = t_{1} \), the point \( P_{2} \) is passed, and the tangent vector of the curve segment at this point is \( P_{2}^{{\prime }} \), as shown in Fig. 2.

Fig. 2.
figure 2

Vector description of discrete track points

Derivation of Eq. (1) once.

$$ P^{{\prime }} \left( t \right) = B_{1} + 2B_{2} t + 3B_{3} t^{2} $$
(2)

When \( {\text{t}} = 0 \), the following expression can be derived from the Eqs. (1) and (2).

$$ {\text{P}}\left( 0 \right) = B_{0} = P_{1} $$
(3)
$$ P^{{\prime }} \left( 0 \right) = B_{1} = P_{1}^{{\prime }} $$
(4)

When \( {\text{t}} = t_{1} \).

$$ {\text{P}}\left( {t_{1} } \right) = B_{0} + B_{1} t_{1} + B_{2} t_{1}^{2} + B_{3} t_{1}^{3} = P_{2} $$
(5)
$$ P^{{\prime }} \left( {t_{1} } \right) = B_{1} + 2B_{2} t_{1} + 3B_{3} t_{1}^{2} = P_{2}^{{\prime }} $$
(6)

By combining the formulas (3), (4), (5) and (6), \( B_{0} \), \( B_{1} \), \( B_{2} \), and \( B_{3} \) can be solved.

$$ B_{0} = P_{1} $$
$$ B_{1} = P_{1}^{{\prime }} $$
$$ B_{2} = \frac{3}{{t_{1}^{2} }}\left( {P_{2} - P_{1} } \right) - \frac{1}{{t_{1} }}\left( {P_{2}^{{\prime }} + 2P_{1}^{{\prime }} } \right) $$
$$ B_{3} = - \frac{2}{{t_{1}^{3} }}\left( {P_{2} - P_{1} } \right) + \frac{1}{{t_{1}^{2} }}\left( {P_{2}^{{\prime }} + P_{1}^{{\prime }} } \right) $$

The coefficients \( B_{0} \), \( B_{1} \), \( B_{2} \), and \( B_{3} \) are substituted into the vector Eq. (1) and sorted.

$$ \begin{aligned} {\text{P}}\left( {\text{t}} \right) & = \left[ {1 - 3\left( {\frac{t}{{t_{1} }}} \right)^{2} + 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]P_{1} + \left[ {3\left( {\frac{t}{{t_{1} }}} \right)^{2} - 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]P_{2} \\ & + \left[ {\left( {\frac{t}{{t_{1} }}} \right) - 2\left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]P_{1}^{{\prime }} + \left[ { - \left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]P_{2}^{{\prime }} \\ \end{aligned} $$
(7)

Equation (7) is the vector form of the cubic polynomial parametric equation passing through two points. Its component form can be expressed as follows.

$$ \begin{aligned} {\text{x}}\left( {\text{t}} \right) & = \left[ {1 - 3\left( {\frac{t}{{t_{1} }}} \right)^{2} + 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]x_{1} + \left[ {3\left( {\frac{t}{{t_{1} }}} \right)^{2} - 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]x_{2} \\ & + \left[ {\left( {\frac{t}{{t_{1} }}} \right) - 2\left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]x_{1}^{{\prime }} + \left[ { - \left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]x_{2}^{{\prime }} \\ \end{aligned} $$
(8)
$$ \begin{aligned} {\text{y}}\left( {\text{t}} \right) & = \left[ {1 - 3\left( {\frac{t}{{t_{1} }}} \right)^{2} + 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]y_{1} + \left[ {3\left( {\frac{t}{{t_{1} }}} \right)^{2} - 2\left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]y_{2} \\ & + \left[ {\left( {\frac{t}{{t_{1} }}} \right) - 2\left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]y_{1}^{{\prime }} + \left[ { - \left( {\frac{t}{{t_{1} }}} \right)^{2} + \left( {\frac{t}{{t_{1} }}} \right)^{3} } \right]y_{2}^{{\prime }} \\ \end{aligned} $$
(9)

Equations (8) and (9) are the result of processing the two adjacent discrete track points by the general aviation track smoothing algorithm, that is, the component representation of the cubic spline curve between two points. However, the first derivatives \( x_{1}^{{\prime }} \), \( x_{2}^{{\prime }} \), \( y_{1}^{{\prime }} \) and \( y_{2}^{{\prime }} \) at points \( P_{1} \) and \( P_{2} \) in Eqs. (8) and (9) are still unknown. In order to determine these four unknown first-order derivatives, the algorithm needs to process the monitored heading angle to obtain the first derivative of each track point.

According to the nature of the first derivative, the course angle is the inclination of the tangential line of the spline function at that point. Set the heading angle to \( a_{i} \), then \( y_{i}^{{\prime }} /x_{i}^{{\prime }} = \tan \left( {a_{i} } \right) \). Let \( x_{i}^{{\prime }} = 1 \), then \( y_{i}^{{\prime }} = \tan \left( {a_{i} } \right) \). When \( a_{i} = 90^\circ / 180^\circ /360^\circ \), let \( a_{i + 1} = 91^\circ / 181^\circ /361^\circ \). Similarly \( y_{i + 1}^{{\prime }} /x_{i + 1}^{{\prime }} = \tan \left( {a_{i + 1} } \right) \), let \( x_{i + 1}^{{\prime }} = 1 \), then \( y_{i + 1}^{{\prime }} = \cot \left( {a_{i + 1} } \right) \). When \( a_{i + 1} = 90^\circ / 180^\circ /360^\circ \), let \( a_{i + 1} = 91^\circ / 181^\circ /359^\circ \). By substituting the calculated \( x_{1}^{{\prime }} \), \( x_{2}^{{\prime }} \), \( y_{1}^{{\prime }} \) and \( y_{2}^{{\prime }} \) into the Eqs. (8) and (9), a complete cubic spline interpolation function can be obtained [4].

After obtaining the cubic spline interpolation function between two points, the next step is to use the cubic spline interpolation function to determine the interpolation between the two discrete track points [7]. The specific method is to divide the interval \( \left[ {0,t_{i} } \right] \) of the parameter \( {\text{t}} \) into \( {\text{k}} \) equal parts, each aliquot \( {\text{dt}} = t_{i} /k \), taking \( {\text{t}} = {\text{dt}},2{\text{dt}},3{\text{dt}} \ldots {\text{jdt}}, \ldots \) in order. The coordinates of the corresponding points are calculated using the cubic spline interpolation function equation, and these points are used as interpolation points. And then save the calculated interpolation point coordinates to the specified table. It is worth noting that the larger the value of K is, the more interpolation points are obtained, and the smoother the resulting track curve is. But this also increases the amount of calculations and reduces the processing speed of the algorithm. So we need to choose a moderate value when choosing K [8].

The above is the processing of the two discrete points by the algorithm. However, in practice, we have monitored N discrete track points, so we need to perform segmentation fitting on the processing results of each segment. We use the chase method to fit the N track points in turn. The specific method is as follows.

Set three track points \( P_{1} \), \( P_{2} \), \( P_{3} \). First monitor the two points \( P_{1} \) and \( P_{2} \), and curve the two points. When the third point \( P_{3} \) appears, the two points \( P_{2} \) and \( P_{3} \) are fitted. Repeat the above steps until the new track point no longer appears.

The course angle of the aircraft at these three points is constant. Ensure that the first derivative of point \( P_{2} \) is the same value when smoothing the two segments \( P_{1} P_{2} \) and \( P_{2} P_{3} \) respectively. This ensures that the second derivative at point b is also the same, that is, the cubic spline function is continuous at point b. It can be known from the nature of the cubic spline curve that the cubic spline curve is continuous and smooth at this point, which ensures the smooth completion of the smooth connection processing of the adjacent two segments [1].

3 Algorithm Test

In the above, we propose a general aviation track smoothing curve processing algorithm based on cubic spline curve, and theoretically demonstrate the effectiveness and practicality of the algorithm. But is it characterized by high accuracy and low complexity in practical applications? We need to verify by experiment.

The source of the experimental data is the track monitoring system of General Aviation. After obtaining the discrete track data, the obtained discrete track points are processed by the algorithm, and finally a smooth track path close to the real track is obtained.

3.1 Algorithm Coding

The main way to implement the algorithm is to implement the smooth curve functions derived in Sect. 2, namely the Eqs. (8) and (9). Encapsulate the core algorithm code as a class when writing code, and generate an interpolation each time it runs. This algorithm class is called cyclically, and finally K interpolations are generated. The pseudo code is as follows.

figure a

3.2 Experimental Test

The program core algorithm uses the method described above, and the final implemented test interface is shown in Fig. 4.

Click on the Get Data function, the program reads the data from the file and stores it in a temporary array. In order to compare the processed smooth track with the original discrete track, we use the display original track function. Click on the original track function and the result is shown in Fig. 3. The green polyline is the original track. The track generated in the figure is a polyline instead of a smooth curve.

Fig. 3.
figure 3

Original track display (Color figure online)

Click Show Smooth Tracks to use the algorithm to process the read data and display a smooth track curve. The result is shown in Fig. 4. The red curve in the figure is the final smooth track curve. Compared with the original track, it can be found that the curve is obviously smoothed at the inflection point, which is very suitable for the actual track curve. This also proves the feasibility of this algorithm from experimental data.

Fig. 4.
figure 4

Smooth track map (Color figure online)

4 Conclusion

This paper proposes a general aviation track smoothing algorithm based on cubic spline curve to solve the problem that only the discrete points of the aircraft track can be detected in the actual general aviation track monitoring. After theoretical verification and experimental testing of the algorithm, the results are as follows.

  1. a.

    Based on the theory of the existing cubic spline curve, a vector representation of the cubic spline function between two discrete track points is established. This method greatly reduces the complexity and computational complexity of the algorithm.

  2. b.

    Introducing the idea of the cubic spline interpolation processing curve into the general aviation track processing can achieve the effect of smoothing the track. The curve generated by the experimental results is smooth and more suitable for the actual heading curve of the aircraft.