From 7c9fd6c18a40ae60f380ffcba15169fb026dd58b Mon Sep 17 00:00:00 2001 From: Ryan Brott Date: Tue, 6 Dec 2022 21:15:01 -0800 Subject: [PATCH] Hopefully fix track width regression --- .../src/main/assets/tuning/drive-encoder-angular-ramp.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TeamCode/src/main/assets/tuning/drive-encoder-angular-ramp.html b/TeamCode/src/main/assets/tuning/drive-encoder-angular-ramp.html index 29525517e0d1..816c39661d65 100644 --- a/TeamCode/src/main/assets/tuning/drive-encoder-angular-ramp.html +++ b/TeamCode/src/main/assets/tuning/drive-encoder-angular-ramp.html @@ -94,10 +94,9 @@

RR Drive Encoder Angular Ramp Regression

document.getElementById('trackWidthChart'), angVels, angVels.map((_, i) => - (leftEncVels.reduce((acc, vs) => acc - vs[i], 0) - + rightEncVels.reduce((acc, vs) => acc + vs[i], 0)) - / (data.leftEncVels.length + data.rightEncVels.length) - * (data.type === 'mecanum' ? 1 : 2) + (leftEncVels.reduce((acc, vs) => acc - vs[i], 0) / data.leftEncVels.length + + rightEncVels.reduce((acc, vs) => acc + vs[i], 0) / data.rightEncVels.length) + * (data.type === 'mecanum' ? 0.5 : 1) ), {title: 'Track Width Regression', slope: 'track width'} );