Sky Dolly can record with various sample rates, ranging from as low as 1 Hz („one sample per second“ - perfect for airliners) up to the default rate „auto“ („one sample per simulated frame“ or „as many samples as reported my FS 2020“).
Interpolation merely calculates (or rather: „makes an educated guess“ ;)) the values „in between two sampling points“. For instance you sampled the aircraft‘s altitude at points in time 1 and 2 [seconds] to be 1000 feet and 1200 feet . And now you want to know the altitude at time 1.5 seconds (and 1.1, 1.2, …) between those „sample points“ (let‘s call them P1 and P2 for now).
There exist many different interpolation methods. Their main differentiator is mostly - simply put - at „how many sample points in the neighbourhood of points P1 and P2 they have a look at“.
The simplest - and most intuitive for most of us - methods are „nearest neighbour“ („take the value which is closest to our desired sample point“) and „linear interpolation“ („draw a straight line from P1 to P2: those are our desired interpolated values“).
So in our example the interpolated altitude at time 1.5 seconds would be 1200 feet („nearest neighbour“, value 1.5 being rounded up to 2) and 1100 („linear interpolation“).
While those methods are extremely simple and hence extremely fast to calculate it is easy to see that not even the linear interpolation results in „smooth lines“ when you interpolate along a whole series of sample points P1, P2, P3, …, Pn. Intuitively this is because for each „segment“ we only consider the points which define that segment. But we don‘t consider sample points beyond that (the „support“ of that segment).
(Mathematicians would say that the derivation of a „linear curve“ is not coninuous - but let‘s quickly turn back to easier terms, as my own education is also a couple of years in the past ;)).
Enter „higher order“ interpolation methods: the next easier methods („cubic interpolation“) look at the immediate next neighbours of P1 and P2 (remember: we are still interested in an interpolated value between P1 and P2), so the „predecessor“ of P1 (let‘s call it P0) and the successor of P2 (we name it P3).
(The term „cubic“ comes from the fact that there is a ^3 („to the 3rd power“) term in the analytical form of the equation)
For instance we may have the following sampled altitudes:
P0: 980
P1: 1000
P2: 1200
P3: 2000
Sky Dolly uses „Hermite spline interpolation“ (there are many variants of „cubic spline interpolation“ - Hermite is just one of them). And while I am not going to calculate our interpolated value for segment [P1, P2] at interpolated time 1.5 seconds („halfway into the segment“) in my head just now we intuitively already would say that it is not going to be 1100 feet (as would be the result of a linear interpolation), because there is a „steep incline to 2000 feet“ in the next segment [P2, P3]. So intuitively we would expect the interpolated altitude to be „somewhat higher than 1100 feet“ - but at the same time also still below (or equal to) 1200 feet, because that is the next „fixed sample point“ (and the next point P2 has an even higher value)!
To summarise, we want the following properties for such an interpolated curve:
- It should be „smooth“ across segments
- It should go exactly through the sampled points P1, P2, P3, …, Pn (that we measured)
- It should still be reasonably fast to calculate
Now in theory that results in a „smooth flight curve“, and in practise - in FS200 - that works reportedly well.
(in practice of course also „message delays“, „CPU/GPU hickups“ etc. play a role - „frames per second“ essentially“ - how „smooth“ the replay is. But Sky Dolly being implemented in C++ has reportedly one of the lowest CPU and memory footprints)
What Sky Dolly also does right is „the timing“: the flight replay takes exactly as long as the originally recorded flight. Why? Well, that is easy to understand, now that we know about the underlying interpolation theory ![]()
Sky Dolly doesn‘t simply take the sampled values and sends them stoically one after another - with some time delay in between - to FS 2020. That would be wrong.
Instead Sky Dolly uses a timer (a „high precision timer“, to be specific), starts at time 0 and then interpolates the recorded („sampled“) values at the exact time it receives a „simulated frame“ event (from FS 2020). So in theory it might happen that we never really access an actual sampled value (except the initial values at time zero), but only „values in between“.
And naturally that works regardless of whether the original samples had been sampled at 1 Hz, 5 Hz or even 60 Hz (of course the lower the sample rate „the less details“ are captured). In fact you can even change the sample rate during recording (if you wanted to).
The following older video (made with Sky Dolly v0.4) illustrates this nicely:
Note again that the replays have the exact same timing as the original video (top left) - except that „some maneuvres are lost“, depending on the sample rate. But that is exactly the point of this comparison ![]()
References: Spline interpolation - Wikipedia