IMUMETER—A Convolution Neural Network-Based Sensor for Measurement of Aircraft Ground Performance †

The paper presents the development of the IMUMETER sensor, designed to study the dynamics of aircraft movement, in particular, to measure the ground performance of the aircraft. A motivation of this study was to develop a sensor capable of airplane motion measurement, especially for airfield performance, takeoff and landing. The IMUMETER sensor was designed on the basis of the method of artificial neural networks. The use of a neural network is justified by the fact that the automation of the measurement of the airplane’s ground distance during landing based on acceleration data is possible thanks to the recognition of the touchdown and stopping points, using artificial intelligence. The hardware is based on a single-board computer that works with the inertial navigation platform and a satellite navigation sensor. In the development of the IMUMETER device, original software solutions were developed and tested. The paper describes the development of the Convolution Neural Network, including the learning process based on the measurement results during flight tests of the PZL 104 Wilga 35A aircraft. The ground distance of the test airplane during landing on a grass runway was calculated using the developed neural network model. Additionally included are exemplary measurements of the landing distance of the test airplane during landing on a grass runway. The results obtained in this study can be useful in the development of artificial intelligence-based sensors, especially those for the measurement and analysis of aircraft flight dynamics.


Introduction
Airfield performance of an airplane plays a significant role in ensuring both safety and comfort during take-off and landing, as well as in terms of aircraft efficiency, including energy savings in motion. The issue was and is the subject of research, which is confirmed by numerous publications, including books in the nature of textbooks or guides [1][2][3][4], but also scientific papers [5][6][7][8][9].
One of the interesting aspects of an airplane's ground performance is studying the take-off or landing distance of an airplane at a grass airfield. This issue is related to the

Aircraft Motion Sensing
The ability to recognize individual phases of an airplane flight brings many benefits and, among other things, may help in the design of a device and method for measuring airplane ground performance. When it comes to landing, the key point is the touchdown, which is the point in time when the landing gear wheels touch the ground. In the case of an airplane with a nose gear, the wheels of the main landing gear touch the ground first. The situation is slightly different in the case of an airplane with a tail wheel, then at the touchdown time, all three wheels should touch the ground simultaneously. A landing technique is also used where the tail wheel touches the ground just prior to the main landing gear wheels.
The moment of touchdown can be recognized on the basis of measurements made with the use of an accelerometer located at any point in the aircraft structure. The acceleration pulse is characterized by very high dynamics, moreover, the observed acceleration is multidirectional. Figure 1 shows the course of vertical acceleration recorded during the landing of the PZL 104 Wilga 35A aircraft. The accelerometer was placed on the floor in the cabin of the aircraft. It is clearly visible the moment when the acceleration amplitude increases rapidly, and the area with the highest amplitude disappears after a time (the airplane breaks off the ground for a moment, jumps up), to then reappear and continue most of the rollout distance [18].
At this point, it is worth taking a closer look at the transition state, shown in detail in the lower graph of Figure 1. This is the transition from the steady state for the approach at which the plane is still in the air and the vertical acceleration a z reaches values of small amplitude. Then, a state is established at which the amplitude of the a z acceleration value becomes significantly greater, as the airplane wheels roll on the grass runway surface, which causes intense vibrations. The transient state lasts about 200 ms and is characteristic for each of the recorded waveforms (each landing). At the touchdown speed of approx. 28 m/s, the airplane travels a distance of approx. 5.6 m during 200 ms.
Likewise, it is possible to recognize the remaining phases of an airplane landing. It may be difficult to recognize the level of flight in relation to the approach and the landing roll. Therefore, in this work, for the recognition of flight phases, it was proposed to use signals from both the accelerometer and the magnetometer, which indicates the position of the object (airplane) in relation to the Earth's magnetic field lines. Considering the movement of an airplane, it is obvious that in the landing space the lines of the Earth's magnetic field have a constant direction.
In the cited works [18,19], the recognition and determination of the touchdown point based on the recorded acceleration data were performed manually. The fundamental progress in this study is the application of the method of artificial neural networks to the recognition of particular phases of flight. This solution is based on the method of human activity recognition, as described for example in [22]. Mobile devices, such as smartphones incorporate a number of different sensors such as GPS (Global Positioning System) sensors, audio sensors (i.e., microphones), image sensors (i.e., cameras), light sensors, temperature sensors, direction sensors (i.e., compasses) and accelerometers. Because of substantial computing power, for the ability to interconnect within a global network to send and receive data, a smartphone can be used as a hardware platform for airplane motion sensing.

Convolution Neural Networks
For the purpose of aircraft motion recognition, a convolutional neural network was chosen in this study. CNN is a hierarchical, feed-forward type neural network. The structure of the CNN network is inspired by the system of vision in nature. Characteristic features, compared to standard neural networks, are convolution layers, which occur in addition to fully connected layers. Convolutional layers teach filters that slide along the input data and apply to sub-regions of the input data. The general construction of a CNN-type neural network is described in the following sections [20,23].  At this point, it is worth taking a closer look at the transition state, shown in detail in the lower graph of Figure 1. This is the transition from the steady state for the approach at which the plane is still in the air and the vertical acceleration az reaches values of small  In the field of neural networks the convolution is an operation that is based on multiplication weights-filter and input data. In our case, input data is a 2-dimensional (2d) array. So in the case of recognition of a flight phase, a 2d convolution was used. A dot product of input data and filter-sized patch (smaller than input size) results in a single value. An example of a convolution is shown in Figure 2. In the case of recognition of a flight phase, a 2d convolution was used. Its main parameters are: number of filters, kernel size, stride and padding. Number of filters defines the total number of matrixes with size of the kernel. Kernel describes a filter that will be passed over input data. It applies convolution product on data and can be expressed by Equation (1) where: -kernel;− ≤ ≤ , − ≤ ≤ -elements of kernel. Stride parameter is responsible for movement kernel over data. Padding defines number of matrix elements that will be added at the sides of the input data. The parameters for this task are: number of filter-24, kernel size-16 × 2, stride-1 and padding-0.

Nonlinearity
Every node in the neural network fully connected layer does a linear operation. For non-linearity, we need to use a non-linear activation function, e.g., rectified linear activation (ReLu). This function can be expressed by Equation (2) [23]:

Pooling Layer
Features in CNN can be sensitive to the location of elements in input data. To reduce this dependency feature maps need to be downsampled. The task of the operation of maxpooling is to downsample feature maps by determination of the maximum value for each sub-array with a specific size. This pooling layer follows the convolution layer. Taking the average and maximum size of small rectangular data blocks are the two most commonly used algorithms for a pooling layer. The main parameter of this process is pool size, which defines a size data block. In the present study, the size of 3 × 2 was used.

Softmax layer
The result obtained in the last layer is transferred to the softmax layer, whose task is to determine the probability in the predicted layers, in other words, to work out a classi- In the case of recognition of a flight phase, a 2d convolution was used. Its main parameters are: number of filters, kernel size, stride and padding. Number of filters defines the total number of matrixes with size of the kernel. Kernel describes a filter that will be passed over input data. It applies convolution product on data and can be expressed by Equation (1) [23]: where: ω-kernel; −k i ≤ δx ≤ k i , −k j ≤ δy ≤ k j -elements of kernel. Stride parameter is responsible for movement kernel over data. Padding defines number of matrix elements that will be added at the sides of the input data. The parameters for this task are: number of filter-24, kernel size-16 × 2, stride-1 and padding-0.

Nonlinearity
Every node in the neural network fully connected layer does a linear operation. For non-linearity, we need to use a non-linear activation function, e.g., rectified linear activation (ReLu). This function can be expressed by Equation (2) [23]:

Pooling Layer
Features in CNN can be sensitive to the location of elements in input data. To reduce this dependency feature maps need to be downsampled. The task of the operation of max-pooling is to downsample feature maps by determination of the maximum value for each sub-array with a specific size. This pooling layer follows the convolution layer. Taking the average and maximum size of small rectangular data blocks are the two most commonly used algorithms for a pooling layer. The main parameter of this process is pool size, which defines a size data block. In the present study, the size of 3 × 2 was used.

Softmax Layer
The result obtained in the last layer is transferred to the softmax layer, whose task is to determine the probability in the predicted layers, in other words, to work out a classification decision.
Recognition of a flight phase is a classification problem, so for this task, the activation function of the last layer was softmax. This function assumes that each example is a member of exactly one class, it can be expressed by Equation (3) [24]: where: y-input vector, an input vector that consists of n elements for n classes; y i -ith element of the input vector (value between −∞ and +∞); n-number of classes.

Fully-Connected Layer
After all operations, convolution and max-pooling data need to be fed in dense layers (layer with fully connected neurons). The input of the dense layer is a one-dimensional array, so feature maps need to be flattened to this size. In the dense layer, every input is connected and operations are linear with non-linear activation function. A single layer of neurons with soft-max activation function can be expressed by Equation (4): where: W =   w 1 . . . Weights and biases are estimated by the backpropagation algorithm for each neuron. The weights and biases are based on new inputs. The neural network calculates how new data would have affected the data that was seen previously-stochastic gradient descent. The model in the training process wants to minimalize loss function by finding optimal values for weights and biases. For each step, weights are changed by the value-learning rate in the optimization algorithm.
For flight phase recognition, 2 dense layers with 12 and 1 neuron were used. For optimization of the neural network, the Adam algorithm was used. It is a stochastic optimization algorithm that only requires first-order gradients. It can be expressed by Equations (5)-(8) [25]: where: η-learning rate; g t -gradient at time t along ω; υ t -exponential average of gradient along ω; s t -exponential average of squares of gradients along ω; β 1 , β 2 -hyperparameters; -constant for numerical stability.
In this study, the following parameters were approximated experimentally: η = 0.001, β 1 = 0.9, β 2 = 0.999, = 1 × 10 −7 To calculate model loss, we needed to define a loss function. In this case, along with soft-max activation function in the last layer of the neuron network, we must use a categorical cross-entropy loss. This function can be expressed with the following equation: where: C-number of classes; t i -ground truth vector; S(y) i -soft-max function (Equation (2)).

Development of the Basic Neural Network
The development of the neural network was divided into two stages. Firstly, we constructed a primary (basic) network in order to examine of the approach is promising. Any neural network should be learned based on a possible big amount of data that possibly best describe the investigated process. For the purpose of learning the network, a laboratory test stand was constructed. The investigated process of airplane landing was divided into three phases, so three classes had to be distinguished during the learning process. The three classes are as below: approach, with a constant vertical and longitudinal accelerations and slightly inclined position of the object (airplane); -touchdown with a significant peak of vertical acceleration as well as longitudinal acceleration; -rollout with negative longitudinal acceleration, neutral vertical acceleration and neutral vector of magnetic field.
The role of an airplane played a small trolley with a sensor box. As a sensor, a commercially available device, the STI Sensor Tile Box (STMicroelectronics International N.V., Geneva, Switzerland), was used. The classes were determined on the basis of the moment when the trolley with the sensor covered the marker. ARUCO TM (Ava Group of the University of Cordoba, Cordoba, Spain) markers were recognized by means of a miniature video camera, installed on the trolley. It allowed differentiating the length of acceleration measurements in one sample, because the marker could be recognized as obscured at different times.
The network learned in about 3 s for 113 epochs, very quickly. Figure 3 shows results from the learning process of the network. The accuracy after 113 epochs, on a window length of 24 samples, was about 70%. The loss function, shown in Figure 3 middle, also proves good network capabilities. The table of errors ( Figure 3 bottom) shows that the accuracy for the approach class was 81.03%, with an error of 8.62% for the touchdown class and 10.34% for the rollout class. The touchdown class achieved an efficiency of 82.02%, with an error in favor of the approach class-7.69% and 10.26% for the rollout class. The rollout class achieved the lowest accuracy of 66.67% with an error of 23.44% for the approach class and 8.89% for the touchdown class.
The network runs on a Raspberry PI TM (Rapsberry Pi Foundation, Cambridge, UK) single-board computer and it is possible to implement the network in the used sensor box. In such a configuration, it is possible to read the prediction result directly.
Due to the construction of the 0-approach and 2-rollout class stations, they have similar feature maps, so they are, to some extent, confused with each other if the trolley is not moving.
The developed network correctly recognizes the individual traffic phases, but due to the overlapping of classes 0 and 2 and due to the small number of classes, false positives occur. One more class could be added that will separate any weird wheelchair movements. False positives may also result from the fact that the network did not receive enough data to learn. network, a labora-tory test stand was constructed. The investigated process of airplan landing was divided into three phases, so three classes had to be distinguished during the learning process.  The network runs on a Raspberry PI TM (Rapsberry Pi Foundation, Cambridge, UK) single-board computer and it is possible to implement the network in the used sensor box. In such a configuration, it is possible to read the prediction result directly.
Due to the construction of the 0-approach and 2-rollout class stations, they have similar feature maps, so they are, to some extent, confused with each other if the trolley is not moving.
The developed network correctly recognizes the individual traffic phases, but due to the overlapping of classes 0 and 2 and due to the small number of classes, false positives occur. One more class could be added that will separate any weird wheelchair movements. False positives may also result from the fact that the network did not receive enough data to learn.
Initially, it was planned to use the so-called transfer learning, which consists of training the network on the way of research in a real object (an airplane). However, based on the results obtained in the process of learning the primary network, it was concluded that a minimum of 50 measurements (50 test flights = landings) will allow distinguishing more classes. Moreover, the time in a single measurement for a given class is longer in the case of a test flight than for the laboratory test stand. So, we decided to develop another (upgraded) neural network, based on flight test results.

Development and Learning the Advanced CNN
Based on the results obtained during the training of the primary neural network, the development of an advanced network was targeted. It was assumed that for the learning of the advanced network, data collected in flight tests with an airplane would be used. Initially, it was planned to use the so-called transfer learning, which consists of training the network on the way of research in a real object (an airplane). However, based on the results obtained in the process of learning the primary network, it was concluded that a minimum of 50 measurements (50 test flights = landings) will allow distinguishing more classes. Moreover, the time in a single measurement for a given class is longer in the case of a test flight than for the laboratory test stand. So, we decided to develop another (upgraded) neural network, based on flight test results.

Development and Learning the Advanced CNN
Based on the results obtained during the training of the primary neural network, the development of an advanced network was targeted. It was assumed that for the learning of the advanced network, data collected in flight tests with an airplane would be used. Airplane motion analysis was limited to the landing maneuver and the following flight phases were considered: -approach-the airplane is flying with a nose slightly tilted down, the engine runs at about 30-40% power (a); -flare-this is the phase when the airplane lifts the nose, the flight path is levelled so as to reduce the touchdown speed (b); -touchdown-all the three landing gear wheels touch the ground at the same moment (simultaneously) (c); -roll-out-the airplane is taxiing at decreasing speed (d); -stop (e).
In this way, the studied maneuver was divided into five phases, which at the same time defined the classes in the advanced neural network. Figure 4 includes three photographs of the test airplane, showing three consecutive flight phases during one landing. A difference between the approach and the flare is clearly visible. It was impossible to recognize these two phases of flight on the basis of indications only from the accelerometer, therefore an additional sensor, a magnetometer, was used.

The Flight Test Experiment
Experimental research was undertaken consisting of flight tests of a selected aircraft, adapted to operate at grass airfields. The PZL 104 Wilga 35A aircraft is a four-seater highwing aircraft, powered by a 192 kW piston engine. It has a classic undercarriage with a tail wheel. The main landing gear wheels are suspended on trailing arms, which significantly improves ground performance, especially on airports with grass, uneven surfaces.
The flight test campaign took place at Lublin airport (ICAO Code: EPLZ), on a grass runway (the main runway of this airport has a paved surface). Flights were performed in November 2020, in the early afternoon. A total of over 50 flights were carried out, in which four people participated each time (two pilots and two people from among the authors of this paper, carrying out the measurements). flare-this is the phase when the airplane lifts the nose, the flight path is levelled so as to reduce the touchdown speed (b); -touchdown-all the three landing gear wheels touch the ground at the same moment (simultaneously) (c); -roll-out-the airplane is taxiing at decreasing speed (d); -stop (e).
In this way, the studied maneuver was divided into five phases, which at the same time defined the classes in the advanced neural network. Figure 4 includes three photographs of the test airplane, showing three consecutive flight phases during one landing. A difference between the approach and the flare is clearly visible. It was impossible to recognize these two phases of flight on the basis of indications only from the accelerometer, therefore an additional sensor, a magnetometer, was used.

The Flight Test Experiment
Experimental research was undertaken consisting of flight tests of a selected aircraft, adapted to operate at grass airfields. The PZL 104 Wilga 35A aircraft is a four-seater highwing aircraft, powered by a 192 kW piston engine. It has a classic undercarriage with a tail wheel. The main landing gear wheels are suspended on trailing arms, which significantly improves ground performance, especially on airports with grass, uneven surfaces.
The flight test campaign took place at Lublin airport (ICAO Code: EPLZ), on a grass runway (the main runway of this airport has a paved surface). Flights were performed in November 2020, in the early afternoon. A total of over 50 flights were carried out, in which four people participated each time (two pilots and two people from among the authors of this paper, carrying out the measurements).
In order to obtain repeatable results, which were necessary for both network training and model validation, flight test measurements were carried out in the fall, early afternoon, when the thermal conditions of the atmosphere were stable, with a steady wind direction roughly opposite to the take-off direction (+/− 20 °. Each time, the meteorological conditions provided to the pilot as part of the takeoff clearance were noted by the test engineer conducting the research. The preparation of the aircraft for the tests consisted of attaching the IMUMETER device (see Figure 5). A sample flight consisted of making a four-turn pattern and landing continued until the plane came to a stop. During the tests, the ground crew carried out measurements of the rollout length using a reference measuring method. Two observers on the ground are assessing the position of the aircraft at the time of touchdown and stopping, relative to established base points. After the measurement, the next flight took off. Figure 6 shows the measurements carried out on the runway. In order to obtain repeatable results, which were necessary for both network training and model validation, flight test measurements were carried out in the fall, early afternoon, when the thermal conditions of the atmosphere were stable, with a steady wind direction roughly opposite to the take-off direction (+/− 20 • ). Each time, the meteorological conditions provided to the pilot as part of the takeoff clearance were noted by the test engineer conducting the research.
The preparation of the aircraft for the tests consisted of attaching the IMUMETER device (see Figure 5). A sample flight consisted of making a four-turn pattern and landing continued until the plane came to a stop. During the tests, the ground crew carried out measurements of the rollout length using a reference measuring method. Two observers on the ground are assessing the position of the aircraft at the time of touchdown and stopping, relative to established base points. After the measurement, the next flight took off. Figure 6 shows the measurements carried out on the runway.
The sample dataset obtained in the flight test measurements is included in Figures 7 and 8. Figure 7 shows time courses of the airplane's accelerations in three orthogonal directions (X-Y-Z), gathered from a sample landing.
As during the fifth phase-stopping, the acceleration values do not change and their values remain the same as at the end of the fourth phase, for the sake of clarity the results are shown without the fifth phase. The data ranges for the individual phases of the flight are indicative (approximate). Determining class affiliation was performed manually. There are some changes in signal, which are characteristic features for a specific class, i.e., rollout class peaks with high amplitude are consequences of ground roughness.
When analyzing the acceleration waveforms, the az acceleration can be seen, which is the most important from the point of view of flight phase recognition, also reaches a high value during the approach. This is probably the result of the impact of vibrations generated by the aircraft engine, the considerable power of which causes such a reaction of the entire aircraft. On the other hand, the highest values of az acceleration were recorded for the touchdown and rollout phases, the difference being not very large compared to the values measured during the approach phase. This emphasizes the need to use a different, additional sensor, thanks to which incorrect recognition of flight phases will be avoided. This additional sensor is the magnetometer.        As during the fifth phase-stopping, the acceleration values do not change and their values remain the same as at the end of the fourth phase, for the sake of clarity the results are shown without the fifth phase. The data ranges for the individual phases of the flight are indicative (approximate). Determining class affiliation was performed manually. There are some changes in signal, which are characteristic features for a specific class, i.e., rollout class peaks with high amplitude are consequences of ground roughness.
When analyzing the acceleration waveforms, the az acceleration can be seen, which is the most important from the point of view of flight phase recognition, also reaches a high value during the approach. This is probably the result of the impact of vibrations generated by the aircraft engine, the considerable power of which causes such a reaction of the entire aircraft. On the other hand, the highest values of az acceleration were recorded for the touchdown and rollout phases, the difference being not very large compared to the values measured during the approach phase. This emphasizes the need to use a different, additional sensor, thanks to which incorrect recognition of flight phases will be avoided. This additional sensor is the magnetometer. In Figure 8, the data waveforms recorded by the magnetometer sensors are shown. The most important were the changes in the magnetic field with respect to the vertical (Z) and horizontal (X) axes, as they informed about changes in the position of the aircraft in the vertical plane, along the direction of flight (the inclination of the aircraft resulting from changes in the angle of attack during individual landing phases). Therefore, during the approach phase, the tilt of the plane manifests itself in quite significant values of the magnetic field compared to the flare phase when the airplane takes a horizontal position. The changes in the magnetic field in relation to the transverse axis (Y) are small and could result from the reaction to crosswinds or other disturbing pulses occurring during the flight.
The data shown in both of the figures above represent one exemplary dataset for training the network. In total, about 50 datasets were used to train the network, each of them was obtained during a separate test flight. Therefore, during the test flights, efforts were made to maintain repeatable conditions in terms of the piloting technique and, consequently, the course of the landing.

Data Processing and Creating a Neural Network
The data from the accelerometer were passed through a high-pass filter and then broken down into components. Then, the data were recalculated so that the coordinate system is rotated: the Z axis of the accelerometer corresponds to the axis of gravity. This is due to the fact that the aircraft has three/six degrees of freedom and may be in a configuration in which the accelerometer axis significantly deviates from the vertical direction and, consequently, the measurement results are erroneous. The matrix with the processed acceleration data and the raw data from the magnetometer are convolved and the maximum values are determined. The flatten operation allows you to provide data as input values to the neural network. The network consists of two dense layers (all neurons are connected to each other). Since both layers have the same number of neurons, there is a random shutdown of neurons between them in order to prevent the network from becoming too accustomed to ("dropout"). The first layer of neurons is activated by the ReLU function, the second by the soft-max function. Figure 9 shows the structure of the network and Figure 10 shows the structure of the data that pass through the network. were made to maintain repeatable conditions in terms of the piloting technique and, consequently, the course of the landing.

Data Processing and Creating a Neural Network
The data from the accelerometer were passed through a high-pass filter and then broken down into components. Then, the data were recalculated so that the coordinate system is rotated: the z axis of the accelerometer corresponds to the axis of gravity. This is due to the fact that the aircraft has three/six degrees of freedom and may be in a configuration in which the accelerometer axis significantly deviates from the vertical direction and, consequently, the measurement results are erroneous. The matrix with the processed acceleration data and the raw data from the magnetometer are convolved and the maximum values are determined. The flatten operation allows you to provide data as input values to the neural network. The network consists of two dense layers (all neurons are connected to each other). Since both layers have the same number of neurons, there is a random shutdown of neurons between them in order to prevent the network from becoming too accustomed to ("dropout"). The first layer of neurons is activated by the ReLU function, the second by the soft-max function. Figure 9 shows the structure of the network and Figure 10 shows the structure of the data that pass through the network.  The input data to the neural network is preprocessed accelerometer data and raw magnetometer data from the period of time equals 2 s with a frequency of 30 Hz. So, the input data represent a matrix of size 60 × 6. Value 6 takes from 3 axes from the accelerometer and magnetometer. By further processing all the input data changes, we finally achieve a size equal to the number of classes.
The rotation of the coordinate system allowed to set the Z axis with respect to the gravity axis. This solution allows us to reduce the distribution of components on the other axes of the coordinate system in the event of airplane positions other than horizontal. Rodrigues' formula was determined by the following equation: where: v-vector in R 3 space; k-unit vector defining the rotation axis; θ-vector rotation angle v with respect to the k axis.
Sensors 2021, 21, x FOR PEER REVIEW Figure 10. The structure of the data used for network development.
The input data to the neural network is preprocessed accelerometer magnetometer data from the period of time equals 2 s with a frequency of input data represent a matrix of size 60 × 6. Value 6 takes from 3 axes from eter and magnetometer. By further processing all the input data chang achieve a size equal to the number of classes.
The rotation of the coordinate system allowed to set the z-axis with gravity axis. This solution allows us to reduce the distribution of componen axes of the coordinate system in the event of airplane positions other than drigues' formula was determined by the following equation:

Network Learning
The network was taught in 20 epochs, with the following parameters: learning rate = 0.0005, and decay rate = 1 × 10 −6 . The learning results are shown in Figure 11. The accuracy of the network reached the value of 0.935 for the training set and 0.95 for the validation set after 15 epochs, which is a good result. The loss function, both for training and validation, reaches the value of 2 already after five epochs, and it stabilizes after passing 10 epochs. At the 10th learning epoch, there is a local maximum of the loss function, similar to the accuracy where a local decrease is also observed at the 10th epoch. The peak of this kind is a consequence of the use of batch size for the Adam algorithm. The batch dataset for the 10th epoch had to be misaligned for optimization reasons.
The confusion matrix reveals that the lowest degree of confidence occurs in class D-rollout and C-touchdown (80.85% and 86.54%, respectively). In the case of other classes, the degree of confidence is very high, reaching 95% or even more. The lowest values of correct predictions are for classes C and D. In 11.54% of cases, class C is falsely predicted as class B, while class D is predicted as A-8.51% and B-6.38%, and E-4.26%.
The 86.54% accuracy for class C and 11.54% false predictions for class C for B can be explained by the fact that the touchdown phase is significantly shorter than the other classes and therefore data would have to be collected earlier to be sure of the occurrence of characteristic values. This class is assigned to the dataset in the window and thus the initial part of the set was classified as B, hence there was a large share of erroneous predictions for class B.
Summing up, it can be stated that the network learned quite quickly (15 epochs), and the learning results are satisfactory, therefore, it can proceed to the practical application of the developed model for measurements in real conditions. The confusion matrix reveals that the lowest degree of confidence occurs in class Drollout and C-touchdown (80.85% and 86.54%, respectively). In the case of other classes, the degree of confidence is very high, reaching 95% or even more. The lowest values of correct predictions are for classes C and D. In 11.54% of cases, class C is falsely predicted as class B, while class D is predicted as A-8.51% and B-6.38%, and E-4.26%.
The 86.54% accuracy for class C and 11.54% false predictions for class C for B can be explained by the fact that the touchdown phase is significantly shorter than the other classes and therefore data would have to be collected earlier to be sure of the occurrence of characteristic values. This class is assigned to the dataset in the window and thus the initial part of the set was classified as B, hence there was a large share of erroneous predictions for class B.
Summing up, it can be stated that the network learned quite quickly (15 epochs), and the learning results are satisfactory, therefore, it can proceed to the practical application of the developed model for measurements in real conditions.

Measurement of the Landing Rollout Distance with the IMUMETER Sensor and a GNSS Sensor
One of the ideas of using the IMUMETER sensor was to use a smartphone as a hardware platform on which the software of the developed neural network is installed. The main point was that the device should be small and accessible to a wide audience, and such requirements were met by a mobile phone with embedded accelerometers and a GNSS sensor. This configuration was tested at this stage, with the magnetic field values still being measured using external sensors.
The basic algorithm for measurement of airplane ground rollout is that the smartphone-based IMUMETER sensor recognizes the moment of touchdown and then gives a trigger input to the distance measuring system, which uses the GNSS sensor that determines the distance based on site coordinates.

Measurement of the Landing Rollout Distance with the IMUMETER Sensor and a GNSS Sensor
One of the ideas of using the IMUMETER sensor was to use a smartphone as a hardware platform on which the software of the developed neural network is installed. The main point was that the device should be small and accessible to a wide audience, and such requirements were met by a mobile phone with embedded accelerometers and a GNSS sensor. This configuration was tested at this stage, with the magnetic field values still being measured using external sensors.
The basic algorithm for measurement of airplane ground rollout is that the smartphonebased IMUMETER sensor recognizes the moment of touchdown and then gives a trigger input to the distance measuring system, which uses the GNSS sensor that determines the distance based on site coordinates.
It can be assumed that the shape of the Earth is similar to a sphere, so the haversine formula can provide a good approximation of the distance between two points on its surface. The error of such calculation is less than 1% on average. The haversine formula is expressed by the equation below [26]: where: R-average radius of the Earth; c-the result of the following equation: with: a-the result of the equation: a = sin 2 ∆ϕ 2 + cos ϕ 1 × cos ϕ 2 × sin 2 ∆λ 2 (13) where: ϕ-latitude, (indexes: 1-first point, 2-second point); λ-longitude (indexes: 1-first point, 2-second point). Figure 12 shows the results of a measurement performed during 16 test flights and the measuring method was GPS tracking.
where: -average radius of the Earth; -the result of the following equation: with: -the result of the equation: = sin ∆ 2 + cos × cos × sin ∆ 2 (12) where: -latitude, (indexes: 1-first point, 2-second point); -longitude (indexes: 1first point, 2-second point). Figure 12 shows the results of a measurement performed during 16 test flights and the measuring method was GPS tracking. The comparison of the results obtained with the use of the IMUMETER device with the results of the reference method showed significant deviations for most of the repetitions of the measurements. It should also be noted that several repetitions of the measurements with the IMUMETER device were satisfactory (relative error of less than 10%). Based on this observation, it was found that the source of the error was not the neural network method, but the GPS receiver used for the tests. It was a popular receiver built into a Smartphone, whose data acquisition time is more than 1 s.

Measurement of the Landing Rollout Distance with the IMUMETER Sensor and Kalman Filter
Another algorithm for the determination of airplane rollout distance with the use of the IMUMETER sensor is that the neural network recognizes the moments of the touchdown and stop while the distance is calculated based on longitudinal acceleration with the use of the Kalman filter.
In terms of hardware, the IMUMETER sensor is in this case identical to the first solution, but no GPS sensor was needed to determine the route, only an accelerometer. Figure 12. Rollout distance in meters, obtained with the use of the IMUMETER sensor together with a GPS receiver of a smartphone.

Comment Comment
The comparison of the results obtained with the use of the IMUMETER device with the results of the reference method showed significant deviations for most of the repetitions of the measurements. It should also be noted that several repetitions of the measurements with the IMUMETER device were satisfactory (relative error of less than 10%). Based on this observation, it was found that the source of the error was not the neural network method, but the GPS receiver used for the tests. It was a popular receiver built into a Smartphone, whose data acquisition time is more than 1 s.

Measurement of the Landing Rollout Distance with the IMUMETER Sensor and Kalman Filter
Another algorithm for the determination of airplane rollout distance with the use of the IMUMETER sensor is that the neural network recognizes the moments of the touchdown and stop while the distance is calculated based on longitudinal acceleration with the use of the Kalman filter.
In terms of hardware, the IMUMETER sensor is in this case identical to the first solution, but no GPS sensor was needed to determine the route, only an accelerometer.
The distance traveled by airplane is calculated by double integration of the acceleration using a Kalman filter. The main assumption of the algorithm is that the state achieved in time is a consequence of the state at the moment, according to the formula: with: F k -transition matrix; x k−1 -prior state; B k -control/input model; u k -control vector; w k -process disturbances; k-time moment. Figure 13 shows the results of measurements using the Kalman filtering method. In this case, the measurement error was significantly smaller, although not acceptable from the point of view of a practical application. One reason for this situation is that the quality of the accelerometer used for the measurements was poor in the sense of in terms of the accuracy of the measurement.
The distance traveled by airplane is calculated by double integration of the acceleration using a Kalman filter. The main assumption of the algorithm is that the state achieved in time is a consequence of the state at the moment, according to the formula: with: -transition matrix; -prior state; -control/input model; -control vector; -process disturbances; -time moment. Figure 13 shows the results of measurements using the Kalman filtering method. In this case, the measurement error was significantly smaller, although not acceptable from the point of view of a practical application. One reason for this situation is that the quality of the accelerometer used for the measurements was poor in the sense of in terms of the accuracy of the measurement. The reference values in Figures 12 and 13 are results of measurements performed on the ground (see Figure 6).

Conclusions
The paper outlines the development of the IMUMETER sensor for airplane flight dynamics measurements and motion recognition. The sensor is based on artificial intelligence and includes neural network software. The idea of the IMUMETER sensor's operation is airplane motion phases based on measurements of accelerations and magnetic fields. A prototype of the sensor was built on the Raspberry Pi TM (Rapsberry Pi Foundation, Cambridge, UK) hardware platform with the INS/GNSS sensors platform as well as a three-axis magnetometer. A Convolution Neural Network model was developed to recognize phases of flight. The CNN model was learned with flight data that were collected during a flight test of the PZL 104 Wilga 35A airplane, and an operation from the grass runway of the Lublin Airport. The CNN model software was installed on a smartphone and primary tests were conducted in order to determine landing rollout distance. Results show that although the smartphone-based version of the IMUMETER recognizes airplane motion's phases correctly, the accuracy of distance measurement was insufficient, mainly due to weak accelerometers and GNSS sensor capabilities (acquisition time 1s). It was concluded that a DGPS-based hardware platform with accelerometers of high-frequency Comment Comment Figure 13. Rollout distance in meters, obtained with the use of the IMUMETER sensor together with the Kalman filtering method.
The reference values in Figures 12 and 13 are results of measurements performed on the ground (see Figure 6).

Conclusions
The paper outlines the development of the IMUMETER sensor for airplane flight dynamics measurements and motion recognition. The sensor is based on artificial intelligence and includes neural network software. The idea of the IMUMETER sensor's operation is airplane motion phases based on measurements of accelerations and magnetic fields. A prototype of the sensor was built on the Raspberry Pi TM (Rapsberry Pi Foundation, Cambridge, UK) hardware platform with the INS/GNSS sensors platform as well as a three-axis magnetometer. A Convolution Neural Network model was developed to recognize phases of flight. The CNN model was learned with flight data that were collected during a flight test of the PZL 104 Wilga 35A airplane, and an operation from the grass runway of the Lublin Airport. The CNN model software was installed on a smartphone and primary tests were conducted in order to determine landing rollout distance. Results show that although the smartphone-based version of the IMUMETER recognizes airplane motion's phases correctly, the accuracy of distance measurement was insufficient, mainly due to weak accelerometers and GNSS sensor capabilities (acquisition time 1s). It was concluded that a DGPS-based hardware platform with accelerometers of high-frequency response, such as for example used in the cited works [27][28][29], would be used in an improved version of the IMUMETER, which is being developed as the next step of this project. Additionally, one practical conclusion is that the use of a smartphone as a hardware platform for airplane motion recognition is rather impossible, as a result of too-slow data acquisition related to airplane motion velocity.
One prospective practical use of the IMUMETER sensor would be the "GARFIELD" online information system on runway surface condition as well as airfield performance analysis and prediction for airplanes operation from grass runways.