John Abshier

10-10-2006, 05:27 AM

It appears that +Z is down, +Y is toward the edge with 4 resistors and the perpendicular black thing and +X is toward the side with the data pin.· This is a right hand coordinate system.· If I rotate about the x axis (little black thing down), ThetaC increases as expected. With the sensor approximately flat, ThetaC is close to zero (actually 359).· However, ThetaB is 90 with the sensor horizontal.· I also changes in the wrong direction, i.e., a positive rotation about the Y axis decreases the angle.· I made the following chang to the code:

············· mov······ cx,···················· z_ 'x_····························· 'Get theta of ZX

············· mov······ cy,···················· x_ 'z_

This gave ThetaB=359 with the sensor near horizontal and positive increase in angle for increasing value of x or positive rotation about the Y axis.

Am I going in the right direction? Pun intended.

············· mov······ cx,···················· z_ 'x_····························· 'Get theta of ZX

············· mov······ cy,···················· x_ 'z_

This gave ThetaB=359 with the sensor near horizontal and positive increase in angle for increasing value of x or positive rotation about the Y axis.

Am I going in the right direction? Pun intended.