Go to Post Who says engineers can't be poets? - Wayne TenBrink [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 05-12-2001, 23:57
John Nielson John Nielson is offline
Registered User
None #0857 (Superior Roboworks)
Team Role: Alumni
 
Join Date: Dec 2001
Rookie Year: 1998
Location: Da U.P. eh
Posts: 3
John Nielson is an unknown quantity at this point
Send a message via AIM to John Nielson
Polar . . . Killough???

For the Question of the Killough the first thing you need to realize is that the
formula is not all that complex. ill just discuess the simple one.

w = abs ( V ) / ( R ) * ( SIN ( theda ) ) + ( Torque * Length ) / R

for my example i can remove the end and multiply by R to just work in speed.

Velocity = abs ( SYS_Velocity ) * ( SIN ( Theda ) )

to work around the sin think of it in terms of only the ratio of Opp / Hyp

verables working with are X and Y on the joy stick

POLAR: THE R VALUE (Hyp)
to get the R value of from the X and Y is easy
'step 1 get the values in 2's complement
Y = ABS ( ( 127 - Y ) ) MIN 0 MAX 254
X = ABS ( ( 127 - X ) ) MIN 0 MAX 254
'step 2 a^2 + b^2 = c^2
SYS_Velocity = SQR ( ( X * X ) + ( Y * Y ) ) MIN 0 MAX 254

Simple eh

Finally
sin ( angle ) = Opp / Hyp
So to bring the value to equal to that returned by a sin in PBASIC i did is took
the equation and replaced it with 254 * Y / SYS_Velocity

Velocity = abs ( SYS_Velocity ) * ( ( 254 * Y ) / SYS_Velocity )

there is my $.02 have fun and see what you can do
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC ARCTAN function Greg Ross Programming 14 11-05-2003 12:28
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
PBASIC Loop Speed? archiver 2001 3 23-06-2002 23:46


All times are GMT -5. The time now is 20:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi