openmovementproject / openmovement

Open Movement devices are miniature, embeddable, open source sensors developed at Newcastle University, UK. The source code for the firmware and software is available under a BSD 2-clause license, and the hardware (PCB designs, layouts and schematics), enclosure designs and documentation are available under a Creative Commons 3.0 BY Attribution License.
https://openmovement.dev
146 stars 76 forks source link

bug in getStationaryPeriods.m script on finding temperature #21

Closed CassimLadha closed 8 years ago

CassimLadha commented 8 years ago

Line 133 that reads indT = (D.TEMP(:,1)>= T(t)-tBounds) & (D.TEMP(:,1) <= T(t)+wlen+tBounds);

has an issue where wlen is NOT in units of time. It should therefore be converted by:

indT = (D.TEMP(:,1)>= T(t)-tBounds) & (D.TEMP(:,1) <= T(t)+(wlen/86400/50)+tBounds); %convert wlen to time again for searching

danielgjackson commented 8 years ago

Thanks Cas, fixed with your patch in the above commit.