etrobocon2019 feat.KatLab
ece30a9a007fff7d3ad48592c0d09a74643377bb
src
module
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
SpeedControl::calculateSpeed
double calculateSpeed(int targetSpeed, double Kp, double Ki, double Kd)
Definition:
SpeedControl.cpp:21
SpeedControl::SpeedControl
SpeedControl(Controller &controller_, int targetSpeed, double Kp, double Ki, double Kd)
Definition:
SpeedControl.cpp:9
Distance.h
走行距離を計算するクラス
Pid.h
PID制御クラス
SpeedControl
Definition:
SpeedControl.h:13
Controller
Definition:
Controller.h:36
Distance
Definition:
Distance.h:13
Pid
Definition:
Pid.h:18
構築:
1.8.13