Conquer Space
0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
src
core
components
pid.h
Go to the documentation of this file.
1
/* Conquer Space
2
* Copyright (C) 2021-2025 Conquer Space
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16
*/
17
#pragma once
18
19
namespace
cqsp::core::components
{
20
struct
PIDConfig
{
21
double
Kp
;
22
double
Ki
;
23
double
Kd
;
24
25
PIDConfig
(
double
Kp
,
double
Ki
,
double
Kd
) :
Kp
(
Kp
),
Ki
(
Ki
),
Kd
(
Kd
) {}
26
};
27
28
struct
PID
{
29
PID
() :
proportional
(0),
integral
(0),
derivative
(0) {}
30
double
proportional
;
31
double
integral
;
32
double
derivative
;
33
34
void
Update
(
double
value);
35
double
GetValue
(
const
PIDConfig
& conf);
36
};
37
}
// namespace cqsp::core::components
cqsp::core::components
Definition:
area.h:27
cqsp::core::components::PIDConfig
Definition:
pid.h:20
cqsp::core::components::PIDConfig::Kp
double Kp
Definition:
pid.h:21
cqsp::core::components::PIDConfig::Ki
double Ki
Definition:
pid.h:22
cqsp::core::components::PIDConfig::Kd
double Kd
Definition:
pid.h:23
cqsp::core::components::PIDConfig::PIDConfig
PIDConfig(double Kp, double Ki, double Kd)
Definition:
pid.h:25
cqsp::core::components::PID
Definition:
pid.h:28
cqsp::core::components::PID::proportional
double proportional
Definition:
pid.h:30
cqsp::core::components::PID::GetValue
double GetValue(const PIDConfig &conf)
Definition:
pid.cpp:26
cqsp::core::components::PID::integral
double integral
Definition:
pid.h:31
cqsp::core::components::PID::PID
PID()
Definition:
pid.h:29
cqsp::core::components::PID::derivative
double derivative
Definition:
pid.h:32
cqsp::core::components::PID::Update
void Update(double value)
Definition:
pid.cpp:20
Generated on Thu Jul 9 2026 07:40:54 for Conquer Space by
1.9.2