Unity - ECG data

Hello,

I am trying to implement a 12-lead ECG device for my Unity project. In the planning of the project, I found these modules and later tried to add them in the data_requests in the PulseEngineDriver.
I was only able to get output by lead3, which seems to be the only one working as stated here. I tried to duplicate the lead3 data in the StandardECG.json and rename it to lead2, to get an output for lead2 but this did not work.
Maybe someone already figured out how to add new data or has an idea of how to do it.

Hi @lennart

Since you are running in Unity, I assume you are loading a state json file via SerializeFromFile or SerializeFromString when you setup the engine. A state file already contains the contents of the StandardECG.json, so it does not load that file. States are fully self contained. Those files are only used to initialize an engine stabilizing a patient specification. So you will need to open up your state json file and modify it to have Lead 2, very similar to what you did in your StandardECG.json. Just copy the 3 Leads and rename then to Lead2

If you want to generate states with the new ECG waveforms, you will need to update the StandardECG.json with the new waveforms, then execute your scenarios so they stabilize first instead of loading a state. I can help walk you through that part when/if you get to it.

For now, you really should just need to edit that state file with the new data.

Our Lead 3 ECG consists of a Lead 3 Normal Sinus waveform retrieved from Physionet
Specifically, the waveform used is from the Stress Recognition in Automobile Drivers study done by Healey and Picard, file drive04.dat, the ECG output from time 1:58.772 - 1:59.349. This data was chosen because of its clear display of all features seen in a Normal Sinus rhythm.

So you can go here :
https://physionet.org/about/database/#ecg
and search for the Stress (It’s the 11th bullet down)
You can click on that link and visualize the waveforms (choose drive04.dat)

Plotted in excel it looks like this:
image

1 Like