Models

During study of listings of legacy software we found out that they contains contradictions with the general aerodynamic laws, hereby the model, recovered from listings, required harmonization with characteristics, acquired from other sources, such as simulator and airplane documentation.

The main bulk of the errors were in factors of the model equations that describe dynamics of flight. For adjustment of the factors was used comparisons of factors in source codes and in models, described in documentation. Interpretation of these parts «behind a table» allowed to define the values of erroneous factors. The following example shows such case.

In power-plant mathematical model the analogue parameter nv is number of the air screw revolutions is presented by the modelling equation

where k – amplification factor; t – screw time constant; р – Laplas operator. After transformation the expression has the following differential equation form:

According to the algorithm, applied in the modelling procedure, the equation should be integrated by Euler's method:

where h – an integration step.

In the source program procedure the equation solving (2) is represented by the following text:

where – DEV is value that specify control lever position of the air screw; К12 = 0,595 is the constant.

Comparison of figure (3) and result of interpretation (4) shows that the text (4) not includes integration step h (at engines work modelling it is equals 0,12). This error was found out by the calculations „behind a table” - the got transient process did not correspond to physical sense. Similar errors are presented for other power-plant parameters calculation executed by the Euler's method.

After the source code models check the reengineering of the legacy software was carried out in two stages: reverse engineering – creation of the high level algorithmic representation; forward engineering – creation of the new C-code software based on this algorithms.