2015-02-08 09:01:32 +00:00
/*
* Author: Glowbal
* 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:
2016-12-05 20:34:20 +00:00
* Current cardiac output (liter 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
*/
#include "script_component.hpp"
/*
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
*/
// to limit the amount of complex calculations necessary, we take a set modifier to calculate Stroke Volume.
#define MODIFIER_CARDIAC_OUTPUT 19.04761
2015-08-22 14:25:10 +00:00
params ["_unit"];
2015-02-07 22:55:48 +00:00
2018-05-08 09:16:12 +00:00
private _bloodVolume = (GET_BLOOD_VOLUME(_unit) / DEFAULT_BLOOD_VOLUME) * 100;
private _heartRate = GET_HEART_RATE(_unit);
2016-12-09 11:57:27 +00:00
private _cardiacOutput = ((_bloodVolume / MODIFIER_CARDIAC_OUTPUT) + ((_heartRate / DEFAULT_HEART_RATE) - 1)) / 60;
2016-12-05 20:34:20 +00:00
(0 max _cardiacOutput)