c# - Microsoft band heart sensor sampling rate and event control -


i have obtained data heart rate sensor , heart rate quality sensor using following code:-

 ienumerable<timespan> supportedheartbeatreportingintervals = bandclient.sensormanager.heartrate.supportedreportingintervals;  bandclient.sensormanager.heartrate.reportinginterval = supportedheartbeatreportingintervals.first<timespan>(); ..... [other not relevant code excluded]  bandclient.sensormanager.heartrate.readingchanged += (s, args) => { hrdt = args.sensorreading.heartrate; }; {     await bandclient.sensormanager.heartrate.startreadingsasync();     await task.delay(timespan.fromseconds(5));     await bandclient.sensormanager.heartrate.stopreadingsasync();     dsphr = hrdt.tostring(); } bandclient.sensormanager.heartrate.readingchanged += (s, args) =>  qltyhr = string.format("{0}",args.sensorreading.quality); 

this code working nicely , here sample output file writing

richard;;8:48:04 am;64

richard;acquiring;8:48:19 am;64

richard;acquiring;8:48:35 am;64

richard;acquiring;8:48:50 am;64

richard;acquiring;8:49:05 am;64

etc - records showing acquiring - 70 change in heart rate came when device acquiring heart rate , not reading.

richard;acquiring;8:52:08 am;70

record format name, sensor quality, time , heart rate. ";" used field delimiter in flat file

i repeated test time using band in "run" workout mode , data results follows:

richard;locked;9:15:32 am;57

richard;acquiring;9:15:47 am;67

richard;locked;9:16:03 am;64

richard;acquiring;9:16:18 am;62

richard;locked;9:16:33 am;72

etc same sort of story

richard;locked;9:24:40 am;73

richard;locked;9:24:55 am;72

help!! here few questions:

  • understanding "battery life" issue being managed different modes - in ideal world set own sampling rate woke , locked sensor reading , made go sleep again save battery. guessing impossible 1 imagines firmware issue. correct? if not how do it?
  • if cannot have ideal - able switch sampling mode program , not pushing button on band. undertake "burst sample" in exercise event on timed basis , background check carry on rest of time conserve battery. can , if how?
  • what relevance of setting band reporting interval - there should change here control when sensor on , locked (exercise mode vs when off , acquiring (normal mode). if how should coding this? own tests looks mode of sensor has nothing reporting interval - wrong?
  • failing there documentation explains how sampling working in finest detail? have spent considerable time searching web , found following:
  • normal mode seems sample 3 or 4 times , hour
  • normal mode wakes active mode if band detects significant movement - example went run morning band in normal mode , work exercise mode once worked doing - clever , more think useful.
  • even exercise mode has "acquiring" events - these seem predictive past values - if cannot measure on intensive basis - know kicking in heart prediction can work out whether meaningful or not

the sdk documentation not give level of detail, , cannot find way of finding out ... help!

i hope code , data formats readable in post first time posted on forum - please forgive me if have "pushed wrong button" on including text!

thank or insight can give me.

ok. here how heart rate subscription works in versions of microsoft band sdk.

1) when subscribe, turn heart rate gathering on, unless on due activity or passive heart rate monitoring of band's firmware.

2) when unsubscribe, turn heart rate gathering off, unless firmware gathering heart rate data due same mentioned above.

3) rate of heart rate subscription 1 hz , cannot changed.

4) data returned subscription heart rate calculated band, not direct reading. aquiring vs locked represents how accurate band thinks reading , more effected how user wearing band (tighter better this) activity user doing band

thus, conserve battery life , data in bursts, have subscribe, many events desire, , unsubscribe.

the other data getting documentation refers how heart rate used internally, not how exposed sdk.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -