Thanks to peg and rhinoceroshead.
Actually I need to calculate the tilt angle of an object from the horizontal plane in both X and Y axis( I am using ADXL213 -dual axis accelerometer).
To calculate the tilt angle ( PITCH=ASIN(Ax) and ROLL=ASIN(Ay) ) from the output signal I have to use the ASIN function.
PITCH=
ASIN (AX ) ROLL
= ASIN (AY )
where Ax and Ay both varies between -1 to +1 . I reqire a accuracy of about +/- 2 degree.
Pitch and roll are the tilt in X and y axis from the horizontal plane.
I agree with rhinoceroshead I do not require very high accuracy , so doing with a look up table may be good Idea.
"Find out what range of numbers you really need to respresent and how much accuracy you need and then represent it with a struct using chars and ints"
anybody there to explain this in some more detail with an example ?
Best regards ,
Sudip