OpenViBE Bug Tracker - openvibe-plugins
View Issue Details
0000181openvibe-pluginsbug reportpublic2016-09-07 16:432016-10-04 10:34
stephan 
jtlindgr 
normalmajoralways
resolvedfixed 
x86_64Windows7
0000181: Wrong scale used in OpenBCI driver for acquisition server
The signals are too small for further processing.
It seems like there is used a wrong scale in the OpenBCI driver for acquisition server. It generates MegaVolts instead of MicroVolts at one point.
file:
openvibe\contrib\plugins\server-drivers\openbci\src\ovasCDriverOpenBCI.cpp

line: 200 (+ 204)

suggested solution:
Formula by OpenBCI generates Volts, use ( * 1000000) instead of ( / 1000000) in code to generate MicroVolts

OpenBCI doc for interpreting data:
http://docs.openbci.com/software/02-OpenBCI_Streaming_Data_Format#openbci-v3-data-format-interpreting-the-eeg-data [^]
No tags attached.
patch openbci-units.patch (894) 2016-09-14 17:19
http://openvibe.inria.fr/tracker/file_download.php?file_id=38&type=bug
Issue History
2016-09-07 16:43stephanNew Issue
2016-09-14 17:06yrenardAssigned To => yrenard
2016-09-14 17:06yrenardStatusnew => assigned
2016-09-14 17:06yrenardNote Added: 0001219
2016-09-14 17:14yrenardNote Added: 0001220
2016-09-14 17:14yrenardStatusassigned => confirmed
2016-09-14 17:19yrenardFile Added: openbci-units.patch
2016-09-14 17:19yrenardNote Added: 0001221
2016-09-14 17:38yrenardAssigned Toyrenard => jtlindgr
2016-09-14 17:38yrenardStatusconfirmed => assigned
2016-09-14 17:39yrenardNote Added: 0001222
2016-10-04 10:34jtlindgrNote Added: 0001223
2016-10-04 10:34jtlindgrStatusassigned => resolved
2016-10-04 10:34jtlindgrResolutionopen => fixed

Notes
(0001219)
yrenard   
2016-09-14 17:06   
stephan, thank you for the feedback, will look at this problem asap
(0001220)
yrenard   
2016-09-14 17:14   
Confirmed issue, line 200 should turn to :

m_f32UnitsToMicroVolts = (float32) (float32) ((ADS1299_VREF * 1000000) / ((pow(2.,23)-1) * ADS1299_GAIN));
(0001221)
yrenard   
2016-09-14 17:19   
openbci-units.patch should fix the problem
(0001222)
yrenard   
2016-09-14 17:39   
Patch was submitted to Jussi T Lindgren
(0001223)
jtlindgr   
2016-10-04 10:34   
Merged the patch from Yann Renard. In git commit c472c7ce8b796b8ede2e16183f56915f6bcae4e3

Thanks for the fix!