View Full Version : H48 Demo Program Coordinates??

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.

Beau Schwabe
10-10-2006, 09:57 AM

I think you are correct.и When I put together the demo, I was more concerned with getting an angle relationship between the three different axis.
It's possible I got this relationship backward.

Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.