PDA

View Full Version : To sine or not to sine, that is the...



srob
- 12th November 2005, 23:16
I wish to use an accelerometer to measure the angle of a rocket launcher (model, that is!) and display the result as degrees (sort of digital spirit level). I am using a +/- 1G accelerometer that give 5V out for 9.81ms-2. So to get the angle I need to take the cosine of the acceleration. I see that in PBP there is a SINe command, but am not to sure how to use it. It also has the additional problem of being in radians! Can anyone help?

barkerben
- 12th November 2005, 23:32
I suspect you have already tried the manual:

http://www.microengineeringlabs.com/resources/pbpmanual/

It has some info on using the SIN/COSINE operators. As for radians, is this a problem? Converting between radians and degrees is quite simple if needs be:

2pi radians in 360 degrees. PBP doesn't have a PI function, but you could easily define a constant that is ~pi (3.141....)

How exactly are you getting the angle from the acceleration?

Sorry not to be more help.

Ben