{"action":"created","comment":{"url":"https://api.github.com/repos/sw8f17/paper/pulls/comments/113424977","pull_request_review_id":34565836,"id":113424977,"diff_hunk":"@@ -0,0 +1,97 @@\n+\\chapter{Synchronization}\r\n+%What is the importance of synchronization to us\r\n+    %hope for the best is not feasable\r\n+    %To make psychoacoustic effects reality we need farily accurate manipulation depending on effect\r\n+    %Audible sync is not the same as clock synchronization, a slight desync in clocks may actually cause psychoacoustic effects (precedence effect), essentially providing us with an acceptable threshold for desynchronization.\r\n+Simply sending playback commands between devices and hoping they are received fast enough to not disrupt the audible synchronization, is not a reliable solution and as such synchronization is important to the application.\\mnote{What a sentence}\r\n+In order for us to achieve any kind of audible synchronization we need reasonably accurate clock synchronization across multiple devices.\r\n+The accuracy of the synchronization will also determine the degree to which we can manipulate playback to achieve psychoacoustic effects should we reach this milestone.\r\n+This section explores and evaluates the methods we have considered using.\r\n+%Why is sync of such importance?\r\n+\r\n+An important distinction to make when discussing synchronization for our application is the difference between audible synchronization and clock synchronization.\r\n+This section focuses clock synchronization, the better clock synchronization we acquire the more accurate our playback manipulation becomes, and by extension our ability to create audible synchronization.\r\n+In that audible synchronization is the goal for the application, this also means that precision in the range of milliseconds is sufficient, furthermore one of our requirements mentioned in \\cnameref{cha:requirement_elicitation} is to compete with the \\ac{SOTA} applications.\r\n+\r\n+%How can we achieve this synchronization\r\n+    %We propose and have looked into several methods\r\n+        %GPS\r\n+        %Audio\r\n+        %Light cues\r\n+        %Messages/Protocols(my time, adjust to this)\r\n+            %We looked into some academic research on this, however found that it was mostly unimplemented theories, often a bit off the mark from what we wanted to do.\r\n+        %NTP(external sync/offset calculations)\r\n+\\section{Methods}\r\n+The following is a list of the possible solutions we have considered:\r\n+\\begin{itemize}\r\n+    \\item GPS\r\n+    \\item Audio\r\n+    \\item Light cues.\r\n+    \\item \\ac{NTP}\r\n+    \\item \\ac{PTP}\r\n+\\end{itemize}\r\n+An important thing to realize is also that if we were to synchronize the clocks, as in change the actual clock on the phones, they are required to be rooted for an application to do so.\r\n+While we placed \\ac{UX} as a non-requirement, we can not expect users to root their device as, depending on country, it may violate copyright, warranty, and/or terms on service on the phone.\r\n+As such we will strictly speaking not be synchronizing the clocks, rather we will keep track of each devices offset to the source we want to synchronize with.\r\n+\r\n+\\subsubsection{GPS}\r\n+%https://spectracom.com/resources/essential-education/gps-clock-synchronization\r\n+GPS satellites contain multiple atomic clocks.\r\n+These clocks are monitored and controlled to keep them synchronized with the UTC standard.\r\n+This provides us with an accurate clock to synchronize towards.\\cite{gpsclock}\r\n+After testing this, by developing an application to retrieve time from GPS, it was clear to us that the GPS hardware in our phones are limited to 1Hz updates and do not provide millisecond precision, which makes us unable to use GPS as a solution.\r\n+\r\n+\\subsubsection{Audio}\\mnote{Can go into more detail about how we would solve the difficulties in this, but i do not think it is worth}\r\n+Another possible method is to use the audio to synchronize.\r\n+This would have every device attempt to synchronize based on their perception.\r\n+This method introduces several issues to be addressed, first of all there would be a ramp up time for the devices to figure out synchronization.\r\n+Furthermore adding more devices to the network introduces more complexity as each introduces a new audio source, and with each device figuring out their own synchronization it is unlikely that the devices are synchronization towards the same source.\r\n+While this may not have an effect on humans given only a few milliseconds of variance, due to psychoacoustic effects, it complicates the synchronization of the devices and our possible manipulation.\r\n+\r\n+\\subsubsection{Light Cues}\r\n+Alternatively we can use light rather than audio to synchronize.\r\n+This would also allow devices to respond as to achieve synchronization better.\r\n+The idea would be that a device uses the flashlight, once observed by another device it flashes back.\r\n+Using Einstein Synchronization we can use the respective times collected from this, to synchronize the two devices \\cite{einstein}.\r\n+This has the significant disadvantage that the facing of the phones becomes important for synchronization, as the phones must have their flashes and cameras facing the synchronization target.\r\n+%https://en.wikipedia.org/wiki/Einstein_synchronisation\r\n+\r\n+\\subsubsection{\\acl{NTP}}\r\n+The last two options we are considering are to use existing protocols used for synchronization, one of which is \\ac{NTP}.\r\n+\\ac{NTP} works by using a hierarchical system with high--precision atomic clocks at the highest level, each level is then synchronized towards devices from the higher level.\r\n+\\ac{NTP} polls multiple servers in the hierarchy and uses this to determine an actual time.\r\n+Essentially the \\ac{NTP} servers we will be polling act like a clock master, as such even the master of the network will have an offset.\r\n+This also produces a hybrid solution between our proposed local centralized and remote centralized solutions, mentioned in \\cnameref{sec:external_architectures}, by making the clock remote centralized, but maintaining all other control in a local network.\r\n+The idea here would be for each device to keep track of their own \\ac{NTP} offset, and then have then play in accordance with the time acquired from \\ac{NTP}. \r\n+\r\n+\\subsubsection{\\acl{PTP}}\r\n+While \\ac{NTP} requires internet to poll the \\ac{NTP} hierarchy, \\ac{PTP} is designed for LAN.\r\n+\\ac{PTP} on the other hand uses the \\ac{BMC} algorithm to determine a master and thereby disallowing us from making this decision.\r\n+If we are to use \\ac{PTP} each device would keep track of their offset towards the master.\r\n+While \\ac{PTP} has an expected accuracy in the nanoseconds, contrary to NTP's up to ten milliseconds, this is due to the LAN design.\r","path":"cha/design/sync.tex","position":71,"original_position":71,"commit_id":"01e2262c45913fe87485bf2662a6b1eb4371a451","original_commit_id":"01e2262c45913fe87485bf2662a6b1eb4371a451","user":{"login":"VirtualSatai","id":1919650,"avatar_url":"https://avatars3.githubusercontent.com/u/1919650?v=3","gravatar_id":"","url":"https://api.github.com/users/VirtualSatai","html_url":"https://github.com/VirtualSatai","followers_url":"https://api.github.com/users/VirtualSatai/followers","following_url":"https://api.github.com/users/VirtualSatai/following{/other_user}","gists_url":"https://api.github.com/users/VirtualSatai/gists{/gist_id}","starred_url":"https://api.github.com/users/VirtualSatai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirtualSatai/subscriptions","organizations_url":"https://api.github.com/users/VirtualSatai/orgs","repos_url":"https://api.github.com/users/VirtualSatai/repos","events_url":"https://api.github.com/users/VirtualSatai/events{/privacy}","received_events_url":"https://api.github.com/users/VirtualSatai/received_events","type":"User","site_admin":false},"body":"Hvorfor står der ikke noget om de 10 ms i NTP afsnittet? ","created_at":"2017-04-26T11:14:13Z","updated_at":"2017-04-26T11:16:13Z","html_url":"https://github.com/sw8f17/paper/pull/46#discussion_r113424977","pull_request_url":"https://api.github.com/repos/sw8f17/paper/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/comments/113424977"},"html":{"href":"https://github.com/sw8f17/paper/pull/46#discussion_r113424977"},"pull_request":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/sw8f17/paper/pulls/46","id":117482573,"html_url":"https://github.com/sw8f17/paper/pull/46","diff_url":"https://github.com/sw8f17/paper/pull/46.diff","patch_url":"https://github.com/sw8f17/paper/pull/46.patch","issue_url":"https://api.github.com/repos/sw8f17/paper/issues/46","number":46,"state":"open","locked":false,"title":"Design sync","user":{"login":"TriXXeD","id":6638014,"avatar_url":"https://avatars1.githubusercontent.com/u/6638014?v=3","gravatar_id":"","url":"https://api.github.com/users/TriXXeD","html_url":"https://github.com/TriXXeD","followers_url":"https://api.github.com/users/TriXXeD/followers","following_url":"https://api.github.com/users/TriXXeD/following{/other_user}","gists_url":"https://api.github.com/users/TriXXeD/gists{/gist_id}","starred_url":"https://api.github.com/users/TriXXeD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TriXXeD/subscriptions","organizations_url":"https://api.github.com/users/TriXXeD/orgs","repos_url":"https://api.github.com/users/TriXXeD/repos","events_url":"https://api.github.com/users/TriXXeD/events{/privacy}","received_events_url":"https://api.github.com/users/TriXXeD/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-25T13:20:13Z","updated_at":"2017-04-26T11:16:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"623d1f29b33e439f3e5d5a24629dd65de95c35d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sw8f17/paper/pulls/46/commits","review_comments_url":"https://api.github.com/repos/sw8f17/paper/pulls/46/comments","review_comment_url":"https://api.github.com/repos/sw8f17/paper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sw8f17/paper/issues/46/comments","statuses_url":"https://api.github.com/repos/sw8f17/paper/statuses/01e2262c45913fe87485bf2662a6b1eb4371a451","head":{"label":"sw8f17:design-sync","ref":"design-sync","sha":"01e2262c45913fe87485bf2662a6b1eb4371a451","user":{"login":"sw8f17","id":25585304,"avatar_url":"https://avatars3.githubusercontent.com/u/25585304?v=3","gravatar_id":"","url":"https://api.github.com/users/sw8f17","html_url":"https://github.com/sw8f17","followers_url":"https://api.github.com/users/sw8f17/followers","following_url":"https://api.github.com/users/sw8f17/following{/other_user}","gists_url":"https://api.github.com/users/sw8f17/gists{/gist_id}","starred_url":"https://api.github.com/users/sw8f17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sw8f17/subscriptions","organizations_url":"https://api.github.com/users/sw8f17/orgs","repos_url":"https://api.github.com/users/sw8f17/repos","events_url":"https://api.github.com/users/sw8f17/events{/privacy}","received_events_url":"https://api.github.com/users/sw8f17/received_events","type":"Organization","site_admin":false},"repo":{"id":81086156,"name":"paper","full_name":"sw8f17/paper","owner":{"login":"sw8f17","id":25585304,"avatar_url":"https://avatars3.githubusercontent.com/u/25585304?v=3","gravatar_id":"","url":"https://api.github.com/users/sw8f17","html_url":"https://github.com/sw8f17","followers_url":"https://api.github.com/users/sw8f17/followers","following_url":"https://api.github.com/users/sw8f17/following{/other_user}","gists_url":"https://api.github.com/users/sw8f17/gists{/gist_id}","starred_url":"https://api.github.com/users/sw8f17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sw8f17/subscriptions","organizations_url":"https://api.github.com/users/sw8f17/orgs","repos_url":"https://api.github.com/users/sw8f17/repos","events_url":"https://api.github.com/users/sw8f17/events{/privacy}","received_events_url":"https://api.github.com/users/sw8f17/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sw8f17/paper","description":"📝🎶📊","fork":false,"url":"https://api.github.com/repos/sw8f17/paper","forks_url":"https://api.github.com/repos/sw8f17/paper/forks","keys_url":"https://api.github.com/repos/sw8f17/paper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sw8f17/paper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sw8f17/paper/teams","hooks_url":"https://api.github.com/repos/sw8f17/paper/hooks","issue_events_url":"https://api.github.com/repos/sw8f17/paper/issues/events{/number}","events_url":"https://api.github.com/repos/sw8f17/paper/events","assignees_url":"https://api.github.com/repos/sw8f17/paper/assignees{/user}","branches_url":"https://api.github.com/repos/sw8f17/paper/branches{/branch}","tags_url":"https://api.github.com/repos/sw8f17/paper/tags","blobs_url":"https://api.github.com/repos/sw8f17/paper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sw8f17/paper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sw8f17/paper/git/refs{/sha}","trees_url":"https://api.github.com/repos/sw8f17/paper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sw8f17/paper/statuses/{sha}","languages_url":"https://api.github.com/repos/sw8f17/paper/languages","stargazers_url":"https://api.github.com/repos/sw8f17/paper/stargazers","contributors_url":"https://api.github.com/repos/sw8f17/paper/contributors","subscribers_url":"https://api.github.com/repos/sw8f17/paper/subscribers","subscription_url":"https://api.github.com/repos/sw8f17/paper/subscription","commits_url":"https://api.github.com/repos/sw8f17/paper/commits{/sha}","git_commits_url":"https://api.github.com/repos/sw8f17/paper/git/commits{/sha}","comments_url":"https://api.github.com/repos/sw8f17/paper/comments{/number}","issue_comment_url":"https://api.github.com/repos/sw8f17/paper/issues/comments{/number}","contents_url":"https://api.github.com/repos/sw8f17/paper/contents/{+path}","compare_url":"https://api.github.com/repos/sw8f17/paper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sw8f17/paper/merges","archive_url":"https://api.github.com/repos/sw8f17/paper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sw8f17/paper/downloads","issues_url":"https://api.github.com/repos/sw8f17/paper/issues{/number}","pulls_url":"https://api.github.com/repos/sw8f17/paper/pulls{/number}","milestones_url":"https://api.github.com/repos/sw8f17/paper/milestones{/number}","notifications_url":"https://api.github.com/repos/sw8f17/paper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sw8f17/paper/labels{/name}","releases_url":"https://api.github.com/repos/sw8f17/paper/releases{/id}","deployments_url":"https://api.github.com/repos/sw8f17/paper/deployments","created_at":"2017-02-06T12:44:26Z","updated_at":"2017-03-23T11:22:21Z","pushed_at":"2017-04-25T13:20:13Z","git_url":"git://github.com/sw8f17/paper.git","ssh_url":"git@github.com:sw8f17/paper.git","clone_url":"https://github.com/sw8f17/paper.git","svn_url":"https://github.com/sw8f17/paper","homepage":"","size":5750,"stargazers_count":1,"watchers_count":1,"language":"TeX","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"sw8f17:master","ref":"master","sha":"b8ebaef5094ff1161e18bbe49e470cc123e58c2f","user":{"login":"sw8f17","id":25585304,"avatar_url":"https://avatars3.githubusercontent.com/u/25585304?v=3","gravatar_id":"","url":"https://api.github.com/users/sw8f17","html_url":"https://github.com/sw8f17","followers_url":"https://api.github.com/users/sw8f17/followers","following_url":"https://api.github.com/users/sw8f17/following{/other_user}","gists_url":"https://api.github.com/users/sw8f17/gists{/gist_id}","starred_url":"https://api.github.com/users/sw8f17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sw8f17/subscriptions","organizations_url":"https://api.github.com/users/sw8f17/orgs","repos_url":"https://api.github.com/users/sw8f17/repos","events_url":"https://api.github.com/users/sw8f17/events{/privacy}","received_events_url":"https://api.github.com/users/sw8f17/received_events","type":"Organization","site_admin":false},"repo":{"id":81086156,"name":"paper","full_name":"sw8f17/paper","owner":{"login":"sw8f17","id":25585304,"avatar_url":"https://avatars3.githubusercontent.com/u/25585304?v=3","gravatar_id":"","url":"https://api.github.com/users/sw8f17","html_url":"https://github.com/sw8f17","followers_url":"https://api.github.com/users/sw8f17/followers","following_url":"https://api.github.com/users/sw8f17/following{/other_user}","gists_url":"https://api.github.com/users/sw8f17/gists{/gist_id}","starred_url":"https://api.github.com/users/sw8f17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sw8f17/subscriptions","organizations_url":"https://api.github.com/users/sw8f17/orgs","repos_url":"https://api.github.com/users/sw8f17/repos","events_url":"https://api.github.com/users/sw8f17/events{/privacy}","received_events_url":"https://api.github.com/users/sw8f17/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sw8f17/paper","description":"📝🎶📊","fork":false,"url":"https://api.github.com/repos/sw8f17/paper","forks_url":"https://api.github.com/repos/sw8f17/paper/forks","keys_url":"https://api.github.com/repos/sw8f17/paper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sw8f17/paper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sw8f17/paper/teams","hooks_url":"https://api.github.com/repos/sw8f17/paper/hooks","issue_events_url":"https://api.github.com/repos/sw8f17/paper/issues/events{/number}","events_url":"https://api.github.com/repos/sw8f17/paper/events","assignees_url":"https://api.github.com/repos/sw8f17/paper/assignees{/user}","branches_url":"https://api.github.com/repos/sw8f17/paper/branches{/branch}","tags_url":"https://api.github.com/repos/sw8f17/paper/tags","blobs_url":"https://api.github.com/repos/sw8f17/paper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sw8f17/paper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sw8f17/paper/git/refs{/sha}","trees_url":"https://api.github.com/repos/sw8f17/paper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sw8f17/paper/statuses/{sha}","languages_url":"https://api.github.com/repos/sw8f17/paper/languages","stargazers_url":"https://api.github.com/repos/sw8f17/paper/stargazers","contributors_url":"https://api.github.com/repos/sw8f17/paper/contributors","subscribers_url":"https://api.github.com/repos/sw8f17/paper/subscribers","subscription_url":"https://api.github.com/repos/sw8f17/paper/subscription","commits_url":"https://api.github.com/repos/sw8f17/paper/commits{/sha}","git_commits_url":"https://api.github.com/repos/sw8f17/paper/git/commits{/sha}","comments_url":"https://api.github.com/repos/sw8f17/paper/comments{/number}","issue_comment_url":"https://api.github.com/repos/sw8f17/paper/issues/comments{/number}","contents_url":"https://api.github.com/repos/sw8f17/paper/contents/{+path}","compare_url":"https://api.github.com/repos/sw8f17/paper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sw8f17/paper/merges","archive_url":"https://api.github.com/repos/sw8f17/paper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sw8f17/paper/downloads","issues_url":"https://api.github.com/repos/sw8f17/paper/issues{/number}","pulls_url":"https://api.github.com/repos/sw8f17/paper/pulls{/number}","milestones_url":"https://api.github.com/repos/sw8f17/paper/milestones{/number}","notifications_url":"https://api.github.com/repos/sw8f17/paper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sw8f17/paper/labels{/name}","releases_url":"https://api.github.com/repos/sw8f17/paper/releases{/id}","deployments_url":"https://api.github.com/repos/sw8f17/paper/deployments","created_at":"2017-02-06T12:44:26Z","updated_at":"2017-03-23T11:22:21Z","pushed_at":"2017-04-25T13:20:13Z","git_url":"git://github.com/sw8f17/paper.git","ssh_url":"git@github.com:sw8f17/paper.git","clone_url":"https://github.com/sw8f17/paper.git","svn_url":"https://github.com/sw8f17/paper","homepage":"","size":5750,"stargazers_count":1,"watchers_count":1,"language":"TeX","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/46"},"html":{"href":"https://github.com/sw8f17/paper/pull/46"},"issue":{"href":"https://api.github.com/repos/sw8f17/paper/issues/46"},"comments":{"href":"https://api.github.com/repos/sw8f17/paper/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sw8f17/paper/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/sw8f17/paper/statuses/01e2262c45913fe87485bf2662a6b1eb4371a451"}}}}
{"actor":{"display_login":"VirtualSatai"}}