Go to Post Jon is very right, going forward I have a hard time envisioning any future Championship Chairman's award winners without a significant social media presence. It's just too big of an avenue to be ignored. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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
  #12   Spotlight this post!  
Unread 24-01-2002, 18:03
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
SQR can help you...

You can use the following to scale up or scale down your joysticks

Value = Sqr (Value) << 4

and

Value = Value* Value >> 8

Both transformations give you 0=>0 and 256=>256 but what happens in between is either concave or convex.

Try it out.

You will have to modify code I gave already to put the squaring or squareroot in the right place.

It should not be to hard to noodle out.

Basically it only works on positive values (just like the scaling only works on positive values) so you have to make sure whatever you are scaling is positive before you apply the operation.

Good luck.

Joe J.

P.S. This method of shifting was first introduced to me by Sister Mary Katherine at my highschool. Sister was a wonderful woman but not a wiz when it came to math. Her method of curving an exam was to either take the square root of a raw test score and then multiply it by 10 if the exam was too hard or to take the score, square it and then divide by 100 if it was too easy. She had no idea why it worked and didn't care. I puzzled about it for quite a while. Now I share it with you, generalized for base 16. JJ
 


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
switch speed control wayne 05 Programming 6 01-10-2003 09:35
Need a FIRST Robotics control system kershawrobotics General Forum 3 07-07-2003 09:49
Power, speed, and torque... AGH Gui Cavalcanti Technical Discussion 5 10-11-2002 19:02
more control options smokescreen Technical Discussion 17 05-03-2002 15:41
Prgm4 2 joystics control 1 speed cntrl??? punarhero Programming 7 21-02-2002 09:57


All times are GMT -5. The time now is 09:01.

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