yaw without a magnetometer in a mouse replacement

Hi, I'm thinking of starting a new project. I've been playing around with accelerometers, gps and a magnetometer for a while, I'm working on an autonomous boat.

So I got an idea for a new project. Replace the computer mouse with a ball. In this ball there would be various sensors. These sensors would allow the ball to know how you are moving in space : x,y,z, yaw, pitch, roll. Capacitive sensors would also be nice as they would allow the ball to know how you are touching it.

That way, you could hold the ball like you would a mouse, move it on the x,y plane and it would recognize taps on the top of it. But where it could really shine is that you could integrate all kinds of gestures as there are no better direction to hold the ball. If you spin it, it doesn't matter how it ends up and you can go back to using it as a standard mouse. Some gestures could be like spinning it on the yaw axis to scroll, making it roll towards x positive to make the volume louder on your computer, knocking it on the table to pause/play music...

I know this would probably end up being a massive amount of code, but I just can't get this idea out of my head. I've hit only one snag yet in thinking this out. How to keep track of the yaw angle? A magnetometer would work, but I don't think it would be too reliable indoors. Some leds like in the wii, but then it would be a bit quite complicated and would require setup before use, you know you couldn't just open your laptop and go.

I know you can find the yaw by integrating a gyro but I'm not sure how bad the drift would be on this thing, you could probably be in the 1 rotation per second range and having keeping the right angle would be crucial.

I was also thinking that if you have some emitters within the ball that could be picked up externally, you could find which way it's facing but than again, that would require some prior setup

Is there something I'm missing out on? Any fringe idea on how you could keep that angle. Any ideas are welcome!

Full 6-degrees of freedom might be needed (3-axis accel, 3-axis gyro). This is a 'standard' problem in UAV control. If the device is likely to be constrained to only yaw rotations a single gyro and two accelerometers would do.

However gyros drift with time, so you'd need some high-pass filtering to cancel the drift in yaw - or combine with magnetometer...

Your project is a lot like mine. I want to track the pointing direction of a laser pen and its shaking. I came up with the idea of using 2 3 axis accelerometers. Each on one end of a stick. These 2 points with a known relation to each other should allow calculation of rotation as well as acceleration, unless I have made a mistake in my thinking, freeing you from the gyro and its drift.

Douglas E Knapp

DouglasEK:
Your project is a lot like mine. I want to track the pointing direction of a laser pen and its shaking. I came up with the idea of using 2 3 axis accelerometers. Each on one end of a stick. These 2 points with a known relation to each other should allow calculation of rotation as well as acceleration, unless I have made a mistake in my thinking, freeing you from the gyro and its drift.

Douglas E Knapp

I'm not sure I understand how this idea would work, I don't really see the known relation between the two that could be calculated by an accelerometer.

In certain arrangements, you could get a centrifugal 'force' but I think that would be very small and probably wouldn't work in some orientations.

I'm interested, care to further explain?

Louis Leblanc