{"action":"created","comment":{"url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/comments/44361000","id":44361000,"diff_hunk":"@@ -0,0 +1,77 @@\n+package com.mobileproto.jovanduy.scavengerhunt;\n+\n+import android.util.Log;\n+\n+/**\n+ * Created by root on 10/22/15.\n+ */\n+public class CalculateLocation {\n+    private double lat1;\n+    private double lon1;\n+    private double lat2;\n+    private double lon2;\n+\n+    public CalculateLocation(){\n+\n+    }\n+    private String TAG = \"CalculatLocation\";\n+    public double calculateDistance(String slat1, String slon1, String slat2, String slon2){\n+        lat1 = Double.parseDouble(slat1);\n+        lon1 = Double.parseDouble(slon1);\n+        lat2 = Double.parseDouble(slat2);\n+        lon2 = Double.parseDouble(slon2);\n+        double distance;\n+\n+\n+        Double R = 6378.137; // Radius of earth in KM\n+        double dLat = (lat2 - lat1) * Math.PI / 180;\n+        double dLon = (lon2 - lon1) * Math.PI / 180;\n+        double a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n+                Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\n+                        Math.sin(dLon/2) * Math.sin(dLon/2);\n+        double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n+        double d = R * c;\n+\n+        distance = (d * 1000);\n+        Log.d(TAG, \"distance:\"+distance);\n+        return distance; // meters","path":"ScavengerHunt/app/src/main/java/com/mobileproto/jovanduy/scavengerhunt/CalculateLocation.java","position":37,"original_position":37,"commit_id":"8f979c7e51f7d092a1ac9f54d1ec48479b1c58ff","original_commit_id":"8f979c7e51f7d092a1ac9f54d1ec48479b1c58ff","user":{"login":"runnersaw","id":6564620,"avatar_url":"https://avatars.githubusercontent.com/u/6564620?v=3","gravatar_id":"","url":"https://api.github.com/users/runnersaw","html_url":"https://github.com/runnersaw","followers_url":"https://api.github.com/users/runnersaw/followers","following_url":"https://api.github.com/users/runnersaw/following{/other_user}","gists_url":"https://api.github.com/users/runnersaw/gists{/gist_id}","starred_url":"https://api.github.com/users/runnersaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runnersaw/subscriptions","organizations_url":"https://api.github.com/users/runnersaw/orgs","repos_url":"https://api.github.com/users/runnersaw/repos","events_url":"https://api.github.com/users/runnersaw/events{/privacy}","received_events_url":"https://api.github.com/users/runnersaw/received_events","type":"User","site_admin":false},"body":"Wow, awesome. I love that you did this because it allows for good testability, and real results. ","created_at":"2015-11-10T01:44:09Z","updated_at":"2015-11-10T01:44:09Z","html_url":"https://github.com/OlinMobileProto/Lab3/pull/30#discussion_r44361000","pull_request_url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/comments/44361000"},"html":{"href":"https://github.com/OlinMobileProto/Lab3/pull/30#discussion_r44361000"},"pull_request":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30","id":50079030,"html_url":"https://github.com/OlinMobileProto/Lab3/pull/30","diff_url":"https://github.com/OlinMobileProto/Lab3/pull/30.diff","patch_url":"https://github.com/OlinMobileProto/Lab3/pull/30.patch","issue_url":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/30","number":30,"state":"open","locked":false,"title":"James & Jordan: Commenting on Lab 3","user":{"login":"dcelik","id":5778626,"avatar_url":"https://avatars.githubusercontent.com/u/5778626?v=3","gravatar_id":"","url":"https://api.github.com/users/dcelik","html_url":"https://github.com/dcelik","followers_url":"https://api.github.com/users/dcelik/followers","following_url":"https://api.github.com/users/dcelik/following{/other_user}","gists_url":"https://api.github.com/users/dcelik/gists{/gist_id}","starred_url":"https://api.github.com/users/dcelik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcelik/subscriptions","organizations_url":"https://api.github.com/users/dcelik/orgs","repos_url":"https://api.github.com/users/dcelik/repos","events_url":"https://api.github.com/users/dcelik/events{/privacy}","received_events_url":"https://api.github.com/users/dcelik/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-09T02:28:01Z","updated_at":"2015-11-10T01:44:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cff87f4dbf80b013765d76afa97f0d75d09af6fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30/commits","review_comments_url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30/comments","review_comment_url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/30/comments","statuses_url":"https://api.github.com/repos/OlinMobileProto/Lab3/statuses/8f979c7e51f7d092a1ac9f54d1ec48479b1c58ff","head":{"label":"ZhecanJamesWang:master","ref":"master","sha":"8f979c7e51f7d092a1ac9f54d1ec48479b1c58ff","user":{"login":"ZhecanJamesWang","id":8936136,"avatar_url":"https://avatars.githubusercontent.com/u/8936136?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhecanJamesWang","html_url":"https://github.com/ZhecanJamesWang","followers_url":"https://api.github.com/users/ZhecanJamesWang/followers","following_url":"https://api.github.com/users/ZhecanJamesWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhecanJamesWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhecanJamesWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhecanJamesWang/subscriptions","organizations_url":"https://api.github.com/users/ZhecanJamesWang/orgs","repos_url":"https://api.github.com/users/ZhecanJamesWang/repos","events_url":"https://api.github.com/users/ZhecanJamesWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhecanJamesWang/received_events","type":"User","site_admin":false},"repo":{"id":43527418,"name":"ScavengerHunt-AndroidApp","full_name":"ZhecanJamesWang/ScavengerHunt-AndroidApp","owner":{"login":"ZhecanJamesWang","id":8936136,"avatar_url":"https://avatars.githubusercontent.com/u/8936136?v=3","gravatar_id":"","url":"https://api.github.com/users/ZhecanJamesWang","html_url":"https://github.com/ZhecanJamesWang","followers_url":"https://api.github.com/users/ZhecanJamesWang/followers","following_url":"https://api.github.com/users/ZhecanJamesWang/following{/other_user}","gists_url":"https://api.github.com/users/ZhecanJamesWang/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhecanJamesWang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhecanJamesWang/subscriptions","organizations_url":"https://api.github.com/users/ZhecanJamesWang/orgs","repos_url":"https://api.github.com/users/ZhecanJamesWang/repos","events_url":"https://api.github.com/users/ZhecanJamesWang/events{/privacy}","received_events_url":"https://api.github.com/users/ZhecanJamesWang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZhecanJamesWang/ScavengerHunt-AndroidApp","description":"A scavenger hunt android app for class Mobile Prototype. Players can watch video hints in the app and try to reach the landmark. While reaching, player can use the GPS module in the app to check the spot and take a photo for reference. This app can download video hints from server as well as  Amazon S3 database and  also can push photos of players to the remote. ","fork":true,"url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp","forks_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/forks","keys_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/teams","hooks_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/hooks","issue_events_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/issues/events{/number}","events_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/events","assignees_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/assignees{/user}","branches_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/branches{/branch}","tags_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/tags","blobs_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/statuses/{sha}","languages_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/languages","stargazers_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/stargazers","contributors_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/contributors","subscribers_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/subscribers","subscription_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/subscription","commits_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/contents/{+path}","compare_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/merges","archive_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/downloads","issues_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/issues{/number}","pulls_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/pulls{/number}","milestones_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/milestones{/number}","notifications_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/labels{/name}","releases_url":"https://api.github.com/repos/ZhecanJamesWang/ScavengerHunt-AndroidApp/releases{/id}","created_at":"2015-10-01T23:54:43Z","updated_at":"2015-11-01T19:23:00Z","pushed_at":"2015-10-28T00:28:01Z","git_url":"git://github.com/ZhecanJamesWang/ScavengerHunt-AndroidApp.git","ssh_url":"git@github.com:ZhecanJamesWang/ScavengerHunt-AndroidApp.git","clone_url":"https://github.com/ZhecanJamesWang/ScavengerHunt-AndroidApp.git","svn_url":"https://github.com/ZhecanJamesWang/ScavengerHunt-AndroidApp","homepage":"","size":383,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OlinMobileProto:master","ref":"master","sha":"45754fcd763d1fb32ce3786c8df4cfa5b69c607a","user":{"login":"OlinMobileProto","id":11400546,"avatar_url":"https://avatars.githubusercontent.com/u/11400546?v=3","gravatar_id":"","url":"https://api.github.com/users/OlinMobileProto","html_url":"https://github.com/OlinMobileProto","followers_url":"https://api.github.com/users/OlinMobileProto/followers","following_url":"https://api.github.com/users/OlinMobileProto/following{/other_user}","gists_url":"https://api.github.com/users/OlinMobileProto/gists{/gist_id}","starred_url":"https://api.github.com/users/OlinMobileProto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlinMobileProto/subscriptions","organizations_url":"https://api.github.com/users/OlinMobileProto/orgs","repos_url":"https://api.github.com/users/OlinMobileProto/repos","events_url":"https://api.github.com/users/OlinMobileProto/events{/privacy}","received_events_url":"https://api.github.com/users/OlinMobileProto/received_events","type":"Organization","site_admin":false},"repo":{"id":43336576,"name":"Lab3","full_name":"OlinMobileProto/Lab3","owner":{"login":"OlinMobileProto","id":11400546,"avatar_url":"https://avatars.githubusercontent.com/u/11400546?v=3","gravatar_id":"","url":"https://api.github.com/users/OlinMobileProto","html_url":"https://github.com/OlinMobileProto","followers_url":"https://api.github.com/users/OlinMobileProto/followers","following_url":"https://api.github.com/users/OlinMobileProto/following{/other_user}","gists_url":"https://api.github.com/users/OlinMobileProto/gists{/gist_id}","starred_url":"https://api.github.com/users/OlinMobileProto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlinMobileProto/subscriptions","organizations_url":"https://api.github.com/users/OlinMobileProto/orgs","repos_url":"https://api.github.com/users/OlinMobileProto/repos","events_url":"https://api.github.com/users/OlinMobileProto/events{/privacy}","received_events_url":"https://api.github.com/users/OlinMobileProto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OlinMobileProto/Lab3","description":"","fork":false,"url":"https://api.github.com/repos/OlinMobileProto/Lab3","forks_url":"https://api.github.com/repos/OlinMobileProto/Lab3/forks","keys_url":"https://api.github.com/repos/OlinMobileProto/Lab3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OlinMobileProto/Lab3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OlinMobileProto/Lab3/teams","hooks_url":"https://api.github.com/repos/OlinMobileProto/Lab3/hooks","issue_events_url":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/events{/number}","events_url":"https://api.github.com/repos/OlinMobileProto/Lab3/events","assignees_url":"https://api.github.com/repos/OlinMobileProto/Lab3/assignees{/user}","branches_url":"https://api.github.com/repos/OlinMobileProto/Lab3/branches{/branch}","tags_url":"https://api.github.com/repos/OlinMobileProto/Lab3/tags","blobs_url":"https://api.github.com/repos/OlinMobileProto/Lab3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OlinMobileProto/Lab3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OlinMobileProto/Lab3/git/refs{/sha}","trees_url":"https://api.github.com/repos/OlinMobileProto/Lab3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OlinMobileProto/Lab3/statuses/{sha}","languages_url":"https://api.github.com/repos/OlinMobileProto/Lab3/languages","stargazers_url":"https://api.github.com/repos/OlinMobileProto/Lab3/stargazers","contributors_url":"https://api.github.com/repos/OlinMobileProto/Lab3/contributors","subscribers_url":"https://api.github.com/repos/OlinMobileProto/Lab3/subscribers","subscription_url":"https://api.github.com/repos/OlinMobileProto/Lab3/subscription","commits_url":"https://api.github.com/repos/OlinMobileProto/Lab3/commits{/sha}","git_commits_url":"https://api.github.com/repos/OlinMobileProto/Lab3/git/commits{/sha}","comments_url":"https://api.github.com/repos/OlinMobileProto/Lab3/comments{/number}","issue_comment_url":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/comments{/number}","contents_url":"https://api.github.com/repos/OlinMobileProto/Lab3/contents/{+path}","compare_url":"https://api.github.com/repos/OlinMobileProto/Lab3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OlinMobileProto/Lab3/merges","archive_url":"https://api.github.com/repos/OlinMobileProto/Lab3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OlinMobileProto/Lab3/downloads","issues_url":"https://api.github.com/repos/OlinMobileProto/Lab3/issues{/number}","pulls_url":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls{/number}","milestones_url":"https://api.github.com/repos/OlinMobileProto/Lab3/milestones{/number}","notifications_url":"https://api.github.com/repos/OlinMobileProto/Lab3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OlinMobileProto/Lab3/labels{/name}","releases_url":"https://api.github.com/repos/OlinMobileProto/Lab3/releases{/id}","created_at":"2015-09-29T01:07:40Z","updated_at":"2015-09-29T01:07:40Z","pushed_at":"2015-11-09T02:28:01Z","git_url":"git://github.com/OlinMobileProto/Lab3.git","ssh_url":"git@github.com:OlinMobileProto/Lab3.git","clone_url":"https://github.com/OlinMobileProto/Lab3.git","svn_url":"https://github.com/OlinMobileProto/Lab3","homepage":null,"size":2310,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30"},"html":{"href":"https://github.com/OlinMobileProto/Lab3/pull/30"},"issue":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/30"},"comments":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/OlinMobileProto/Lab3/statuses/8f979c7e51f7d092a1ac9f54d1ec48479b1c58ff"}}}}