{"action":"created","issue":{"url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/140","labels_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/140/comments","events_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/140/events","html_url":"https://github.com/volkszaehler/vzlogger/pull/140","id":60582872,"number":140,"title":"implemented avg mode for non aequidistant tuples","user":{"login":"mbehr1","id":3258891,"avatar_url":"https://avatars.githubusercontent.com/u/3258891?v=3","gravatar_id":"","url":"https://api.github.com/users/mbehr1","html_url":"https://github.com/mbehr1","followers_url":"https://api.github.com/users/mbehr1/followers","following_url":"https://api.github.com/users/mbehr1/following{/other_user}","gists_url":"https://api.github.com/users/mbehr1/gists{/gist_id}","starred_url":"https://api.github.com/users/mbehr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbehr1/subscriptions","organizations_url":"https://api.github.com/users/mbehr1/orgs","repos_url":"https://api.github.com/users/mbehr1/repos","events_url":"https://api.github.com/users/mbehr1/events{/privacy}","received_events_url":"https://api.github.com/users/mbehr1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-10T22:52:00Z","updated_at":"2015-03-11T19:55:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/volkszaehler/vzlogger/pulls/140","html_url":"https://github.com/volkszaehler/vzlogger/pull/140","diff_url":"https://github.com/volkszaehler/vzlogger/pull/140.diff","patch_url":"https://github.com/volkszaehler/vzlogger/pull/140.patch"},"body":"See here a proposal for #86.\r\n\r\nI struggled a bit in what timespan to use as the basis. Example:\r\n\r\nvalue 10 at time 1s, then value 20 at time 3s, then value 30 at time 4s:\r\n\r\n  a) 10 * 2s (from 1s to 3s) + 20 * 1s + 30 * 0s (yet) = 15\r\n  b) 10 * 0s + 20 * 2s (1s to 3s) + 30 * 1s (3s to 4s) = 23,33\r\n\r\nI implemented a) with taking the last value (30 from above) in consideration for the next aggregation.\r\n\r\nLet me know your feedback.\r\n\r\nImplementation unit-tested only."},"comment":{"url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/comments/78357553","html_url":"https://github.com/volkszaehler/vzlogger/pull/140#issuecomment-78357553","issue_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/140","id":78357553,"user":{"login":"mbehr1","id":3258891,"avatar_url":"https://avatars.githubusercontent.com/u/3258891?v=3","gravatar_id":"","url":"https://api.github.com/users/mbehr1","html_url":"https://github.com/mbehr1","followers_url":"https://api.github.com/users/mbehr1/followers","following_url":"https://api.github.com/users/mbehr1/following{/other_user}","gists_url":"https://api.github.com/users/mbehr1/gists{/gist_id}","starred_url":"https://api.github.com/users/mbehr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbehr1/subscriptions","organizations_url":"https://api.github.com/users/mbehr1/orgs","repos_url":"https://api.github.com/users/mbehr1/repos","events_url":"https://api.github.com/users/mbehr1/events{/privacy}","received_events_url":"https://api.github.com/users/mbehr1/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T19:55:02Z","updated_at":"2015-03-11T19:55:02Z","body":"The solution a) as implemented does have the problem of handling the first value.\r\nAnyhow both solutions have their pros and cons.\r\nHow to proceed? Is this implementation ok or shall I change to b) (or to some other way?)"}}