Wiimote Project

General Wiimote and Technology => Project Ideas => Topic started by: antmorton on March 05, 2010, 08:16:40 AM

Title: Pitch and Yaw in stationary position coding help with motionplus
Post by: antmorton on March 05, 2010, 08:16:40 AM
Hi guys

I'm in my final year at uni and am doing an interactive sound piece using the wii remote as kind of a head tracker. I only need the pitch and yaw in a single point. The user will be stood still with a wii remote with the motion plus attached to a pair of headphones. The values are then converted to midi which controls a specific VST plugin I have made.

The problem I am having is that my yaw 0 point is always changing. It starts at 0 fine, but sometimes it starts to increase without any movement. With a few minutes of rotational movement it's 0 point changes to a different direction/angle. I need the centre point to remain in the same place.

Also my pitch is jumping quite a lot although seams to work and its centre point always remains the same when the remote is laid flat.

I'm not a very competent coder and thus really need some help please!


This is the simple code I'm using:

//
var.Yaw = Wiimote.Yaw
var.Pitch = Wiimote.Pitch


midi2.Control30= (EnsureMapRange(var.Pitch, 90,-90, 0,1))
midi2.Control31= (EnsureMapRange(var.Yaw, -45,225, 0,1.5))

//


Extremely basic I know, but like I said, I aint very good at code!!


The ranges are for compatibility with my plugin, that's why it may seam a bit wierd at first glance!
Title: Re: Pitch and Yaw in stationary position coding help with motionplus
Post by: antmorton on March 08, 2010, 06:21:22 AM
Can anyone help me please?

Title: Re: Pitch and Yaw in stationary position coding help with motionplus
Post by: hank on May 19, 2010, 10:41:25 AM
Have you resolved your problem? I am a newbie to motion detection myself but just some ideas...

Are the Wiimote.Yaw and Wiimote.Pitch data structures pre-filtered data or just the "almost raw" data from the accelerometers? It makes sense that your Pitch data is more accurate because there is gravity as a reference point. It would be harder to measure movement in the horizontal plane. So you might need more filtering to get the results you want.
Title: Re: Pitch and Yaw in stationary position coding help with motionplus
Post by: shakespeare1212 on May 22, 2010, 12:18:47 AM
This not coding related but it may be important. It seems to me that if the Wii remote is attached to head phones on top of a person's head then the pivot point would be at the person's neck and not at the wii mote control as it would be when the control is sitting on a table.

I hope that this observation helps.

James.