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 / 6151
6150  |  6152
Subject: 
Navigation & Encoders
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 4 May 1999 13:58:43 GMT
Original-From: 
Weng, Andrew <ANDREW.WENG@VALUEOPTIONS.nomorespamCOM>
Viewed: 
816 times
  
I know this is not really handyboard specific but hey... Does anybody know
the equation for finding a heading (theta) from a current position P(x,y) to
a goal position G(x,y).  I sure there's a tangent in there somewhere but
I've already dredged up more trigonometry than I care to remember
implementing these shaft encoders.
By the way the encoders work great so far.  They are US Digital 360cts/rev
quadrature encoders.  I've interfaced them to the HB using their LS7084 IC.
The 7084 outputs the direction of revolution (low or high) and pulses out
the "clicks"  The pulses are too narrow to use with the standard encoder
routines so one channel from the encoder is also wired to the HB encoder
input.  I modified the sencode routines to check the direction bit from the
7084 before increasing or decreasing the running total of counts.  The cost
for a set of encoders, LS7084 and cables was about $100 from US Digital.
.


--
MIME ATTACHMENTS DISCARDED:

1.  Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    Content-Length: 1431



Message has 2 Replies:
  Re: Navigation & Encoders
 
(...) The angle relative to the x axis is given by: theta = arctan((y2 - y1)/(x2 - x1)) Remember, the tangent of an angle is the length of the opposite side divided by the length of the adjacent side of the corresponding unit right triangle (i.e., (...) (25 years ago, 4-May-99, to lugnet.robotics.handyboard)
  Re: Navigation & Encoders
 
(...) Dear Andrew, You want the angle that line joining G and P make with X axis. That is arctan of the slope of the line from P to G. slope =(yP-yG)/(xP-xG) hence, theta = arctan ((yP-yG)/(xP-xG)) where P=(xP,yP) and G=(xG,yG) Note that this angle (...) (25 years ago, 5-May-99, to lugnet.robotics.handyboard)

3 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