| View previous topic :: View next topic |
| Author |
Message |
davim
Joined: 24 Jul 2007 Posts: 1
Digg It |
Posted: Tue Jul 24, 2007 10:01 am Post subject: Roll and Pitch |
|
|
Is there a way of getting roll and pitch directly from cwiid libwiimote? I only know how to get accelerometer raw data do I need to calculate the angles myself????
Thanks! |
|
| Back to top |
|
 |
abstrakraft
Joined: 27 Dec 2006 Posts: 107
Digg It |
Posted: Sat Aug 04, 2007 2:04 pm Post subject: |
|
|
Yes, you need to calculate the angles yourself. However, there are examples of how to do this in the wminput plugin sources. _________________ "I seldom let practicality get in the way of my fascination with shiny things and blinky lights."
- some guy
http://abstrakraft.org/cwiid |
|
| Back to top |
|
 |
Ethanfel
Joined: 02 Sep 2007 Posts: 6
Digg It |
Posted: Tue Jan 29, 2008 6:47 pm Post subject: |
|
|
i dont find any examples  |
|
| Back to top |
|
 |
para
Joined: 20 Aug 2007 Posts: 89
Digg It |
Posted: Tue Jan 29, 2008 7:08 pm Post subject: |
|
|
| davim wrote: | Is there a way of getting roll and pitch directly from cwiid libwiimote? I only know how to get accelerometer raw data do I need to calculate the angles myself????
Thanks! |
The wiiuse library will calculate pitch, roll, and yaw (if IR is enabled) for you. Check out my sig for the link.
Here's an example of what this would look like in your code:
| Code: | printf("wiimote roll = %f\n", wm->orient.roll);
printf("wiimote pitch = %f\n", wm->orient.pitch);
printf("wiimote yaw = %f\n", wm->orient.yaw); |
_________________ wiiuse C wiimote library - http://wiiuse.net/ |
|
| Back to top |
|
 |
Ethanfel
Joined: 02 Sep 2007 Posts: 6
Digg It |
Posted: Wed Jan 30, 2008 12:22 pm Post subject: |
|
|
| many month as past since i have look for wiimote under linux, and is there any improvement in the rawforce data ( when you shake wiimote) whith CWIID ? |
|
| Back to top |
|
 |
para
Joined: 20 Aug 2007 Posts: 89
Digg It |
Posted: Wed Jan 30, 2008 2:35 pm Post subject: |
|
|
| Ethanfel wrote: | | many month as past since i have look for wiimote under linux, and is there any improvement in the rawforce data ( when you shake wiimote) whith CWIID ? |
You want to know how many gravity forces are being applied to each axis? _________________ wiiuse C wiimote library - http://wiiuse.net/ |
|
| Back to top |
|
 |
Ethanfel
Joined: 02 Sep 2007 Posts: 6
Digg It |
Posted: Wed Jan 30, 2008 4:09 pm Post subject: |
|
|
humm, i dont know how to say this exatly.
Wiimote can, whem you shake her in X or Y axe speedly , she can make action.
With glovepie, the code is like this :
| Code: |
var.xRot = Wiimote.RawForceX
var.yRot = Wiimote.RawForceY
if var.yRot >= 100 then v = true else v = false
if var.xRot >= 100 then h = true else h = false
|
when i shake my wiimote verticaly (y), i obtain the key "v"
i search everywere, i dont find how to make it with cwiid. |
|
| Back to top |
|
 |
|