So here is a complete blog just on the topic of how to add two parameters together. You will remember from infant school that one apple plus one apple equals two apples, well in FlightDataLand things get a bit more tricky.
In the picture below we have two parameters, a & b, where a is sampled at 2Hz and b at 1Hz.
The problem comes that the samples of a and b don’t line up (in fact, we know they never will line up, because the data is time division multiplexed).
Rather than looking at the start of the problem, let’s work backwards and think about the answer we might get. If we consider the expression…
…how many samples of c should there be and what time offset should they have?
There would appear to be three possible solutions, namely
- Offset and sample rate not related to the original samples
- Offset and sample rate related to parameter a
- Offset and sample rate related to parameter b
Some FDM software sets the offset of c to match the end of the period for which the algorithm operates, which is an example of option 1. However, if the data was sampled at the beginning of the period, this maximises the timing error.
Taking the other two options allows us to perform a computation with no timing error for one of the parameters, but this does not address the issue of timing difference between the parameters. Of the possible techniques to use, linear interpolation would make most sense. We have no information other than the individual sample values and to use spline interpolation or similar can lead to unforeseen abnormalities in the data that we need to avoid.
Now, for the mathematically inclined, we are going to produce non-commutative addition algorithms, or for the non-mathematically inclined, we are going to have two different additions, where a+b is DIFFERENT from b+a !!!
Let’s do b+a first (because that is the simpler case):
Here is an illustration of the process, where linear interpolation of parameter a has been used to compute the values of a at the same times as the samples of b, then the resulting values of a have been added to b to give the two new data values, c.
The alternative solution is a+b, using the parameter a to set the sample interval of the result and for which interpolation (and extrapolation) of b is required.
In POLARIS therefore we use a non-commutative signal processing technique, where the first argument in the expression defines the timing and sample rate of the resulting parameter. So, (a+b) has the sample rate and timing of a, whereas the expression (b+a) has the sample rate and timing of b. In both cases the second argument is computed by linearly interpolating the second parameter.
Where does that leave us? You may be slightly confused but as all of this magic happens in an alignment process that takes place automatically, it does not impact the user. Just remember that POLARIS algorithms are designed to minimise timing errors and therefore gives the most accurate answers possible.