mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 08:48:01 -06:00
attempt at fix all
notes: failed
This commit is contained in:
@@ -43,8 +43,6 @@ public class TrackTarget extends CommandBase {
|
||||
public double m_hoodTrim;
|
||||
public double m_turretTrim;
|
||||
|
||||
ShooterTables m_shooterTable;
|
||||
|
||||
/**
|
||||
* Uses the Limelight to track the target
|
||||
* @param shooterSubsystem The Shooter subsystem
|
||||
@@ -63,7 +61,6 @@ public class TrackTarget extends CommandBase {
|
||||
// Vision Processing Mode
|
||||
NetworkTableInstance.getDefault().getTable("limelight").getEntry("camMode").setNumber(0);
|
||||
NetworkTableInstance.getDefault().getTable("limelight").getEntry("ledMode").setNumber(3);
|
||||
m_shooterTable = new ShooterTables();
|
||||
}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@@ -92,21 +89,24 @@ public class TrackTarget extends CommandBase {
|
||||
SmartDashboard.putNumber("Distance to Target", distance);
|
||||
|
||||
//START Equation Code
|
||||
/*
|
||||
double yVel = Math.sqrt(2 * VisionConstants.GRAV * VisionConstants.TARGET_HEIGHT);
|
||||
double xVel = (distance * VisionConstants.GRAV) / (yVel);
|
||||
|
||||
fireVel = Math.sqrt((Math.pow(xVel, 2))+(Math.pow(yVel,2)));
|
||||
fireAngle = Math.atan(yVel/xVel) * (180/Math.PI);
|
||||
*/
|
||||
//END Equation Code
|
||||
|
||||
/*//START CSV Code
|
||||
fireVel = m_shooterTable.getVelocity(distance);
|
||||
fireAngle = m_shooterTable.getHood(distance); //Note: Ensure to follow because units are different
|
||||
//END CSV Code*/
|
||||
//START CSV Code
|
||||
fireVel = m_shooter.m_shooterTable.getVelocity(distance);
|
||||
fireAngle = m_shooter.m_shooterTable.getHood(distance); //Note: Ensure to follow because units are different
|
||||
//fireAngle = 33;
|
||||
//END CSV Code
|
||||
|
||||
|
||||
m_shooter.m_fireVel = fireVel;
|
||||
m_shooter.m_fireAngle = fireAngle + m_shooter.shooterTrims.m_hoodTrim;
|
||||
m_shooter.m_fireAngle = fireAngle;// + m_shooter.shooterTrims.m_hoodTrim;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user