To sine or not to sine, that is the...


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    24

    Unhappy To sine or not to sine, that is the...

    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?

  2. #2
    barkerben's Avatar
    barkerben Guest


    Did you find this post helpful? Yes | No

    Default

    I suspect you have already tried the manual:

    http://www.microengineeringlabs.com/...ces/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

Similar Threads

  1. To Generate Sine Wave Using PCPWM of PIC18F4331 (Issue)
    By Cyborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd March 2014, 13:39
  2. Sine wave
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th May 2009, 03:31
  3. Generating 3-phase sine wave..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 6th November 2008, 14:07
  4. sine pwm generation using pic16f72
    By kvrajasekar in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th October 2008, 09:02
  5. sine inverter
    By anybisi in forum General
    Replies: 0
    Last Post: - 21st March 2008, 11:08

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts