Assume I have two points in $R^2$:

$P_{t=0} = (x_1, y_1)$ and

$P_{t=1} = (x_2, y_2)$

at $t=1$ I want to calculate the heading angle/orientation of the particle. Both points have measurement noise of N, and the noise is constant.

To calculate the orientation:

$\theta = arctan2((x_{1} - x_{2}), (y_{1} - y_{2}))$

However, I need some uncertainty around $\theta$, that accounts for the noisy x and y values.

I have done the following to try and calculate an error on theta.

$ \delta( \ atan2(\Delta x, \Delta y) \ ) = \sqrt{\Sigma_{i} \ \ \big(\delta(a_i) . \frac{d(atan2(\Delta x, \Delta y))}{da_i}}\big)^2$

Where: $ a_i \ \epsilon \ [\Delta x, \Delta y]$

$ \Delta x = x_1 - x_2 \ \ \ $ $ \Delta y = y_1 - y_2$

$\frac{d(atan2(\Delta x, \Delta y))}{da_i}$ is the partial derivative of atan2.

$\delta(a_i)$ is effectively the noise on $\Delta x \ or \ \Delta y$

i.e. $\delta(\Delta x)$ or $\delta(\Delta y)$ depending on $i$.

$\delta(\Delta x) = \sqrt{ N^2 + N^2 }$

I DO NOT propagate error when calculating the partial derivative of arctan2. Should I be doing this?

I tried to test this error on $\theta$, by computing a Gaussian of theta and the error. In about ten random samples of this distribution, I get perhaps one value that is indeed close to theta. But it seems a bit poor - not good enough of an error for theta.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.