Added distance interpolation table for vision
Change-Id: I20077eb38c0c3fa91c4e2b6dc32a1bd7233e7ebf
diff --git a/frc971/shooter_interpolation/interpolation.h b/frc971/shooter_interpolation/interpolation.h
new file mode 100644
index 0000000..a40993a
--- /dev/null
+++ b/frc971/shooter_interpolation/interpolation.h
@@ -0,0 +1,33 @@
+#ifndef FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_
+#define FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_
+
+#include <utility>
+#include <vector>
+
+namespace frc971 {
+namespace shooter_interpolation {
+
+// Struct for shot angle and power
+struct ShotParams {
+ double angle;
+ double power;
+};
+
+class InterpolationTable {
+ public:
+ InterpolationTable(
+ ::std::vector<::std::pair<double, ShotParams>> interpolation_table);
+
+ // Uses the interpolation table to calculate the optimal shooter angle and
+ // power for a shot
+ ShotParams GetShooterData(double distance);
+
+ private:
+ // Contains the list of angle entries in the interpolation table
+ ::std::vector<::std::pair<double, ShotParams>> interpolation_table_;
+};
+
+} // namespace shooter_interpolation
+} // namespace frc971
+
+#endif // FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_