{"action":"created","comment":{"url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/comments/324649172","pull_request_review_id":288595072,"id":324649172,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNDY0OTE3Mg==","diff_hunk":"@@ -74,77 +77,92 @@ def calcGotoPoints(self):\n         pointA = pointA[ validPoints, : ]\n         return pointA\n \n-\n     # Provide points along each route to evaluate risk at\n     # Select route with minimum risk - If risk too high do something sensible\n     # Route goes from UAV location -> chase point -> target points\n+    # This function needs to be faster\n     def pathMeshGrid(self, gotoPoints):\n         numPaths = gotoPoints.shape[0]\n \n         # Calculate vector between points aircraft -> goto & goto -> target location\n-        pathA_vector = ( gotoPoints - self.aircraftPosition )\n-        pathB_vector = ( self.targetPosition - gotoPoints )\n+        pathA_vector = (gotoPoints - self.aircraftPosition)\n+        pathB_vector = (self.targetPosition - gotoPoints)\n \n         path_vectors = np.column_stack((pathA_vector, pathB_vector))\n-        path_vectors = np.reshape( path_vectors, (-1, self._numCoordinates) )\n+        path_vectors = np.reshape(path_vectors, (-1, self._numCoordinates))\n \n         # Linspace for number of points to evaluate. e.g. 10%, 20%, 30%...\n-        ratio = np.linspace( 0, 1, self.pathMeshElements + 1 )\n-        ratio = ratio[1:] # remove first element\n-\n-        # Matrix magic to calculate points to get things to correct shapes\n-        ratio = np.tile( ratio, 2*numPaths )\n-        ratio = np.tile( ratio, ( self._numCoordinates, 1 ) ).transpose()\n+        ratio = np.linspace( 0, 1, self.pathMeshElements + 1 )[1:]\n \n+        ratio = np.tile(ratio, 2 * numPaths)\n+        ratio = np.tile(ratio, (self._numCoordinates, 1)).transpose()\n         # Multiply vectors by linspace to give all points to evaluate - don't double count goto position\n         points = np.repeat(path_vectors, self.pathMeshElements, 0) * ratio\n-        \n+\n         startPointA = np.tile(self.aircraftPosition, (numPaths, self.pathMeshElements))\n         startPointB = np.tile(gotoPoints, (1, self.pathMeshElements))\n-        \n+\n         path_start = np.column_stack((startPointA, startPointB))\n         path_start = np.reshape( path_start, (-1, 3) )\n \n         # Add to vector\n         points += path_start\n-\n         return points\n \n+    def calculatePathRisk(self, gotoPoints, pointRisk, DistanceThreshold = 8):","path":"modules/navigation.py","position":132,"original_position":132,"commit_id":"7ed29a323a729d91cadb8ad942cf78b8d29221c6","original_commit_id":"7ed29a323a729d91cadb8ad942cf78b8d29221c6","user":{"login":"fsherratt","id":13890746,"node_id":"MDQ6VXNlcjEzODkwNzQ2","avatar_url":"https://avatars1.githubusercontent.com/u/13890746?v=4","gravatar_id":"","url":"https://api.github.com/users/fsherratt","html_url":"https://github.com/fsherratt","followers_url":"https://api.github.com/users/fsherratt/followers","following_url":"https://api.github.com/users/fsherratt/following{/other_user}","gists_url":"https://api.github.com/users/fsherratt/gists{/gist_id}","starred_url":"https://api.github.com/users/fsherratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsherratt/subscriptions","organizations_url":"https://api.github.com/users/fsherratt/orgs","repos_url":"https://api.github.com/users/fsherratt/repos","events_url":"https://api.github.com/users/fsherratt/events{/privacy}","received_events_url":"https://api.github.com/users/fsherratt/received_events","type":"User","site_admin":false},"body":"Make Distance Threshold class variable","created_at":"2019-09-16T12:38:28Z","updated_at":"2019-09-16T12:38:29Z","html_url":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55#discussion_r324649172","pull_request_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/comments/324649172"},"html":{"href":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55#discussion_r324649172"},"pull_request":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55","id":317837426,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE3ODM3NDI2","html_url":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55","diff_url":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55.diff","patch_url":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55.patch","issue_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/55","number":55,"state":"open","locked":false,"title":"Feature/navigation","user":{"login":"M-Morris-95","id":49106997,"node_id":"MDQ6VXNlcjQ5MTA2OTk3","avatar_url":"https://avatars0.githubusercontent.com/u/49106997?v=4","gravatar_id":"","url":"https://api.github.com/users/M-Morris-95","html_url":"https://github.com/M-Morris-95","followers_url":"https://api.github.com/users/M-Morris-95/followers","following_url":"https://api.github.com/users/M-Morris-95/following{/other_user}","gists_url":"https://api.github.com/users/M-Morris-95/gists{/gist_id}","starred_url":"https://api.github.com/users/M-Morris-95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/M-Morris-95/subscriptions","organizations_url":"https://api.github.com/users/M-Morris-95/orgs","repos_url":"https://api.github.com/users/M-Morris-95/repos","events_url":"https://api.github.com/users/M-Morris-95/events{/privacy}","received_events_url":"https://api.github.com/users/M-Morris-95/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-09-16T11:40:06Z","updated_at":"2019-09-16T12:38:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82ada97af8e21d64402a99dd8d87977d9a96bf91","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55/commits","review_comments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55/comments","review_comment_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/55/comments","statuses_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/statuses/7ed29a323a729d91cadb8ad942cf78b8d29221c6","head":{"label":"fsherratt:feature/navigation","ref":"feature/navigation","sha":"7ed29a323a729d91cadb8ad942cf78b8d29221c6","user":{"login":"fsherratt","id":13890746,"node_id":"MDQ6VXNlcjEzODkwNzQ2","avatar_url":"https://avatars1.githubusercontent.com/u/13890746?v=4","gravatar_id":"","url":"https://api.github.com/users/fsherratt","html_url":"https://github.com/fsherratt","followers_url":"https://api.github.com/users/fsherratt/followers","following_url":"https://api.github.com/users/fsherratt/following{/other_user}","gists_url":"https://api.github.com/users/fsherratt/gists{/gist_id}","starred_url":"https://api.github.com/users/fsherratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsherratt/subscriptions","organizations_url":"https://api.github.com/users/fsherratt/orgs","repos_url":"https://api.github.com/users/fsherratt/repos","events_url":"https://api.github.com/users/fsherratt/events{/privacy}","received_events_url":"https://api.github.com/users/fsherratt/received_events","type":"User","site_admin":false},"repo":{"id":199701601,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk3MDE2MDE=","name":"ERL_SmartCities_2019","full_name":"fsherratt/ERL_SmartCities_2019","private":false,"owner":{"login":"fsherratt","id":13890746,"node_id":"MDQ6VXNlcjEzODkwNzQ2","avatar_url":"https://avatars1.githubusercontent.com/u/13890746?v=4","gravatar_id":"","url":"https://api.github.com/users/fsherratt","html_url":"https://github.com/fsherratt","followers_url":"https://api.github.com/users/fsherratt/followers","following_url":"https://api.github.com/users/fsherratt/following{/other_user}","gists_url":"https://api.github.com/users/fsherratt/gists{/gist_id}","starred_url":"https://api.github.com/users/fsherratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsherratt/subscriptions","organizations_url":"https://api.github.com/users/fsherratt/orgs","repos_url":"https://api.github.com/users/fsherratt/repos","events_url":"https://api.github.com/users/fsherratt/events{/privacy}","received_events_url":"https://api.github.com/users/fsherratt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fsherratt/ERL_SmartCities_2019","description":"TeamBathDrones research entry into ERL Smart Cities 2019","fork":false,"url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019","forks_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/forks","keys_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/teams","hooks_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/hooks","issue_events_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/events{/number}","events_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/events","assignees_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/assignees{/user}","branches_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/branches{/branch}","tags_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/tags","blobs_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/statuses/{sha}","languages_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/languages","stargazers_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/stargazers","contributors_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/contributors","subscribers_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/subscribers","subscription_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/subscription","commits_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/contents/{+path}","compare_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/merges","archive_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/downloads","issues_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues{/number}","pulls_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls{/number}","milestones_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/milestones{/number}","notifications_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/labels{/name}","releases_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/releases{/id}","deployments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/deployments","created_at":"2019-07-30T17:54:57Z","updated_at":"2019-09-15T20:18:51Z","pushed_at":"2019-09-16T11:40:07Z","git_url":"git://github.com/fsherratt/ERL_SmartCities_2019.git","ssh_url":"git@github.com:fsherratt/ERL_SmartCities_2019.git","clone_url":"https://github.com/fsherratt/ERL_SmartCities_2019.git","svn_url":"https://github.com/fsherratt/ERL_SmartCities_2019","homepage":null,"size":1230,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":13,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"base":{"label":"fsherratt:master","ref":"master","sha":"a696221cc9381b504740e5478714d29d9696047c","user":{"login":"fsherratt","id":13890746,"node_id":"MDQ6VXNlcjEzODkwNzQ2","avatar_url":"https://avatars1.githubusercontent.com/u/13890746?v=4","gravatar_id":"","url":"https://api.github.com/users/fsherratt","html_url":"https://github.com/fsherratt","followers_url":"https://api.github.com/users/fsherratt/followers","following_url":"https://api.github.com/users/fsherratt/following{/other_user}","gists_url":"https://api.github.com/users/fsherratt/gists{/gist_id}","starred_url":"https://api.github.com/users/fsherratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsherratt/subscriptions","organizations_url":"https://api.github.com/users/fsherratt/orgs","repos_url":"https://api.github.com/users/fsherratt/repos","events_url":"https://api.github.com/users/fsherratt/events{/privacy}","received_events_url":"https://api.github.com/users/fsherratt/received_events","type":"User","site_admin":false},"repo":{"id":199701601,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk3MDE2MDE=","name":"ERL_SmartCities_2019","full_name":"fsherratt/ERL_SmartCities_2019","private":false,"owner":{"login":"fsherratt","id":13890746,"node_id":"MDQ6VXNlcjEzODkwNzQ2","avatar_url":"https://avatars1.githubusercontent.com/u/13890746?v=4","gravatar_id":"","url":"https://api.github.com/users/fsherratt","html_url":"https://github.com/fsherratt","followers_url":"https://api.github.com/users/fsherratt/followers","following_url":"https://api.github.com/users/fsherratt/following{/other_user}","gists_url":"https://api.github.com/users/fsherratt/gists{/gist_id}","starred_url":"https://api.github.com/users/fsherratt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsherratt/subscriptions","organizations_url":"https://api.github.com/users/fsherratt/orgs","repos_url":"https://api.github.com/users/fsherratt/repos","events_url":"https://api.github.com/users/fsherratt/events{/privacy}","received_events_url":"https://api.github.com/users/fsherratt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fsherratt/ERL_SmartCities_2019","description":"TeamBathDrones research entry into ERL Smart Cities 2019","fork":false,"url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019","forks_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/forks","keys_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/teams","hooks_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/hooks","issue_events_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/events{/number}","events_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/events","assignees_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/assignees{/user}","branches_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/branches{/branch}","tags_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/tags","blobs_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/statuses/{sha}","languages_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/languages","stargazers_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/stargazers","contributors_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/contributors","subscribers_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/subscribers","subscription_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/subscription","commits_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/contents/{+path}","compare_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/merges","archive_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/downloads","issues_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues{/number}","pulls_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls{/number}","milestones_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/milestones{/number}","notifications_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/labels{/name}","releases_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/releases{/id}","deployments_url":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/deployments","created_at":"2019-07-30T17:54:57Z","updated_at":"2019-09-15T20:18:51Z","pushed_at":"2019-09-16T11:40:07Z","git_url":"git://github.com/fsherratt/ERL_SmartCities_2019.git","ssh_url":"git@github.com:fsherratt/ERL_SmartCities_2019.git","clone_url":"https://github.com/fsherratt/ERL_SmartCities_2019.git","svn_url":"https://github.com/fsherratt/ERL_SmartCities_2019","homepage":null,"size":1230,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":13,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55"},"html":{"href":"https://github.com/fsherratt/ERL_SmartCities_2019/pull/55"},"issue":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/55"},"comments":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/fsherratt/ERL_SmartCities_2019/statuses/7ed29a323a729d91cadb8ad942cf78b8d29221c6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"fsherratt"}}