etrobocon2019 feat.KatLab  ece30a9a007fff7d3ad48592c0d09a74643377bb
SpeedControl.h
[詳解]
1 
6 #ifndef SPEEDCONTROL_H
7 #define SPEEDCONTROL_H
8 
9 #include "Distance.h"
10 #include "Pid.h"
11 #include <cmath>
12 
13 class SpeedControl {
14  private:
15  Controller& controller;
16  Distance dist;
17  Pid pid;
18  double prevDistance;
19 
20  public:
29  SpeedControl(Controller& controller_, int targetSpeed, double Kp, double Ki, double Kd);
30 
39  double calculateSpeed(int targetSpeed, double Kp, double Ki, double Kd);
40 };
41 
42 #endif
double calculateSpeed(int targetSpeed, double Kp, double Ki, double Kd)
SpeedControl(Controller &controller_, int targetSpeed, double Kp, double Ki, double Kd)
Definition: SpeedControl.cpp:9
走行距離を計算するクラス
PID制御クラス
Definition: Pid.h:18