Shop OBEX P1 Docs P2 Docs Learn Events
Using Trigonometric functions — Parallax Forums

Using Trigonometric functions

prabhatprabhat Posts: 4
edited 2010-08-18 13:51 in Propeller 1
Hi all,
I have been trying to compute inverse kinematics and hence using an object called SPIN_TrigPack. But I tried to verify the functions and see that it gives some absurd results. Then I read more and see that the arguments are in Qs15_16 ivalue format. What is that. For eg. Qs15_16 ivalue for 0.707 is 46333. Can anyone please help me with this
Thank you
Prabhat

Comments

  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-08-18 13:51
    Not totally sure on the format, but it appears to be a 16-bit fractional representation of the value.

    2^16 * 0.707 == 46333.952 (rounded down as integer math always does is 46333)
Sign In or Register to comment.