sonar changes
This commit is contained in:
parent
5c4b376047
commit
4b5e70730a
@ -37,8 +37,7 @@ public class RobotMap {
|
||||
public static double fWidth = 483.467261958;
|
||||
public static double fHeight = 362.600446468;
|
||||
public static int sonar = 2;
|
||||
//public static int goalHeight = 102;
|
||||
public static int goalHeight = 64;
|
||||
public static int goalHeight = 85;
|
||||
//Misc
|
||||
public static int mainArmPresetCollect = -5;
|
||||
public static int mainArmPresetTraverse = 10;
|
||||
|
@ -90,8 +90,8 @@ public class MainArm extends PIDSubsystem {
|
||||
return false;
|
||||
}
|
||||
public double getShooterAngleError(){
|
||||
double correctedHeight = (RobotMap.goalHeight + 26) - 44; //44 is the distance between the ground and the sonar
|
||||
return (180/Math.PI) * Math.atan(correctedHeight/(getSonarDistance()-5));
|
||||
double correctedHeight = (RobotMap.goalHeight + 24) - 44; //44 is the distance between the ground and the sonar
|
||||
return (180/Math.PI) * Math.atan(correctedHeight/(getSonarDistance()-1));
|
||||
}
|
||||
public double getSonarDistanceRaw(){
|
||||
return sonar.getVoltage();
|
||||
|
Loading…
Reference in New Issue
Block a user