Retune interpolation table based on 1690's advice
Couple finisher and accelerator speeds too.
https://docs.google.com/spreadsheets/d/1cFcA8ncgptloiDLGW4ICp4YNkfOQLVXJi2EO5HpAJZA/edit?usp=sharing
Change-Id: I572d738de00ae7a58e8d98d7913283ffdf85da57
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/y2020/constants.h b/y2020/constants.h
index 01cd177..6dceb65 100644
--- a/y2020/constants.h
+++ b/y2020/constants.h
@@ -211,36 +211,22 @@
// Measured in radians
double hood_angle;
// Muzzle velocity (m/s) of the ball as it is shot out of the shooter.
- double velocity_ball;
+ double velocity_accelerator;
+ double velocity_finisher;
static ShotParams BlendY(double coefficient, ShotParams a1, ShotParams a2) {
using ::frc971::shooter_interpolation::Blend;
- return ShotParams{Blend(coefficient, a1.hood_angle, a2.hood_angle),
- Blend(coefficient, a1.velocity_ball, a2.velocity_ball)};
- }
- };
-
- struct FlywheelShotParams {
- // Angular velocity in radians per second of the slowest (lowest) wheel in
- // the kicker. Positive is shooting the ball.
- double velocity_accelerator;
- // Angular velocity in radians per seconds of the flywheel. Positive is
- // shooting.
- double velocity_finisher;
-
- static FlywheelShotParams BlendY(double coefficient, FlywheelShotParams a1,
- FlywheelShotParams a2) {
- using ::frc971::shooter_interpolation::Blend;
- return FlywheelShotParams{
+ return ShotParams{
+ Blend(coefficient, a1.hood_angle, a2.hood_angle),
Blend(coefficient, a1.velocity_accelerator, a2.velocity_accelerator),
Blend(coefficient, a1.velocity_finisher, a2.velocity_finisher)};
}
};
- // { distance_to_target, { hood_angle, velocity_ball }}
+ // { distance_to_target,
+ // { hood_angle, velocity accelerator, velocity finisher}
+ // }
InterpolationTable<ShotParams> shot_interpolation_table;
- // { velocity_ball, { velocity_accelerator, velocity_finisher }}
- InterpolationTable<FlywheelShotParams> flywheel_shot_interpolation_table;
};
// Creates (once) a Values instance for ::aos::network::GetTeamNumber(). Should