etrobocon2019 feat.KatLab
ece30a9a007fff7d3ad48592c0d09a74643377bb
src
module
TurnControl.h
[詳解]
1
6
#ifndef TURN_CONTROL_H
7
#define TURN_CONTROL_H
8
9
#include "
Filter.h
"
10
#include "
Pid.h
"
11
12
class
TurnControl
{
13
private
:
14
Filter<>
filter;
15
Pid
pid;
16
17
public
:
18
TurnControl
(
int
targetBrightness,
double
Kp,
double
Ki,
double
Kd);
19
double
calculateTurn
(
int
forward,
int
currentBrightness,
int
targetBrightness,
double
Kp,
20
double
Ki,
double
Kd);
21
};
22
23
#endif
TurnControl::calculateTurn
double calculateTurn(int forward, int currentBrightness, int targetBrightness, double Kp, double Ki, double Kd)
旋回値を計算する関数
Definition:
TurnControl.cpp:30
Pid.h
PID制御クラス
TurnControl
Definition:
TurnControl.h:12
TurnControl::TurnControl
TurnControl(int targetBrightness, double Kp, double Ki, double Kd)
Definition:
TurnControl.cpp:15
Pid
Definition:
Pid.h:18
Filter
Definition:
Filter.h:10
Filter.h
外乱対策のためのフィルターをまとめたクラス
構築:
1.8.13