To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4834
4833  |  4835
Subject: 
Re: FW: Something else is needed, I think...
Newsgroups: 
lugnet.robotics
Date: 
Tue, 4 May 1999 18:43:29 GMT
Original-From: 
John A. Tamplin <jat@(NoMoreSpam)liveonthenet.com>
Viewed: 
2863 times
  
On Tue, 4 May 1999, Kekoa Proudfoot wrote:

> > - Floating point is not optional. You may reduce the precision to a few
> > bits, or do a few hacks instead of a full blown floating point support,
> > but we definitely need some sort of floating point. If you want a bot
> > that keeps track of it's position, you need it (you also need at least a
> > sin() function/lookup table). Just one example.
> 
> My take on this is that you can use fixed point if you really need extra
> decimal places.  That is, work in fractions, not whole numbers.

Remember that a floating point number is still stored as "integers" in RAM
and simply represents m*2^e where m is the mantissa and e is the exponent.
FP is useful when you need to represent a wide range of values, since you
can have 24 bits of precision located anywhere throughout the range (in
IEEE 32-bit floats).  If you need precision in a range that doesn't vary
much, using fixed-point math is superior since you aren't wasting bits
on the exponent.  Ie, treat your 32-bit integer as having a decimal after
16 bits.

> Providing sin() is difficult because of the tradeoff between memory usage
> and usability.  My thoughts are that the cost of memory usage outweighs the
> benefit of having the functions available for the few (?) that will use
> them.

It depends on the resolution required.  A sin() table with quarter-degree
resolution is under 700 bytes (store 0-45 and compute the others from that
value).  Computing sin() on the fly doesn't take much space, but takes time
(typically about 12 multiply/adds depending on the approximation).

John A. Tamplin Traveller Information Services
jat@LiveOnTheNet.COM 2104 West Ferry Way
256/705-7007 - FAX 256/705-7100 Huntsville, AL 35801

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message is in Reply To:
  Re: FW: Something else is needed, I think...
 
(...) Do you mean, when a timer reaches a certain value, run a specified task? Can't you do this already, or is something broken with the current firmware in this regard? (It seem that some combination of wait and start_task should do the trick, (...) (27 years ago, 4-May-99, to lugnet.robotics)

32 Messages in This Thread:












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

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