GeorgetownMakerHubOrg/air-quality

Implement NTP and add time stamps to logged data

Closed this issue · 1 comments

It will be absolutely necessary to know, at least relatively, what time data was logged if we are going to be saving data to disk and uploading only whenever the network is available.

Notably, if the device doesn't have internet it won't be able to use NTP to set the time. This means we will need to be able to mark (upon collection) which data points do not have a confident time stamp and still be able to keep track of how they occur in series with new data points. Then whenever a network is established, the device uses NTP to get the current time, and then the device can retroactively set the collection times on all of the "marked" data points based on the current time. I think this could work because between "sleeps" our sampling intervals are consistent regardless of knowing the exact time.