This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumProgramming Questions & HelpSyntax › Sin and Inverse Sin

 Pages: 1
 Sin and Inverse Sin (Read 11250 times)
 06/01/08 at 18:56:45
 Titus   Offline Full Member Wiring Soccer Robot! Amsterdam Posts: 176
 Dear Barragan,We, Kars and I, wondered how to do the Inverse sinus/cosinus/tangens in wiring.A sinus doessin(angle);   => value from -1 to 1But how do you get the angle from that value between -1 and 1like:value is between -1 and 1sinInv(value);=> angle.Thanks for the fast reply!Titus   Check www.TeamVossius.nl for our Autonomous soccer robots! IP Logged
 Reply #1 - 06/02/08 at 22:56:15
 N201LJ   Offline YaBB Newbies darwin is my copilot USA Posts: 13
 Lookup table?It's not in the AVR math.h library?   alan duncan&&to email me, use: lastname dot firstname @ mac dot com IP Logged
 Reply #2 - 06/02/08 at 23:53:51
 barragan   Offline YaBB Administrator Posts: 939
 hi, here is the documentation of what´s included in avr math.h http://www.nongnu.org/avr-libc/user-manual/group__avr__math.htmlBy default the library is included in the Wiring sketch.   IP Logged
 Reply #3 - 06/03/08 at 16:40:15
 Titus   Offline Full Member Wiring Soccer Robot! Amsterdam Posts: 176
 The awnser I was looking for is:int x=round(  degrees  (  atan  (  1  )  )  );Barragan,perhaps in the reference, theatan();asin();acos();Could be added?The convert a number from -1 to 1, to the according value in radianBecause I needed it to be in degrees, and to be an int, I added the degrees() and the round() command.Found this out, perhaps more people need it.Titus   Check www.TeamVossius.nl for our Autonomous soccer robots! IP Logged
 Reply #4 - 06/04/08 at 16:04:07
 barragan   Offline YaBB Administrator Posts: 939
 definitely, I added it to the list.   IP Logged
 Reply #5 - 04/18/09 at 12:14:15
 Titus   Offline Full Member Wiring Soccer Robot! Amsterdam Posts: 176
 I needed it again today, but I didn't remember how to do it.It wasn't added to the reference yet?Luckely I found this topic againTitusP.S. change for 0019?   Check www.TeamVossius.nl for our Autonomous soccer robots! IP Logged
 Pages: 1