To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1495
1494  |  1496
Subject: 
Re: Problems with NQC and math operations
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sun, 2 Feb 2003 20:30:07 GMT
Viewed: 
5539 times
  
Dean,

Well, that was the problem...changing the 10000 to 100 makes me get a value
back, however I think the error is too big for the robots to navigate
effectively..I'll probably have to learn legOS so I can use floating-point
and get more precise values.

Thanks for your help,

Jeff



Message has 1 Reply:
  Re: Problems with NQC and math operations
 
In lugnet.robotics.rcx.nqc, Jeff Merrick writes: I'll probably have to learn legOS so I can use floating-point (...) Hi Jeff: If you are going to learn a new way of programming the RCX, I recommend LeJos. It implements the Java Math class in an (...) (21 years ago, 4-Feb-03, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: Problems with NQC and math operations
 
Jeff, Your problem is with the 16 bit integer size that NQC uses. All integers are in the range -32768 to 32767. Using 10000 to simulate fixed point math operations is killing you. Everything works when you replace theta and D with constants because (...) (21 years ago, 2-Feb-03, to lugnet.robotics.rcx.nqc)

6 Messages in This Thread:


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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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