To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7151
7150  |  7152
Subject: 
Re: evaluate inverse cosine, sine in IC
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 29 Nov 1999 21:46:30 GMT
Viewed: 
824 times
  
Another technique for finding trig functions and their inverses  used by both
HP and TI in their calculators is the CORDIC algrorithm.  A description of the
technique with lots of references can be found at:
http://www.ti.com/calc/docs/faq/83faq086.htm

Barry


In lugnet.robotics.handyboard, "Jeroen van der Vegt"
<A.J.vanderVegt@ITS.TUDelft.nl> writes:
Taylor series should converge quite rapidly. After 2 or 3 terms, the error
is usually neglectable (depending or your demands, of course: this should be
fine for up to a few decimals)

For those not familiar with the Taylor expansion, I've added a small picture
containing the formula.


----- Original Message -----
From: Gary Livick <glivick@pacbell.net>
To: Will <nepenthe@montana.com>
Cc: Handyboard Mailing List <handyboard@media.mit.edu>
Sent: Monday, November 29, 1999 7:44 PM
Subject: Re: evaluate inverse cosine, sine in IC


I've been trying to do this as well.  The problem I have found is that the
Taylor series expansion needs to be developed near the solution to get
accurate results.

Some may wonder why finding the arcsine of a number might be of interest.
If one has a robot that is sitting at some angle to a wall, and by using a
ranging device of some kind (SONAR, IR ranging) mounted on a servo is able
to get two ranges to the wall, the first at one angle from the robot and the
second at a different angle from
the robot, then the angle of the robot axis to the wall can be determined.
In dead reckoning navigation, it is often necessary to update robot position
from known landmarks.

To do this calculation, the "law of cosines" is first used, and the
interim results are then used in the "law of sines" to get the angle.
Arcsine is needed in the last calculation.

One could generate a lookup table to go into in memory to find the angle,
but what a waste of space.  It would be nice if Motorola had a freeware math
function of arcsine, but they appear not to.  After days of head scratching,
I have yet to turn up a simple algorithm to calculate arcsine from a random
argument.  Any math majors out
there with nothing to do?

Thanks for any help,

Gary Livick



Will wrote:

bedirhan wrote:

Hi, is there a way to evaluate inverse cosine and sine using IC? Thx

The most efficient way to do it is to use Taylor Series approximations
of the functions.  Decide how much precision you need, and then write
functions that evaluate the first few terms in the appropriate series.

Usually, a series will converge quite rapidly, and only half a dozen or
so terms are needed.  For example, if the sixth term in the series is on the
order of 1.0E-6, then you're getting close to the limit of single-precision
arithmetic anyway (and certainly close enough for horse shoes, hand
grenades, and tactical nuclear weapons).

-- Will



--
MIME ATTACHMENTS DISCARDED:

1.  Content-Type: image/gif;
    name="ASINACOS.GIF"
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment;
    filename="ASINACOS.GIF"
   Content-Length: 4881



Message is in Reply To:
  Re: evaluate inverse cosine, sine in IC
 
Taylor series should converge quite rapidly. After 2 or 3 terms, the error is usually neglectable (depending or your demands, of course: this should be fine for up to a few decimals) For those not familiar with the Taylor expansion, I've added a (...) (25 years ago, 29-Nov-99, to lugnet.robotics.handyboard)

6 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR