# Calculating weights in a particle filter experiment using multiple state variables

I am trying to implement a particle filter for coupling gyro and electronic compass for better measuring device orientation. [related question]

I understand my state vector would contain the absolute angle and turn-rate and my observation vector contains the readings for the same from the compass and gyro.

In my transition model, I just use the constant turn-rate assumption plus random noise to move the particles to their next states. Then, when I get a set of readings (angle and turn-rate from the sensors) in the next time instant, how do I assign weights to the particles? Is there a systematic procedure to assign the weights for a state vector containing multiple variables or should I just calculate it based on the difference between the predicted value and the observed value for both compass and gyro?

i.e.: weight(particle X) = RMS(angle(Particle X) - angle(sensor), rate(Particle X )- rate(sensor)), and then normalize all the readings?

EDIT:

Let me explain my problem a little further. I am working on the basis that the electronic compass alone is subjected to magnetic interferences in the indoor environment and hence the gyro should be used along with it to improve the accuracy of orientation.

Now, these magnetic interferences will form the external/environment noise of the process and will definitely be non-Gaussian, since they are bound to be biased towards the side of the metallic structure. That is why I chose the Particle filter over say, the Kalman filter although it is the most preferred method. So when I really don't know the pdf of the noise, then how do I estimate the likelihood that a predicted value is equal to a real value (which would be its weight, right?)

Assuming a normal distribution in this case would not work, because it would give me wrong probabilities for particles. Atleast, this is what I understand; please correct me if I'm wrong.