Jim Wagner
2016-08-02 00:01:00 UTC
Greetings NUG -
I am working on an application that deals with sampled data over fairly long intervals relative to the sample rate (typically sample rate of 10X per second for a day). These 1 day files can start at any time of day (from 00:00:00 to 23:59:59). The starting time is encoded at the beginning of each file (in a meta-data header). There are precision time stamps through the data.
I have an analysis algorithm that I would like to run at multiple points through the data set. The intervals between analyses can be set from 0.5 hour through 24 hours, in steps that are integer divisors of 24 hours (0.5 hour, 1 hour, 2 hour, 3 hour, 4 hour, 6 hour, 8 hour, 12 hour, 24 hour) by the program user. I would like those analysis points to be executed at “natural” clock times (that is, if the user chooses 1 hour, and the file begins at 0722 hours, it will start at 0800 and every hour, on the hour, there-after until the end of the file).
The question: how do I find those “on the mark”execution times given the starting time and the user selected interval? I’ve been flailing around on this for a while and nothing I’ve tried feels very good - lots and lots and lots of “if-tests”.
Suggestions are solicited!
Cheers and many thanks…
Jim
James Wagner
Oregon Research Electronics
https://sites.google.com/site/oregonresearchelectronics/home
_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xoj
I am working on an application that deals with sampled data over fairly long intervals relative to the sample rate (typically sample rate of 10X per second for a day). These 1 day files can start at any time of day (from 00:00:00 to 23:59:59). The starting time is encoded at the beginning of each file (in a meta-data header). There are precision time stamps through the data.
I have an analysis algorithm that I would like to run at multiple points through the data set. The intervals between analyses can be set from 0.5 hour through 24 hours, in steps that are integer divisors of 24 hours (0.5 hour, 1 hour, 2 hour, 3 hour, 4 hour, 6 hour, 8 hour, 12 hour, 24 hour) by the program user. I would like those analysis points to be executed at “natural” clock times (that is, if the user chooses 1 hour, and the file begins at 0722 hours, it will start at 0800 and every hour, on the hour, there-after until the end of the file).
The question: how do I find those “on the mark”execution times given the starting time and the user selected interval? I’ve been flailing around on this for a while and nothing I’ve tried feels very good - lots and lots and lots of “if-tests”.
Suggestions are solicited!
Cheers and many thanks…
Jim
James Wagner
Oregon Research Electronics
https://sites.google.com/site/oregonresearchelectronics/home
_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xoj