1

I'm trying to simulate my Movsense 2.0.0 based project in Visual Studio 2017 and I want to supply ECG data from a CSV file.

According to documentation I put in my solution's root folder an ecg.csv file that looks like this

LoopingTimestamp:120000
Timestamp,/Meas/ECG/125
57540,-130
57548,-17
57556,348
57564,-83
57572,-829
57580,212
57588,3881
57596,8108
57604,10067
57612,9471
...

but all I get are debug console errors saying

SimulatorDataSource::getData. Unknown columnName: /Meas/ECG/{RequiredSampleRate}

Is my CSV file wrongly formatted or is there a problem with the simulator?
I have no problems simulating other sensors' data (like HR) with a CSV file.

Alex
  • 119
  • 12

1 Answers1

1

If you look at the simulator debug output you see what is the column name it tries to load. From the log:

09:49:16 initFromCSVFile. file not found: ecg.csv
09:49:16 cwd: C:\Users\lipponep\dev\Projects\movesense\_build-simu
09:49:16 SimulatorDataSource::addColumn: /Meas/ECG/{RequiredSampleRate}

So the actual column name is not "/Meas/ECG/125" but

"/Meas/ECG/{RequiredSampleRate}" (<= do not fill in the sample rate)

Full disclosure: I work for the Movesense team

PetriL
  • 1,211
  • 1
  • 7
  • 11
  • Tried to replace 125 with {RequiredSampleRate}, now simulator halts on start with this error: `Assert fail SimulatorDataSource.cpp:111` – Alex May 10 '21 at 07:24
  • That ASSERT comes when the timestamp to get the data is outside the valid data range of the CVS file. In your case the first timestamp seems to be 57540 so you probably try to get ECG sample before that time. Adding line 0,0 as the first data line should fix it. – PetriL May 11 '21 at 12:43