pervasive-systems / eSense-Data-Visualiser

A node.js app to visualise and configure eSense sensory streams at real-time
http://www.esense.io/
Apache License 2.0
8 stars 7 forks source link

access to raw data in real time on mac #3

Closed mehrab-morshed closed 4 years ago

mehrab-morshed commented 5 years ago

I am trying to model some movements of the eSense device on my laptop in real time. Do you have a way of exposing the raw data to the desktop visualizer?

alessandro-montanari commented 5 years ago

You can get the raw data from the data_characteristic see from line 468 in index.js. As you can see we subscribe a notification handler that is called when new data is available. From the handler we get the readings, convert them to the format we want, apply the offset correction and send the values through websocket. If you want you can also save the readings to file from the notification handler.

mehrab-morshed commented 5 years ago

Thanks, Alessandro. Since there is no clock on the earbuds, what do you usually recommend in regards to the timestamp of the data stream?

alessandro-montanari commented 5 years ago

You need to use the timestamps of the host device. For example with Date.now()