{"action":"created","issue":{"url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/33","repository_url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core","labels_url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/33/comments","events_url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/33/events","html_url":"https://github.com/DecentralizedAmateurPagingNetwork/Core/issues/33","id":188306374,"number":33,"title":"Zeitsync zwischen Core und Sender ist nicht absolut zeitlich richtig","user":{"login":"dh3wr","id":16710361,"avatar_url":"https://avatars.githubusercontent.com/u/16710361?v=3","gravatar_id":"","url":"https://api.github.com/users/dh3wr","html_url":"https://github.com/dh3wr","followers_url":"https://api.github.com/users/dh3wr/followers","following_url":"https://api.github.com/users/dh3wr/following{/other_user}","gists_url":"https://api.github.com/users/dh3wr/gists{/gist_id}","starred_url":"https://api.github.com/users/dh3wr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dh3wr/subscriptions","organizations_url":"https://api.github.com/users/dh3wr/orgs","repos_url":"https://api.github.com/users/dh3wr/repos","events_url":"https://api.github.com/users/dh3wr/events{/privacy}","received_events_url":"https://api.github.com/users/dh3wr/received_events","type":"User","site_admin":false},"labels":[{"id":450515103,"url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/labels/bug","name":"bug","color":"ee0701","default":true},{"id":450515105,"url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":450515108,"url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"MarvinMenzerath","id":2064514,"avatar_url":"https://avatars.githubusercontent.com/u/2064514?v=3","gravatar_id":"","url":"https://api.github.com/users/MarvinMenzerath","html_url":"https://github.com/MarvinMenzerath","followers_url":"https://api.github.com/users/MarvinMenzerath/followers","following_url":"https://api.github.com/users/MarvinMenzerath/following{/other_user}","gists_url":"https://api.github.com/users/MarvinMenzerath/gists{/gist_id}","starred_url":"https://api.github.com/users/MarvinMenzerath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarvinMenzerath/subscriptions","organizations_url":"https://api.github.com/users/MarvinMenzerath/orgs","repos_url":"https://api.github.com/users/MarvinMenzerath/repos","events_url":"https://api.github.com/users/MarvinMenzerath/events{/privacy}","received_events_url":"https://api.github.com/users/MarvinMenzerath/received_events","type":"User","site_admin":false},"assignees":[{"login":"MarvinMenzerath","id":2064514,"avatar_url":"https://avatars.githubusercontent.com/u/2064514?v=3","gravatar_id":"","url":"https://api.github.com/users/MarvinMenzerath","html_url":"https://github.com/MarvinMenzerath","followers_url":"https://api.github.com/users/MarvinMenzerath/followers","following_url":"https://api.github.com/users/MarvinMenzerath/following{/other_user}","gists_url":"https://api.github.com/users/MarvinMenzerath/gists{/gist_id}","starred_url":"https://api.github.com/users/MarvinMenzerath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarvinMenzerath/subscriptions","organizations_url":"https://api.github.com/users/MarvinMenzerath/orgs","repos_url":"https://api.github.com/users/MarvinMenzerath/repos","events_url":"https://api.github.com/users/MarvinMenzerath/events{/privacy}","received_events_url":"https://api.github.com/users/MarvinMenzerath/received_events","type":"User","site_admin":false},{"login":"dh3wr","id":16710361,"avatar_url":"https://avatars.githubusercontent.com/u/16710361?v=3","gravatar_id":"","url":"https://api.github.com/users/dh3wr","html_url":"https://github.com/dh3wr","followers_url":"https://api.github.com/users/dh3wr/followers","following_url":"https://api.github.com/users/dh3wr/following{/other_user}","gists_url":"https://api.github.com/users/dh3wr/gists{/gist_id}","starred_url":"https://api.github.com/users/dh3wr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dh3wr/subscriptions","organizations_url":"https://api.github.com/users/dh3wr/orgs","repos_url":"https://api.github.com/users/dh3wr/repos","events_url":"https://api.github.com/users/dh3wr/events{/privacy}","received_events_url":"https://api.github.com/users/dh3wr/received_events","type":"User","site_admin":false},{"login":"DanielSialkowski","id":22470917,"avatar_url":"https://avatars.githubusercontent.com/u/22470917?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielSialkowski","html_url":"https://github.com/DanielSialkowski","followers_url":"https://api.github.com/users/DanielSialkowski/followers","following_url":"https://api.github.com/users/DanielSialkowski/following{/other_user}","gists_url":"https://api.github.com/users/DanielSialkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielSialkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielSialkowski/subscriptions","organizations_url":"https://api.github.com/users/DanielSialkowski/orgs","repos_url":"https://api.github.com/users/DanielSialkowski/repos","events_url":"https://api.github.com/users/DanielSialkowski/events{/privacy}","received_events_url":"https://api.github.com/users/DanielSialkowski/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-11-09T17:32:40Z","updated_at":"2016-11-11T10:22:40Z","closed_at":"2016-11-11T10:22:40Z","body":"In core/transmission/RaspagerProtocol.java wird in Zeilen 111 - 117 steht:\r\n` long timemillis = System.currentTimeMillis();`\r\n` long seconds = timemillis / 1000;`\r\n` long deltaTimemillis = timemillis - seconds * 1000; // additional milliseconds`\r\n` long time_tx = (seconds * 10 + deltaTimemillis / 100) & 0xffff;`\r\n\r\n` //long time_tx = RadioServer.getSysTime();`\r\n` String time_string_server = String.format(\"%04x\", time_tx);`\r\n\r\nDas liefert mit dem SDRPager in der Version vom 9.11.2016 folgende Begrüßung:\r\n\r\n> MS: 09.11.2016 17:06:48 SocketThread: inputBuffer# 2:6c90\r\n\r\nHierbei ist 6c90 die Master Zeit und zwar nach der Berechnung:\r\ntime_tx ist eine max. 16 bit lange Zahl, die die Anzahl der 100ms seit Linux-Beginn enthält.\r\nDie Linuxzeit ist in der Sekundenstelle mit der \"richtigen\" Zeit synchron, da Schaltsekunden automatisch aufgefangen werden.\r\n0x6c90 = 0d27792\r\nNun modulo 600 (600 mal sind 100ms in 1 Sek.) -> 27792 % 600 = 192\r\nAlso müsste dies zur Sekunde 19,2 geschehen sein. Ist laut Log aber um 17:06:48 passiert. Sowohl Core als auch SDRPager laufen auf NTP synchronisierten Maschinen und zeigen auch mit `watch -n 1 date` die gleiche Zeit an.\r\n\r\nAlso ist etwas an dem Algorithmus falsch, ich vermute das `& 0xffff` . Denn dies ist ja Quasi modulo 2^16. Und damit haben die letzten 16 Stellen nichts mehr mit der absoluten Sekundenanzahl der aktuellen Minute zu tun.\r\nHier wäre ein   `long time_tx = (seconds * 10 + deltaTimemillis / 100) % 600;` vielleicht eher richtig. Damit bleiben die Anzahl der 100ms zur tatsächlichen Uhrzeit ok.\r\n\r\nRFC?\r\n"},"comment":{"url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/comments/259927277","html_url":"https://github.com/DecentralizedAmateurPagingNetwork/Core/issues/33#issuecomment-259927277","issue_url":"https://api.github.com/repos/DecentralizedAmateurPagingNetwork/Core/issues/33","id":259927277,"user":{"login":"dh3wr","id":16710361,"avatar_url":"https://avatars.githubusercontent.com/u/16710361?v=3","gravatar_id":"","url":"https://api.github.com/users/dh3wr","html_url":"https://github.com/dh3wr","followers_url":"https://api.github.com/users/dh3wr/followers","following_url":"https://api.github.com/users/dh3wr/following{/other_user}","gists_url":"https://api.github.com/users/dh3wr/gists{/gist_id}","starred_url":"https://api.github.com/users/dh3wr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dh3wr/subscriptions","organizations_url":"https://api.github.com/users/dh3wr/orgs","repos_url":"https://api.github.com/users/dh3wr/repos","events_url":"https://api.github.com/users/dh3wr/events{/privacy}","received_events_url":"https://api.github.com/users/dh3wr/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T10:22:40Z","updated_at":"2016-11-11T10:22:40Z","body":"Also die & 0xffff Variante ist wohl die \"richtige\" laut historischer Entwicklung. Damit ist das hier beendet."}}
{"actor":{"display_login":"dh3wr"}}