Go to Post Let's not fight, please. Discuss yes, fight no. Please. :) - JaneYoung [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-03-2013, 02:18
zatch bell stev zatch bell stev is offline
Registered User
FRC #2523
 
Join Date: Jan 2012
Location: vermont
Posts: 14
zatch bell stev is an unknown quantity at this point
Re: Gyro problem, please help!

Quote:
Originally Posted by Gigakaiser View Post
For example, if you know the robot is straight and you want to turn 30 degrees (but your gyro drift is adding up), you could turn to gyro.getAngle() + 30.0. Another solution, as MagiChau wrote, is to reset the gyro if you know where your robot is pointed.
public void operatorControl() {

double lastAngle = 0;
double newAngle =0;
double realAngle = 0;
gyro.reset();
while (isEnabled() && isOperatorControl()) {
double move = y.getY();
motor.set(move/5);

if (move > 0.01 || move < -0.01) {
newAngle = gyro.getAngle();
lastAngle = realAngle;
} else {
realAngle = newAngle + lastAngle;

gyro.reset();

}

System.out.println(realAngle);
System.out.println(move);
Timer.delay(0.05);

}
}
do you think this will work ?
  #2   Spotlight this post!  
Unread 20-03-2013, 07:19
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,533
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Gyro problem, please help!

Zach, 1 degree every 1-3 minutes is actually good performance from the KOP gyro. As far as I know, you're not going to be able to improve on it substantially.

Perhaps you can tell us the application. I can't think of many applications for a gyro that would be messed up by 1 degree over the course of the match.
Closed Thread


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


All times are GMT -5. The time now is 23:16.

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