Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/deploy/passingdata.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
57.5,1,1
124,1,1
263,1,1
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions src/main/deploy/velocityrangehub.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
57.5,1,1
124,1,1
263,1,1
14 changes: 4 additions & 10 deletions src/main/java/frc/robot/auto/ShooterFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,10 @@ public class ShooterFunctions {
private static final String velocityPathHub = "flywheelvelocitydatahub.csv";

/**
* Path to the CSV file containing hood angle calibration data for passing. Formatted as Distance,
* Path to the CSV file containing hood angle and flywheel velocity calibration data for passing. Formatted as Distance,
* Angle
*/
private static final String anglePathPass = "passinghoodangledata.csv";

/**
* Path to the CSV file containing flywheel velocity calibration data for passing. Formatted as
* Distance, Velocity
*/
private static final String velocityPathPass = "passingflywheelvelocitydata.csv";
private static final String passingPath = "passingdata.csv";

/**
* Path to the CSV file containing minimum and maximum velocities to shoot at. Formatted as
Expand Down Expand Up @@ -135,7 +129,7 @@ private UnivariateFunction loadFlywheelDataHub() throws IOException {
*/
private UnivariateFunction loadHoodAngleDataPass() throws IOException {
SplineInterpolator interpolator = new SplineInterpolator();
double[][] data = CSVLoader.loadCSV(anglePathPass);
double[][] data = CSVLoader.loadCSV(passingPath);
double[] x = new double[data.length];
for (int i = 0; i < data.length; i++) {
x[i] = data[i][0];
Expand All @@ -158,7 +152,7 @@ private UnivariateFunction loadHoodAngleDataPass() throws IOException {
*/
private UnivariateFunction loadFlywheelDataPass() throws IOException {
SplineInterpolator interpolator = new SplineInterpolator();
double[][] data = CSVLoader.loadCSV(velocityPathPass);
double[][] data = CSVLoader.loadCSV(passingPath);
double[] x = new double[data.length];
for (int i = 0; i < data.length; i++) {
x[i] = data[i][0];
Expand Down