mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 03:59:18 +02:00
Picking pid values
This commit is contained in:
parent
7b399d9a04
commit
7dfdc79644
3 changed files with 7 additions and 4 deletions
|
@ -103,7 +103,10 @@ void LODManager::autoAdjustLOD(float realTimeDelta) {
|
||||||
auto output = Kp * error + Ki * integral + Kd * derivative;
|
auto output = Kp * error + Ki * integral + Kd * derivative;
|
||||||
previous_error = error;
|
previous_error = error;
|
||||||
|
|
||||||
auto newSolidAngle = std::max( 0.1f, std::min(output, 45.f));
|
|
||||||
|
auto newSolidAngle = oldSolidAngle + output;
|
||||||
|
|
||||||
|
newSolidAngle = std::max( 0.5f, std::min(newSolidAngle, 90.f));
|
||||||
|
|
||||||
auto halTan = glm::tan(glm::radians(newSolidAngle * 0.5f));
|
auto halTan = glm::tan(glm::radians(newSolidAngle * 0.5f));
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,7 @@ private:
|
||||||
float _octreeSizeScale = DEFAULT_OCTREE_SIZE_SCALE;
|
float _octreeSizeScale = DEFAULT_OCTREE_SIZE_SCALE;
|
||||||
int _boundaryLevelAdjust = 0;
|
int _boundaryLevelAdjust = 0;
|
||||||
|
|
||||||
glm::vec4 _pid{ 0.1f, 0.0f, 0.0f, 3.0f };
|
glm::vec4 _pid{ 0.06f, 0.005f, 0.01f, 4.0f };
|
||||||
|
|
||||||
uint64_t _decreaseFPSExpiry { 0 };
|
uint64_t _decreaseFPSExpiry { 0 };
|
||||||
uint64_t _increaseFPSExpiry { 0 };
|
uint64_t _increaseFPSExpiry { 0 };
|
||||||
|
|
|
@ -98,7 +98,7 @@ Item {
|
||||||
label: "LOD PID Ki"
|
label: "LOD PID Ki"
|
||||||
valueVar: LODManager["pidKi"]
|
valueVar: LODManager["pidKi"]
|
||||||
valueVarSetter: (function (v) { LODManager["pidKi"] = v })
|
valueVarSetter: (function (v) { LODManager["pidKi"] = v })
|
||||||
max: 1.0
|
max: 0.02
|
||||||
min: 0.0
|
min: 0.0
|
||||||
integral: false
|
integral: false
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ Item {
|
||||||
label: "LOD PID Kd"
|
label: "LOD PID Kd"
|
||||||
valueVar: LODManager["pidKd"]
|
valueVar: LODManager["pidKd"]
|
||||||
valueVarSetter: (function (v) { LODManager["pidKd"] = v })
|
valueVarSetter: (function (v) { LODManager["pidKd"] = v })
|
||||||
max: 1.0
|
max: 0.1
|
||||||
min: 0.0
|
min: 0.0
|
||||||
integral: false
|
integral: false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue