Skip to content

Commit

Permalink
Variable wattsPerATP
Browse files Browse the repository at this point in the history
  • Loading branch information
ulteq committed Nov 4, 2017
1 parent 76bfe9b commit aa732d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/advanced_fatigue/ACE_Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ class ACE_Settings {
displayName = CSTRING(TerrainGradientFactor);
description = CSTRING(TerrainGradientFactor_Description);
typeName = "SCALAR";
value = 0.5;
value = 1;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ GVAR(muscleDamage) = _newUnit getVariable [QGVAR(muscleDamage), 0];
GVAR(VO2Max) = 35 + 20 * (_newUnit getVariable [QGVAR(performanceFactor), GVAR(performanceFactor)]);
GVAR(VO2MaxPower) = GVAR(VO2Max) * SIM_BODYMASS * BIOMECH_EFFICIENCY * JOULES_PER_ML_O2 / 60;
GVAR(peakPower) = VO2MAX_STRENGTH * GVAR(VO2MaxPower);
GVAR(wattsPerATP) = (1.81587 * exp(0.0244186 * GVAR(VO2Max))) / ANTPERCENT;

GVAR(ae1PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 13.3 * ANTPERCENT ^ 1.28 * 1.362;
GVAR(ae2PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 16.7 * ANTPERCENT ^ 1.28 * 1.362;
Expand Down
6 changes: 3 additions & 3 deletions addons/advanced_fatigue/functions/fnc_mainLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ private _ae2Power = ((_currentWork - _ae1Power) max 0) min _ae2PathwayPowerFatig
private _anPower = (_currentWork - _ae1Power - _ae2Power) max 0;

// Remove ATP from reserves for current work
GVAR(ae1Reserve) = GVAR(ae1Reserve) - _ae1Power / WATTSPERATP;
GVAR(ae2Reserve) = GVAR(ae2Reserve) - _ae2Power / WATTSPERATP;
GVAR(anReserve) = GVAR(anReserve) - _anPower / WATTSPERATP;
GVAR(ae1Reserve) = GVAR(ae1Reserve) - _ae1Power / GVAR(wattsPerATP);
GVAR(ae2Reserve) = GVAR(ae2Reserve) - _ae2Power / GVAR(wattsPerATP);
GVAR(anReserve) = GVAR(anReserve) - _anPower / GVAR(wattsPerATP);
#ifdef DEBUG_MODE_FULL
systemChat format["---- ae2: %1 ----", (GVAR(ae2Reserve) / AE2_MAXRESERVE) toFixed 2];
systemChat format["---- an: %1 ----", (GVAR(anReserve) / AN_MAXRESERVE) toFixed 2];
Expand Down
3 changes: 1 addition & 2 deletions addons/advanced_fatigue/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
#define VO2MAX_STRENGTH 4.1
#define BIOMECH_EFFICIENCY 0.23
#define REE 18.83 //((0.5617 * SIM_BODYMASS + 42.57) * BIOMECH_EFFICIENCY)
#define OXYGEN 0.9
#define WATTSPERATP 7
#define OXYGEN 0.878

#define AE1_MAXRESERVE 4000000 // mmol
#define AE2_MAXRESERVE 84000 // mmol
Expand Down

0 comments on commit aa732d3

Please sign in to comment.