Finding the average of multiple coordinate paths

438 Views Asked by At

I'm not entirely sure what methodology I should use to go about this.

I've got multiple sets of flight data containing latitude, longitude, and altitude at different times for those points. What I want to do is find the average path a given flight takes in that three-dimensional space.

Is there any algorithm that can help with determining this? I'm currently using python for computation, but can try a different language such as R if you happen to know of some existing functionality. Pure math is fine too, of course.

2

There are 2 best solutions below

3
On BEST ANSWER

Suppose for altitude, you have a set of data: $A_1(a_1,t_1)...A_n(a_n,t_n)$ where $a_n$ is the altitude at time instant $t_n$.

Since the recording frequency is highly irregular(as you stated in your comment), I suggest you to interpolate the data. Polynomial interpolation, spline interpolation and Gaussian process are all good candidates. In addition, I believe a computer version of these algorithms(in the language you are using) should be very common and open-sourced, as long as you don’t demand too much.

After interpolation, you will have a function $A(t)$. If you want the average of three flight’s altitudes, you can consider: $$A_{average}(t)=\frac{A_A(t)+A_B(t)+A_C(t)}{3}$$

Same for other dimensions.

0
On

This might not be a good average.

Take two paths $A=[(x_a,t_a),...,(x_b,t_b)]$ and $B=[(y_{\alpha},t_{\alpha}),...,(y_{\beta},t_{\beta})]$. Suppose they have a shift in real time by $\tau$. So define $t_{\alpha}=t_a+\tau$

The two paths may have different many points that taken at different recording periods. We fill in the gaps by inter- and extrapolating your data.

$A'=[(x'_0,t'_0),(x'_1,t'_1),...,(x'_n,t'_n)]$ and $B'=[(y'_0,t'_{0}+\tau),(y'_1,t'_{t_1}+\tau),...,(y'_n,t'_{n}+\tau)]$

Now you have two paths that have $n+1$ many points.

If the pilot tried to fly on an ideal path (and is a good pilot) for all the paths then the following makes sense:

You look at the sum of the differences of the two paths and minimize it by changing $\tau$. I.e. find $$\min\left(\sum_{k=0}^{n}x'_k-y'_k \right). $$

Every time you change $\tau$ the path $B$ shifts in time. This means the differences will change. Once you find the ideal shift $\tau_0$, you keep that shift for $B$.

Take a third path $C=[(z_{\gamma},t_{\gamma}),...,(z_{\delta},t_{\delta})]$ and fill in the gaps with $A$ and $B$. Then you obtain $C'=[(z'_0,t'_0+\tau),(z'_1,t'_1+\tau),...,(z'_m,t'_m+\tau)]$. You have to extend $A, B$ from $n+1$ to $m+1$ points too. Finally you minimize the sum again $$\min\left(\sum_{k=0}^{n}x'_k-y'_k -z'_k\right), $$ for different $\tau$. Find the ideal shift $\tau_1$ and repeat with the rest of the paths. Then all your paths will have equally many points with equal time steps. Now take the average of all the paths $A',B'C',...$.