Complete shooter interpolation table
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I64786e0f854bdfc75b0a9643d31f4ca6063e4ef0
diff --git a/y2020/constants.cc b/y2020/constants.cc
index 1336411..ea12b46 100644
--- a/y2020/constants.cc
+++ b/y2020/constants.cc
@@ -33,17 +33,18 @@
::frc971::zeroing::AbsoluteAndAbsoluteEncoderZeroingEstimator>
*const hood = &r->hood;
- constexpr double kFeetToMeters = 0.0254 * 12.0;
- // Approximate robot length, for converting estimates from the doc below.
- // Rounded up from exact estimate, since I'm not sure if the original estimate
- // includes bumpers.
- constexpr double kRobotLength = 0.9;
+ constexpr double kInchesToMeters = 0.0254;
+ // Approximate length from the front bumpers to the middle of the robot.
+ constexpr double kHalfRobotLength = (36.00 / 2) * kInchesToMeters;
// We found that the finisher velocity does not change ball velocity much, so
// keep it constant.
constexpr double kVelocityFinisher = 350.0;
r->shot_interpolation_table = InterpolationTable<Values::ShotParams>(
- {{7.6 * kFeetToMeters + kRobotLength, {0.31, 16.9}},
- {12.6 * kFeetToMeters + kRobotLength, {0.4, 20.4}}});
+ {{40.00 * kInchesToMeters + kHalfRobotLength, {0.1, 10.6}},
+ {113.5 * kInchesToMeters + kHalfRobotLength, {0.42, 13.2}},
+ {168.5 * kInchesToMeters + kHalfRobotLength, {0.51, 13.2}},
+ {231.3 * kInchesToMeters + kHalfRobotLength, {0.51, 13.2}},
+ {276.5 * kInchesToMeters + kHalfRobotLength, {0.53, 13.2}}});
r->flywheel_shot_interpolation_table =
InterpolationTable<Values::FlywheelShotParams>(