Add 2023 arm design code
The C++ was better for design than the python...
Change-Id: Ic606a8a728527668b7335eb7a94cbfd69e272774
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Signed-off-by: Xander Yee <xander.yee@gmail.com>
diff --git a/y2023/constants.h b/y2023/constants.h
index b5e61a1..0475242 100644
--- a/y2023/constants.h
+++ b/y2023/constants.h
@@ -60,7 +60,7 @@
static constexpr double kProximalEncoderRatio() { return (15.0 / 95.0); }
static constexpr double kMaxProximalEncoderPulsesPerSecond() {
return control_loops::superstructure::arm::kArmConstants.free_speed /
- (2.0 * M_PI) / control_loops::superstructure::arm::kArmConstants.g1 /
+ (2.0 * M_PI) / control_loops::superstructure::arm::kArmConstants.g0 /
kProximalEncoderRatio() * kProximalEncoderCountsPerRevolution();
}
static constexpr double kProximalPotRatio() {
@@ -76,8 +76,8 @@
static constexpr double kDistalEncoderRatio() { return (15.0 / 95.0); }
static constexpr double kMaxDistalEncoderPulsesPerSecond() {
return control_loops::superstructure::arm::kArmConstants.free_speed /
- (2.0 * M_PI) / control_loops::superstructure::arm::kArmConstants.g2 /
- kDistalEncoderRatio() * kDistalEncoderCountsPerRevolution();
+ (2.0 * M_PI) / control_loops::superstructure::arm::kArmConstants.g1 /
+ kDistalEncoderRatio() * kProximalEncoderCountsPerRevolution();
}
static constexpr double kDistalPotRatio() {
return (24.0 / 36.0) * (18.0 / 66.0) * (15.0 / 95.0);