| | 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 (...) (22 years ago, 2-Feb-03, to lugnet.robotics.rcx.nqc)
|
|
| | Re: Problems with NQC and math operations
|
|
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 (...) (22 years ago, 2-Feb-03, to lugnet.robotics.rcx.nqc)
|
|
| | 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 (...) (22 years ago, 4-Feb-03, to lugnet.robotics.rcx.nqc)
|
|
| | Re: Problems with NQC and math operations
|
|
Roger, I'd seen LeJOS mentioned but hadn't considered it as an option...that should really work well for what I'm doing.. Thanks, Jeff (22 years ago, 5-Feb-03, to lugnet.robotics.rcx.nqc)
|