Range Finder with Laser pointers


Results 1 to 5 of 5

Threaded View

  1. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Range Finder with Laser pointers

    Ooops, I forgot my tan.


    Tan(angle) = Sin(angle) / Cos(angle)

    So to solve for B:

    (Sin(angle) * A)/Cos(angle) = B

    One thing kind of cool about using the PIC18 cordic for this is that is performs sin and cos at the same time, and it just takes about 185 uSecs on the faster chips. So it can do it over 5000 times per second, while giving you a pretty high resolution result (from 0 to 30,000). Then you can use the PIC18 cordic to solve the hypotenuse with the atan2 function. This saves you from having to use PBPL for accurate square root.
    Last edited by ScaleRobotics; - 16th February 2011 at 15:37. Reason: cordic details

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