blob: a40993afab68b75df5a8c28689be54d85c0715b5 [file] [log] [blame]
Philipp Schradere8ad6382017-04-09 21:51:21 +00001#ifndef FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_
2#define FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_
3
4#include <utility>
5#include <vector>
6
7namespace frc971 {
8namespace shooter_interpolation {
9
10// Struct for shot angle and power
11struct ShotParams {
12 double angle;
13 double power;
14};
15
16class InterpolationTable {
17 public:
18 InterpolationTable(
19 ::std::vector<::std::pair<double, ShotParams>> interpolation_table);
20
21 // Uses the interpolation table to calculate the optimal shooter angle and
22 // power for a shot
23 ShotParams GetShooterData(double distance);
24
25 private:
26 // Contains the list of angle entries in the interpolation table
27 ::std::vector<::std::pair<double, ShotParams>> interpolation_table_;
28};
29
30} // namespace shooter_interpolation
31} // namespace frc971
32
33#endif // FRC971_SHOOTER_INTERPOLATION_INTERPOLATION_H_