mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
847d2d4179
* Improve adjustment calcs / wound blood loss / medications fix func descriptions Calc wound blood loss on events reorder includes so scritpmacroMed has global effect trivial optimization for getCardiacOutput Fix var Fix wounds not reopening (nil _category) Fix surgical kit inherting canBandage conditional debug hitpoints Update ACE_Medical_Treatment_Actions.hpp Use woundBleeding for IS_BLEEDING macro rework medication vars comments Reset var in init / fullHeal Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal
|
|
* Get the cardiac output from the Heart, based on current Heart Rate and Blood Volume.
|
|
*
|
|
* Arguments:
|
|
* 0: The Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Current cardiac output (liter per second) <NUMBER>
|
|
*
|
|
* Example:
|
|
* [player] call ace_medical_status_fnc_getCardiacOutput
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
/*
|
|
Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the CBA_missionTime interval of one second. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
|
|
Source: http://en.wikipedia.org/wiki/Cardiac_output
|
|
*/
|
|
|
|
// to limit the amount of complex calculations necessary, we take a set modifier to calculate Stroke Volume.
|
|
#define MODIFIER_CARDIAC_OUTPUT 0.1904761
|
|
|
|
params ["_unit"];
|
|
|
|
private _bloodVolumeRatio = (GET_BLOOD_VOLUME(_unit) / DEFAULT_BLOOD_VOLUME);
|
|
private _heartRate = GET_HEART_RATE(_unit);
|
|
private _cardiacOutput = ((_bloodVolumeRatio / MODIFIER_CARDIAC_OUTPUT) + ((_heartRate / DEFAULT_HEART_RATE) - 1)) / 60;
|
|
|
|
(0 max _cardiacOutput)
|