From 17a381e4fec8a8762b6a03c804b2ea713e11e9cf Mon Sep 17 00:00:00 2001 From: Jack Lingle Date: Thu, 12 Dec 2024 09:06:47 -0500 Subject: [PATCH] use number of tags for distance based variance --- vision/src/main/java/coppercore/vision/VisionLocalizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision/src/main/java/coppercore/vision/VisionLocalizer.java b/vision/src/main/java/coppercore/vision/VisionLocalizer.java index 48a7391..8662e6f 100644 --- a/vision/src/main/java/coppercore/vision/VisionLocalizer.java +++ b/vision/src/main/java/coppercore/vision/VisionLocalizer.java @@ -130,7 +130,7 @@ private Matrix getLatestVariance( stdDev.times( 1 + (Math.pow(avgDistanceFromTarget, 2) - / CoreVisionConstants.distanceFactor)); + / numTags > 0 ? numTags : CoreVisionConstants.distanceFactor)); // adjustment based on position of camera if (cameraIndex < this.cameraStdDevFactors.length) {