diff --git a/.idea/artifacts/release.xml b/.idea/artifacts/release.xml new file mode 100644 index 0000000..229751d --- /dev/null +++ b/.idea/artifacts/release.xml @@ -0,0 +1,17 @@ + + + $PROJECT_DIR$/out/artifacts/release + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/TBA_APIv3_Java_Library.xml b/.idea/libraries/TBA_APIv3_Java_Library.xml new file mode 100644 index 0000000..bb95285 --- /dev/null +++ b/.idea/libraries/TBA_APIv3_Java_Library.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java b/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java index 3a314dd..2e55a83 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/EventReport.java @@ -122,9 +122,9 @@ public void fixInaccuraciesTBA() { "Climbing"); } - if (actualAutoRun != entry.getAutonomous().isReachHabLine()) { + if (actualAutoRun != entry.getAutonomous().isCrossHabLine()) { inaccuracies += "auto run, "; - entry.getAutonomous().setReachHabLine(actualAutoRun); + entry.getAutonomous().setCrossHabLine(actualAutoRun); } diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java b/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java index b0b7e66..3fa7d97 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/TeamReport.java @@ -10,7 +10,6 @@ import java.util.HashMap; import static org.usfirst.frc.team25.scouting.data.Statistics.average; -import static org.usfirst.frc.team25.scouting.data.Statistics.sum; /** * Object model containing individual reports of teams in events and methods to process data @@ -22,11 +21,13 @@ public class TeamReport { private final transient ArrayList entries; private final int teamNum; - private String teamName = "", frequentRobotCommentStr, allComments; + private String teamName, frequentRobotCommentStr, allComments; public TeamReport(int teamNum) { this.teamNum = teamNum; entries = new ArrayList<>(); + teamName = ""; + frequentRobotCommentStr = ""; } @@ -43,42 +44,43 @@ public String getQuickStatus() { statusString += " - " + getTeamName(); } - statusString += "\n\nAutonomous:\n"; + statusString += "\n\nSandstorm:"; ArrayList autoList = SortersFilters.filterDataObject(entries, Autonomous.class); - statusString += "\nAvg. cargo ship cargo: " + Statistics.round(average(autoList, "cargoShipCargo"), 2); - statusString += "\nAvg. cargo ship hatches: " + Statistics.round(average(autoList, "cargoShipHatches"), 2); - statusString += "\nAvg. rocket cargo: " + Statistics.round(average(autoList, "rocketCargo"), 2); - statusString += "\nAvg. rocket hatches: " + Statistics.round(average(autoList, "rocketHatches"),2); - statusString += "\nAvg. cargo dropped: " + Statistics.round(average(autoList, "cargoDropped"), 2); - statusString += "\nAvg. hatches dropped: " + Statistics.round(average(autoList, "hatchesDropped"), 2); - statusString += "\n\nTele-Op:\n"; + String[] autoMetricNames = new String[]{"cargoShipHatches", "rocketHatches", "cargoShipCargo", "rocketCargo", + "hatchesDropped", "cargoDropped"}; + + for (String metric : autoMetricNames) { + statusString += "\nAvg. " + StringProcessing.convertCamelToSentenceCase(metric) + ": " + Statistics.round(average(autoList, metric), 2); + } + + + statusString += "\n\nTele-Op:"; ArrayList teleList = SortersFilters.filterDataObject(entries, TeleOp.class); - statusString += "\nAvg. cargo ship cargo: " + Statistics.round(average(teleList, "cargoShipCargo"),2); - statusString += "\nAvg. cargo ship hatches: " + Statistics.round(average(teleList, "cargoShipHatches"),2); - statusString += "\nAvg. rocket level 1 cargo: " + Statistics.round(average(teleList, "rocketLevelOneCargo"),2); - statusString += "\nAvg. rocket level 2 cargo: " + Statistics.round(average(teleList, "rocketLevelTwoCargo"),2); - statusString += "\nAvg. rocket level 3 cargo: " + Statistics.round(average(teleList, "rocketLevelThreeCargo"),2); - statusString += "\nAvg. rocket level 1 hatches: " + Statistics.round(average(teleList, "rocketLevelOneHatches"),2); - statusString += "\nAvg. rocket level 2 hatches: " + Statistics.round(average(teleList, "rocketLevelTwoHatches"),2); - statusString += "\nAvg. rocket level 3 hatches: " + Statistics.round(average(teleList, "rocketLevelThreeHatches"),2); - statusString += "\nAvg. cargo dropped: " + Statistics.round(average(teleList, "cargoDropped"),2); - statusString += "\nAvg. hatches dropped: " + Statistics.round(average(teleList, "hatchesDropped"),2); - - statusString += "\n\nEndgame:\n"; - ArrayList postList = SortersFilters.filterDataObject(entries,PostMatch.class); + String[] teleMetricNames = new String[]{"cargoShipHatches", "rocketLevelOneHatches", "rocketLevelTwoHatches", + "rocketLevelThreeHatches", "cargoShipCargo", "rocketLevelOneCargo", "rocketLevelTwoCargo", + "rocketLevelThreeCargo", "hatchesDropped", "cargoDropped"}; + + + for (String metric : teleMetricNames) { + statusString += "\nAvg. " + StringProcessing.convertCamelToSentenceCase(metric) + ": " + Statistics.round(average(teleList, metric), 2); + } + + + statusString += "\n\nEndgame:\n"; - statusString += "\n Avg. total points: "; + ArrayList postList = SortersFilters.filterDataObject(entries, PostMatch.class); - statusString += "\n\nOverall:\n"; + statusString += "\n\nOverall:"; + statusString += "\nAvg. calculated total point contribution: "; - statusString += "\n Common Quick Comments: " + "\n" + frequentRobotCommentStr; + statusString += "\n\nCommon quick comments:\n" + frequentRobotCommentStr; return statusString; @@ -130,6 +132,7 @@ public void findFrequentComments() { } for (String comment : frequentRobotComment) { + System.out.println(comment); frequentRobotCommentStr += StringProcessing.removeCommasBreaks(comment) + " \n"; } diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/models/Autonomous.java b/src/main/java/org/usfirst/frc/team25/scouting/data/models/Autonomous.java index 00a75bc..cfe0d00 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/models/Autonomous.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/models/Autonomous.java @@ -6,24 +6,32 @@ */ public class Autonomous { - private int rocketCargo; - private int rocketHatches; + + private boolean crossHabLine; + private int cargoShipHatches; + private int rocketHatches; + private int cargoShipCargo; + private int rocketCargo; + + private boolean frontCargoShipHatchCapable; + private boolean sideCargoShipHatchCapable; + private int hatchesDropped; private int cargoDropped; - private boolean reachHabLine; - private boolean opponentCargoShipLineFoul; - private boolean sideCargoShipHatchCapable; - private boolean frontCargoShipHatchCapable; + + private boolean hatchesDroppedCargoShip; + private boolean hatchesDroppedRocket; private boolean cargoDroppedCargoShip; private boolean cargoDroppedRocket; - private boolean hatchesDroppedRocket; - private boolean hatchesDroppedCargoShip; + + private boolean opponentCargoShipLineFoul; + public Autonomous(int rocketCargo, int rocketHatches, int cargoShipHatches, int cargoShipCargo, int hatchesDropped, int cargoDropped, - boolean reachHabLine, boolean opponentCargoShipLineFoul, + boolean crossHabLine, boolean opponentCargoShipLineFoul, boolean sideCargoShipHatchCapable, boolean frontCargoShipHatchCapable, boolean cargoDroppedCargoShip, boolean cargoDroppedRocket, boolean hatchesDroppedRocket, boolean hatchesDroppedCargoShip) { @@ -33,7 +41,7 @@ public Autonomous(int rocketCargo, int rocketHatches, int cargoShipHatches, this.cargoShipCargo = cargoShipCargo; this.hatchesDropped = hatchesDropped; this.cargoDropped = cargoDropped; - this.reachHabLine = reachHabLine; + this.crossHabLine = crossHabLine; this.opponentCargoShipLineFoul = opponentCargoShipLineFoul; this.sideCargoShipHatchCapable = sideCargoShipHatchCapable; this.frontCargoShipHatchCapable = frontCargoShipHatchCapable; @@ -43,40 +51,44 @@ public Autonomous(int rocketCargo, int rocketHatches, int cargoShipHatches, this.hatchesDroppedCargoShip = hatchesDroppedCargoShip; } - public void setRocketCargo(int rocketCargo) { - this.rocketCargo = rocketCargo; + public int getRocketCargo() { + return rocketCargo; } - public void setRocketHatches(int rocketHatches) { - this.rocketHatches = rocketHatches; + public int getRocketHatches() { + return rocketHatches; } - public void setCargoShipHatches(int cargoShipHatches) { - this.cargoShipHatches = cargoShipHatches; + public int getCargoShipHatches() { + return cargoShipHatches; } - public void setHatchesDropped(int hatchesDropped) { - this.hatchesDropped = hatchesDropped; + public int getCargoShipCargo() { + return cargoShipCargo; } - public void setCargoDropped(int cargoDropped) { - this.cargoDropped = cargoDropped; + public int getHatchesDropped() { + return hatchesDropped; } - public void setReachHabLine(boolean reachHabLine) { - this.reachHabLine = reachHabLine; + public int getCargoDropped() { + return cargoDropped; } - public void setOpponentCargoShipLineFoul(boolean opponentCargoShipLineFoul) { - this.opponentCargoShipLineFoul = opponentCargoShipLineFoul; + public boolean isCrossHabLine() { + return crossHabLine; } - public void setCargoShipCargo(int cargoShipCargo) { - this.cargoShipCargo = cargoShipCargo; + public boolean isOpponentCargoShipLineFoul() { + return opponentCargoShipLineFoul; } - public void setFrontCargoShipHatchCapable(boolean frontCargoShipHatchCapable) { - this.frontCargoShipHatchCapable = frontCargoShipHatchCapable; + public void setCrossHabLine(boolean crossHabLine) { + this.crossHabLine = crossHabLine; + } + + public boolean isFrontCargoShipHatchCapable() { + return frontCargoShipHatchCapable; } public boolean isSideCargoShipHatchCapable() { @@ -87,71 +99,68 @@ public void setSideCargoShipHatchCapable(boolean sideCargoShipHatchCapable) { this.sideCargoShipHatchCapable = sideCargoShipHatchCapable; } - public boolean isCargoDroppedCargoShip() { - return cargoDroppedCargoShip; + public boolean isHatchesDroppedRocket() { + return hatchesDroppedRocket; } - public void setCargoDroppedCargoShip(boolean cargoDroppedCargoShip) { - this.cargoDroppedCargoShip = cargoDroppedCargoShip; + public boolean isHatchesDroppedCargoShip() { + return hatchesDroppedCargoShip; } - public int getRocketCargo() { - return rocketCargo; + public boolean isCargoDroppedCargoShip() { + return cargoDroppedCargoShip; } - public int getRocketHatches() { - return rocketHatches; + public void setCargoDroppedCargoShip(boolean cargoDroppedCargoShip) { + this.cargoDroppedCargoShip = cargoDroppedCargoShip; } - public int getCargoShipHatches() { - return cargoShipHatches; + public boolean isCargoDroppedRocket() { + return cargoDroppedRocket; } - public int getCargoShipCargo() { - return cargoShipCargo; + public void setCargoDroppedRocket(boolean cargoDroppedRocket) { + this.cargoDroppedRocket = cargoDroppedRocket; } - public int getHatchesDropped() { - return hatchesDropped; + public void setCargoShipHatches(int cargoShipHatches) { + this.cargoShipHatches = cargoShipHatches; } - public int getCargoDropped() { - return cargoDropped; + public void setRocketHatches(int rocketHatches) { + this.rocketHatches = rocketHatches; } - public boolean isReachHabLine() { - return reachHabLine; + public void setCargoShipCargo(int cargoShipCargo) { + this.cargoShipCargo = cargoShipCargo; } - public boolean isOpponentCargoShipLineFoul() { - return opponentCargoShipLineFoul; + public void setRocketCargo(int rocketCargo) { + this.rocketCargo = rocketCargo; } - public boolean isCargoDroppedRocket() { - return cargoDroppedRocket; + public void setFrontCargoShipHatchCapable(boolean frontCargoShipHatchCapable) { + this.frontCargoShipHatchCapable = frontCargoShipHatchCapable; } - public boolean isFrontCargoShipHatchCapable() { - return frontCargoShipHatchCapable; + public void setHatchesDroppedCargoShip(boolean hatchesDroppedCargoShip) { + this.hatchesDroppedCargoShip = hatchesDroppedCargoShip; } - public void setCargoDroppedRocket(boolean cargoDroppedRocket) { - this.cargoDroppedRocket = cargoDroppedRocket; + public void setHatchesDropped(int hatchesDropped) { + this.hatchesDropped = hatchesDropped; } - public boolean isHatchesDroppedRocket() { - return hatchesDroppedRocket; + public void setCargoDropped(int cargoDropped) { + this.cargoDropped = cargoDropped; } public void setHatchesDroppedRocket(boolean hatchesDroppedRocket) { this.hatchesDroppedRocket = hatchesDroppedRocket; } - public boolean isHatchesDroppedCargoShip() { - return hatchesDroppedCargoShip; + public void setOpponentCargoShipLineFoul(boolean opponentCargoShipLineFoul) { + this.opponentCargoShipLineFoul = opponentCargoShipLineFoul; } - public void setHatchesDroppedCargoShip(boolean hatchesDroppedCargoShip) { - this.hatchesDroppedCargoShip = hatchesDroppedCargoShip; - } } diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/models/PreMatch.java b/src/main/java/org/usfirst/frc/team25/scouting/data/models/PreMatch.java index e78f548..6b64107 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/models/PreMatch.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/models/PreMatch.java @@ -7,21 +7,13 @@ public class PreMatch { private String scoutName; + private int matchNum; private String scoutPos; + private int teamNum; + private boolean robotNoShow; + private int startingLevel; private String startingPos; - private int matchNum, teamNum; - - public PreMatch(String scoutName, String scoutPos, int matchNum, int teamNum, String startingPos) { - this.scoutName = scoutName; - this.scoutPos = scoutPos; - this.matchNum = matchNum; - this.teamNum = teamNum; - this.startingPos = startingPos; - } - - public PreMatch() { - //Default empty constructor for JSON parsing - } + private String startingGamePiece; public String getScoutName() { return scoutName; @@ -31,6 +23,18 @@ public String getScoutPos() { return scoutPos; } + public PreMatch(String scoutName, String scoutPos, String startingPos, int matchNum, + int teamNum, int startingLevel, boolean robotNoShow, String startingGamePiece) { + this.scoutName = scoutName; + this.scoutPos = scoutPos; + this.startingPos = startingPos; + this.matchNum = matchNum; + this.teamNum = teamNum; + this.startingLevel = startingLevel; + this.robotNoShow = robotNoShow; + this.startingGamePiece = startingGamePiece; + } + public int getMatchNum() { return matchNum; } @@ -42,5 +46,16 @@ public int getTeamNum() { public String getStartingPos() { return startingPos; } -} + public int getStartingLevel() { + return startingLevel; + } + + public boolean isRobotNoShow() { + return robotNoShow; + } + + public String getStartingGamePiece() { + return startingGamePiece; + } +} diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/models/ScoutEntry.java b/src/main/java/org/usfirst/frc/team25/scouting/data/models/ScoutEntry.java index 2281ae1..2acb062 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/models/ScoutEntry.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/models/ScoutEntry.java @@ -6,7 +6,7 @@ public class ScoutEntry implements Serializable { private PreMatch preMatch; - private Autonomous autonomous; + private Autonomous sandstorm; private TeleOp teleOp; private PostMatch postMatch; private transient int sandstormPoints, teleOpPoints, climbPoints, calculatedPointContribution, autoHatches, @@ -22,7 +22,7 @@ public PreMatch getPreMatch() { } public Autonomous getAutonomous() { - return autonomous; + return sandstorm; } public TeleOp getTeleOp() { diff --git a/src/main/java/org/usfirst/frc/team25/scouting/data/models/TeleOp.java b/src/main/java/org/usfirst/frc/team25/scouting/data/models/TeleOp.java index 437121a..7ade5a6 100644 --- a/src/main/java/org/usfirst/frc/team25/scouting/data/models/TeleOp.java +++ b/src/main/java/org/usfirst/frc/team25/scouting/data/models/TeleOp.java @@ -8,56 +8,73 @@ public class TeleOp { private int cargoShipHatches; + private int rocketLevelOneHatches; + private int rocketLevelTwoHatches; + private int rocketLevelThreeHatches; private int cargoShipCargo; private int rocketLevelOneCargo; - private int rocketLevelOneHatches; private int rocketLevelTwoCargo; - private int rocketLevelTwoHatches; private int rocketLevelThreeCargo; - private int rocketLevelThreeHatches; + private int hatchesDropped; private int cargoDropped; - private boolean climbAssistedByPartners; - private int attemptHabClimbLevel; - private int successHabClimbLevel; private boolean attemptHabClimb; + private int attemptHabClimbLevel; private boolean successHabClimb; - private int assistingClimbTeamNumber; - private int numberOfPartnerClimbsAssisted; - private int highestClimbAssisted; - - public TeleOp(int cargoShipHatches, int cargoShipCargo, int rocketLevelOneCargo, - int rocketLevelOneHatches, int rocketLevelTwoCargo, int rocketLevelTwoHatches, - int rocketLevelThreeCargo, int rocketLevelThreeHatches, int hatchesDropped, - int cargoDropped, boolean climbAssistedByPartners, int attemptHabClimbLevel, - int successHabClimbLevel, boolean attemptHabClimb, boolean successHabClimb, - int assistingClimbTeamNumber, int numberOfPartnerClimbsAssisted, - int highestClimbAssisted) { + private int successHabClimbLevel; + private boolean climbAssistedByPartner; + private int assistingClimbTeamNum; + private int numPartnerClimbAssists; + private int partnerClimbAssistStartLevel; + private int partnerClimbAssistEndLevel; + + public TeleOp(int cargoShipHatches, int rocketLevelOneHatches, int rocketLevelTwoHatches, + int rocketLevelThreeHatches, int cargoShipCargo, int rocketLevelOneCargo, + int rocketLevelTwoCargo, int rocketLevelThreeCargo, int hatchesDropped, + int cargoDropped, boolean attemptHabClimb, int attemptHabClimbLevel, + boolean successHabClimb, int successHabClimbLevel, + boolean climbAssistedByPartner, int assistingClimbTeamNum, + int numPartnerClimbAssists, int partnerClimbAssistEndLevel, + int partnerClimbAssistStartLevel) { this.cargoShipHatches = cargoShipHatches; + this.rocketLevelOneHatches = rocketLevelOneHatches; + this.rocketLevelTwoHatches = rocketLevelTwoHatches; + this.rocketLevelThreeHatches = rocketLevelThreeHatches; this.cargoShipCargo = cargoShipCargo; this.rocketLevelOneCargo = rocketLevelOneCargo; - this.rocketLevelOneHatches = rocketLevelOneHatches; this.rocketLevelTwoCargo = rocketLevelTwoCargo; - this.rocketLevelTwoHatches = rocketLevelTwoHatches; this.rocketLevelThreeCargo = rocketLevelThreeCargo; - this.rocketLevelThreeHatches = rocketLevelThreeHatches; this.hatchesDropped = hatchesDropped; this.cargoDropped = cargoDropped; - this.climbAssistedByPartners = climbAssistedByPartners; - this.attemptHabClimbLevel = attemptHabClimbLevel; - this.successHabClimbLevel = successHabClimbLevel; this.attemptHabClimb = attemptHabClimb; + this.attemptHabClimbLevel = attemptHabClimbLevel; this.successHabClimb = successHabClimb; - this.assistingClimbTeamNumber = assistingClimbTeamNumber; - this.numberOfPartnerClimbsAssisted = numberOfPartnerClimbsAssisted; - this.highestClimbAssisted = highestClimbAssisted; + this.successHabClimbLevel = successHabClimbLevel; + this.climbAssistedByPartner = climbAssistedByPartner; + this.assistingClimbTeamNum = assistingClimbTeamNum; + this.numPartnerClimbAssists = numPartnerClimbAssists; + this.partnerClimbAssistEndLevel = partnerClimbAssistEndLevel; + this.partnerClimbAssistStartLevel = partnerClimbAssistStartLevel; } + public int getCargoShipHatches() { return cargoShipHatches; } + public int getRocketLevelOneHatches() { + return rocketLevelOneHatches; + } + + public int getRocketLevelTwoHatches() { + return rocketLevelTwoHatches; + } + + public int getRocketLevelThreeHatches() { + return rocketLevelThreeHatches; + } + public int getCargoShipCargo() { return cargoShipCargo; } @@ -66,26 +83,14 @@ public int getRocketLevelOneCargo() { return rocketLevelOneCargo; } - public int getRocketLevelOneHatches() { - return rocketLevelOneHatches; - } - public int getRocketLevelTwoCargo() { return rocketLevelTwoCargo; } - public int getRocketLevelTwoHatches() { - return rocketLevelTwoHatches; - } - public int getRocketLevelThreeCargo() { return rocketLevelThreeCargo; } - public int getRocketLevelThreeHatches() { - return rocketLevelThreeHatches; - } - public int getHatchesDropped() { return hatchesDropped; } @@ -94,35 +99,39 @@ public int getCargoDropped() { return cargoDropped; } - public boolean isClimbAssistedByPartners() { - return climbAssistedByPartners; + public boolean isAttemptHabClimb() { + return attemptHabClimb; } public int getAttemptHabClimbLevel() { return attemptHabClimbLevel; } + public boolean isSuccessHabClimb() { + return successHabClimb; + } + public int getSuccessHabClimbLevel() { return successHabClimbLevel; } - public boolean isAttemptHabClimb() { - return attemptHabClimb; + public boolean isClimbAssistedByPartner() { + return climbAssistedByPartner; } - public boolean isSuccessHabClimb() { - return successHabClimb; + public int getAssistingClimbTeamNum() { + return assistingClimbTeamNum; } - public int getAssistingClimbTeamNumber() { - return assistingClimbTeamNumber; + public int getNumPartnerClimbAssists() { + return numPartnerClimbAssists; } - public int getNumberOfPartnerClimbsAssisted() { - return numberOfPartnerClimbsAssisted; + public int getPartnerClimbAssistEndLevel() { + return partnerClimbAssistEndLevel; } - public int getHighestClimbAssisted() { - return highestClimbAssisted; + public int getPartnerClimbAssistStartLevel() { + return partnerClimbAssistStartLevel; } } diff --git a/src/main/resources/fxml/main.fxml b/src/main/resources/fxml/main.fxml index 0ea1203..7834611 100644 --- a/src/main/resources/fxml/main.fxml +++ b/src/main/resources/fxml/main.fxml @@ -23,7 +23,7 @@