# Tag Info

12

The lag in the compass is because of a low-pass filter, to suppress high frequency noise. There exist more expensive magnetometers which have less noise, and therefore, less lag. It is also possible to use a gyroscope to improve accuracy. In fact, this is what Inertial Measurement Units (IMUs) do. This can be accomplished by using a Kalman filter. ...

6

I would model this as a one-state system (x), with the gyro as the control input. The gyro noise becomes state input noise, the compass noise becomes measurement noise. So your system model becomes $$\hat{\dot \theta} = \omega_{gyro} + w$$ $$\hat y = \hat x$$ where $\hat y$ is the filter's estimate of direction, which you compare to the compass direction ...

4

I encountered this problem myself when making an extended Kalman filter for a quadrotor. You have to check if the estimate goes above or below +/- pi, and then correct it if it does. You can do this with a simple if statement: if (angle > pi) angle = angle - 2*pi; else if (angle < -pi) angle = angle + 2*pi; You could also throw in a while ...

4

A compass will work just fine under water, I am an avid scuba diver and a compass is a standard piece of kit for navigating.

4

A gyro is the simple answer. I've always heard, gyro for the short measurements, compass for the long. And realistically a cup of kallman filter between the two most of the time. The price of a 6DOF gyro/acc board is less than \$20 these days, far too cheap to not use one. At one time, I worked through someone else's Kallman filter. and got it working. A ...

3

There will be no control input term. You should take (x, xdot) as your state vector to formulate the Kalman filter properly. The primary sources of noise are the compass and the gyroscope. The gyroscope noise and drift are significant. It is pretty challenging to overcome magnetic distortion in general but there are compensation techniques. The assumption of ...

2

For both states, you are using sensors to give you the required information. One way to make this work properly: Use the gyroscope reading for your ω and your previous state estimate for your θ (or initial state estimate if its the first iteration). This is the predict step of the filter. Then for the update step you can use your compass measurement (...

2

We always need a reference for calibration to which we calibrate our sensor. For example in case of 3D accelerometer we use gravity as a reference which is assumed vertically downwards at a place. For magnetometer calibration we use Earth's magnetic field as a reference. But we dont know the direction of resultant magnetic field vector at the place ...

1

Any magnetic compass absolutely will work underwater. Several companies (e.g., PNI, OceanServer) build and sell electronic compass modules based on flux-gate technology specifically for underwater applications. Buoyancy gliders and small AUVs or ROVs usually rely on flux gate compasses to sense heading because they are small, relatively inexpensive, and ...

1

You may want to take a look at FreeIMU library that does 'data fusion' that combine raw data from multiple sensors and present user with a much reliable, stable and easy-to-use data in a roll, pitch and yaw (direction as you require) format. FreeIMU http://www.varesano.net/projects/hardware/FreeIMU This version from the original author use MPU60X0 chip. ...

Only top voted, non community-wiki answers of a minimum length are eligible