apps8os / contextlogger3

This is a repository for contextlogger3 software that is being built in Aalto University on top of the funf framework (http://code.google.com/p/funf-open-sensing-framework/). This project has originated from and is inspired by the ContextLogger2 project (http://contextlogger.org/) developed at Helsinki Institute for Information Technology (HIIT). All source code in this project is published under MIT open source license (http://opensource.org/licenses/MIT). If you have any questions about the project, please contact Kimmo Karhu (firstname.lastname [at] aalto.fi).
13 stars 2 forks source link

LoggerApp activity datetime adjustment issue #30

Closed tingan closed 10 years ago

tingan commented 11 years ago

Hi, Chao

In BJAST elderly test, we got the data like this timestamp, activity 1365853372,eatSTART-69900001 1365749987,eatSTOP-1 1365931332,homeSTOP-60000

The strange things are: the -69900001 is very big, also the -60000 is big. other adjustments are all minus 1. How can users adjust the time to 1 second?

There must be some systematic problems for the issues.

chaow commented 11 years ago

The time unit is milliseconds, so to make the output in seconds, just divide 1000. For example, 60000 / 1000 = 60 s.


From: tingan [notifications@github.com] Sent: 18 April 2013 14:15 To: sizzlelab/contextlogger3 Subject: [contextlogger3] LoggerApp activity datetime adjustment issue (#30)

Hi, Chao

In BJAST elderly test, we got the data like this timestamp, activity 1365853372,eatSTART-69900001 1365749987,eatSTOP-1 1365931332,homeSTOP-60000

The strange things are: the -69900001 is very big, also the -60000 is big. other adjustments are all minus 1. How can users adjust the time to 1 second?

There must be some systematic problems for the issues.

— Reply to this email directly or view it on GitHubhttps://github.com/sizzlelab/contextlogger3/issues/30.

tingan commented 11 years ago

Ok, even this make sense, how can you explain the -1 , this mean -1/1000 seconds adjustment?

tingan commented 11 years ago

for this 1365853372,eatSTART-69900001, what is the formula for the correct time? is it the 1365853372 - 69900001/1000, then convert the resulting timestamp to datetime?

chaow commented 11 years ago

All the time is recorded in milliseconds (by using UNIX timestamp on the device). The first timestampe is UI event timestamp (click button), and the timestamp after the event name is the time offset (compared between the time adjustment through the time picker and UI event timestampe). Thus, the formula for the actual event timestamp is shown below.

result (activity timestamp) = UI event timestamp - (offset / 1000)

After that convert the result to human readable format.


From: tingan [notifications@github.com] Sent: 19 April 2013 11:02 To: sizzlelab/contextlogger3 Cc: Wei Chao Subject: Re: [contextlogger3] LoggerApp activity datetime adjustment issue (#30)

for this 1365853372,eatSTART-69900001, what is the formula for the correct time? is it the 1365853372 - 69900001/1000, then convert the resulting timestamp to datetime?

— Reply to this email directly or view it on GitHubhttps://github.com/sizzlelab/contextlogger3/issues/30#issuecomment-16640722.