Filtering Angular Measurements I am trying to apply a filter to reduce noise in angular measurements. Since the data comes with noise, the filter needs to be able to handle measurements that are not smoothly progressing; for example, the filter should be able to work with a series like below:
2, 358, 3, 5, 10, 18 ... 304, 315, 330, 348, 9, 15

As you can see, the second measurement of 358 is an erroneous measurement. How can I reliably put this into a linear scale so that I can apply a regular filter like a moving average filter to the data.
I was initially thinking of setting a maximum change parameter, like 90 degrees, and if such a change is observed to correct that.
I am very new to signal processing. Maybe this is a very common problem that is easily handled. Hope you  can put me in the right direction.
Median filtering is non-linear, and pretty awesome about removing outliers.  You just need to adjust the length of the filter based on the estimate of the frequency of the errored samples.