Subject:
|
Re: Trigonometry and NQC
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Wed, 12 Dec 2001 23:31:44 GMT
|
Viewed:
|
2859 times
|
| |
| |
Hi Richard,
No, NQC does not implement any of the trig functions. However, you can do
it yourself. The idea is to use a second order polynomial to approximate
the sine function. You can get pretty good accuracy (within about 5%) if
you break up the range between 0 and 90 degrees into about 3 segments and
use a different approximation in each. And you need to pay attention to the
limited word length in order to get the best accuracy without overflow.
good luck
Roger
|
|
Message is in Reply To:
| | Trigonometry and NQC
|
| Hi! I'm working on a project where a robot needs to travel a right triangle with unkown side lengths. Basically, the robot starts at a point in a room, travels perpendicularly toward a wall, turns 90 degrees left when it hits, and when it gets to (...) (23 years ago, 12-Dec-01, to lugnet.robotics.rcx.nqc)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|