PDA

View Full Version : Need help - Time for some maths!



financecatalyst
- 12th October 2011, 23:00
Hi, I would like to know if there is any way I can calculate values like Sin (or sin-1) or Cos (or cos-1) in degrees or radians if possible in PBP.
As always, thanks in advance.

mackrackit
- 13th October 2011, 00:10
http://www.picbasic.co.uk/forum/content.php?r=202-Cordic-Trig-Functions-with-PicBasic-Pro

SUNFLOWER
- 13th October 2011, 00:46
' There is no arcsine. Brad circles are 256 units. The radius 127. The Hypotenuse squared 16129.

' X = SQR ( H * H - Y * Y ) same as Cosine = SQR( 16129 - Sine * Sine ). Angle = Arctangent Sine/Cosine

' Altitude brad angle = arctangent (Y/X) X ATN Y

financecatalyst
- 13th October 2011, 19:40
Ok, I had too many imodiums by now.

I am going to explain what I am planning to do, so any suggestion will be appreciated.
My project requires me to calculate power factor of an inductive load. I am thinking of getting the values for V & I from the hall effect sensors.
I am still struggling to know how to get value for real power. Once I have these three values, I can calculate the power factor. Now suppose I get the power factor to be 0.4.

How do I calculate Cos-1(0.4) or Sin-1(0.4)? A little starting point with the code will go a long way. Thanks