Arcsine Problem
Exit
Posts: 2
Hi,
I have this equation, A = 180 - C - Arcsine( (B) / (SinC) )
As B and C is contantly changing i can't calculate the value and program it into the BASIC STAMP. I can't find any Arcsine function to do this operation. I need to find A and display it.
Please Help. My programming is lousy and my math is just as bad. Any help will be greatly appriciated.
Regards,
Exit
I have this equation, A = 180 - C - Arcsine( (B) / (SinC) )
As B and C is contantly changing i can't calculate the value and program it into the BASIC STAMP. I can't find any Arcsine function to do this operation. I need to find A and display it.
Please Help. My programming is lousy and my math is just as bad. Any help will be greatly appriciated.
Regards,
Exit
Comments
Are you aware that the Stamp expresses angles in brads from 0 to 255, and the result of SIN and COS as numbers between -128 and +127 to represent -1 to +1 with approximately 1% resolution?
The Stamp does have an arctangent function ATN, and the arcsine in the formula can be re written to use ATN instead. In normal math, arcsin(x) = arctan(x/sqr(1-x*x)). In Stampese, 1-x*x becomes 16384 - (x*x), because 128*128 stands in for "1*1" with 128 fractional parts.
If you want to make life easier, you could get a micromega math coprocessor and program your equation into it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com