Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Commit 60811b9

Browse files
committed
Updated NinjasLib
1 parent 89430c2 commit 60811b9

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dependencies {
8585
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
8686
simulationRelease wpi.sim.enableRelease()
8787

88-
implementation 'com.github.Ninjas4744-Organization:NinjasLib:0.3'
88+
implementation 'com.github.Ninjas4744-Organization:NinjasLib:0.4'
8989

9090
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
9191
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

src/main/java/frc/robot/Constants.java

Whitespace-only changes.

src/main/java/frc/robot/Constants/VisionConstants.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ public class VisionConstants {
5353
}
5454

5555
public static double calculateFOM(VisionOutput estimation) {
56-
double distFOM = 0.34 * estimation.closestTagDist - 0.124;
56+
double C = 0.116;
57+
58+
double distFOM = (2 * Math.pow(2, estimation.closestTagDist)) / estimation.amountOfTargets * C;
5759
double speedFOM = 0/*0.2 * RobotState.getInstance().getRobotVelocity().getNorm()*/;
5860

5961
return distFOM + speedFOM;

0 commit comments

Comments
 (0)