jbrzusto / motusServer

R package to operate a server that processes data for https://motus.org
GNU General Public License v2.0
1 stars 0 forks source link

rationalize processing by boot session #320

Open jbrzusto opened 6 years ago

jbrzusto commented 6 years ago

Due to both receiver software bugs and jbrzusto/sensorgnome#53, the boot count embedded in SG filenames is not always a non-decreasing function of timestamp; i.e. bootcounts can jump backward from earlier to later files, e.g. due to reformatting an SD card.

Tag finder should take this into account. Options:

The main problem in any of these cases is dealing with pre-GPS timestamps where the bootnum cannot be trusted. In most cases, such files will have a tail with records having accurate timestamps, which will allow us to place them in the correct (monotonic) boot session.

jbrzusto commented 6 years ago
jbrzusto commented 6 years ago

ensureMonoBN still not working:

> ensureMonoBN(getRecvSrc("SG-2712BB000055"),testOnly=TRUE)
[1] TRUE
> ensureMonoBN(getRecvSrc("SG-2712BB000055"))
[1] TRUE
There were 46 warnings (use warnings() to see them)
> ensureMonoBN(getRecvSrc("SG-2712BB000055"),testOnly=TRUE)
[1] TRUE

After the second run, with testOnly=FALSE (the default), there should no longer be any time/bootnum inversions. But the 2nd run with testOnly=TRUE shows there still are.

jbrzusto commented 6 years ago

The check with testOnly=TRUE was the problem: it was using the uncorrected bootnum, instead of the corrected monoBN.