PDA

View Full Version : How to do arcsine with Pic Basic Pro?



Ramius
- 23rd July 2012, 18:44
Hi All!
I think maybe I was asleep when this was discussed and to be honest most Google answer seem very confusing! What I would like to do is try to write a program in Pic Basic only this time since the caculation results can be either + or - maybe try a program using "longs"? The results I got from trying to other programs for the Memsic 2125 leave a lot to be desired when it come to accruacy. I know it is possible to accurately measure tilt as I bought Pittsburgh Digital Angle Gauge (Item 95998) at Harbor Freight and Tool. Where I am completely stuck is that there does not seem to be a way in Pic Basic to caculate ARCSINE! Since I really do not understand the math that well I am wondering if arcsine can be determined from the Pic Basic math funtion of "sin"? Thanks to all, Ed!

mackrackit
- 23rd July 2012, 20:16
Take a look at this
http://www.picbasic.co.uk/forum/content.php?r=202-Cordic-Trig-Functions-with-PicBasic-Pro

Ramius
- 24th July 2012, 00:37
Thanks Dave and I must be either incredibly dense or just plain stupid as I still do not understand. At first glance it looks like tables rather than a math formula? Is there an actual formula for arcsine?

SUNFLOWER
- 24th July 2012, 07:34
COS = SQR(16129 - SIN^2)

ANGLE= COS ATN SIN

COS & SIN ARE BRAD NUMBERS HERE, NOT FUNCTIONS
TWO SOLUTIONS -- COS COULD BE POSITIVE OR NEGATIVE.

http://www.harbornet.com/sunflower/sunrun.pbp

SEARCH FOR -- Get_Path: