2018-07-30 09:22:14 +00:00
#include "script_component.hpp"
2015-02-08 09:01:32 +00:00
/*
2019-06-10 16:23:21 +00:00
* Author: Glowbal, SilentSpike
2015-02-08 09:01:32 +00:00
* Get the cardiac output from the Heart, based on current Heart Rate and Blood Volume.
*
* Arguments:
* 0: The Unit <OBJECT>
*
2017-06-08 13:31:51 +00:00
* Return Value:
2019-06-10 16:23:21 +00:00
* Current cardiac output (litre per second) <NUMBER>
2015-02-07 22:55:48 +00:00
*
2017-04-22 15:57:32 +00:00
* Example:
2018-05-08 09:16:12 +00:00
* [player] call ace_medical_status_fnc_getCardiacOutput
2017-04-22 15:57:32 +00:00
*
2015-02-08 09:01:32 +00:00
* Public: No
2015-02-07 22:55:48 +00:00
*/
/*
2016-12-05 20:34:20 +00:00
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).
2015-02-07 22:55:48 +00:00
Source: http://en.wikipedia.org/wiki/Cardiac_output
*/
2019-06-10 16:23:21 +00:00
// Value taken from https://doi.org/10.1093%2Feurheartj%2Fehl336
// as 94/95 ml ± 15 ml
#define VENTRICLE_STROKE_VOL 95e-3
2015-02-07 22:55:48 +00:00
2015-08-22 14:25:10 +00:00
params ["_unit"];
2015-02-07 22:55:48 +00:00
2019-06-10 16:23:21 +00:00
private _bloodVolumeRatio = GET_BLOOD_VOLUME(_unit) / DEFAULT_BLOOD_VOLUME;
2018-05-08 09:16:12 +00:00
private _heartRate = GET_HEART_RATE(_unit);
2016-12-05 20:34:20 +00:00
2019-06-10 16:23:21 +00:00
// Blood volume ratio dictates how much is entering the ventricle (this is an approximation)
private _entering = linearConversion [0.5, 1, _bloodVolumeRatio, 0, 1, true];
private _cardiacOutput = (_entering * VENTRICLE_STROKE_VOL) * _heartRate / 60;
0 max _cardiacOutput