{"action":"created","comment":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/91117129","pull_request_review_id":11626176,"id":91117129,"diff_hunk":"@@ -925,9 +925,10 @@ MulticopterPositionControl::control_manual(float dt)\n \t\t/* check for pos. hold */\n \t\tif (fabsf(req_vel_sp(0)) < _params.hold_xy_dz && fabsf(req_vel_sp(1)) < _params.hold_xy_dz) {\n \t\t\tif (!_pos_hold_engaged) {\n-\t\t\t\tif (_params.hold_max_xy < FLT_EPSILON || (fabsf(_vel(0)) < _params.hold_max_xy\n-\t\t\t\t\t\t&& fabsf(_vel(1)) < _params.hold_max_xy)) {\n+\t\t\t\tif (_params.hold_max_xy < FLT_EPSILON || (sqrtf(_vel(0)*_vel(0) + _vel(1)*_vel(1)) < _params.hold_max_xy)) {\n \t\t\t\t\t_pos_hold_engaged = true;\n+\t\t\t\t\t_pos_sp(0) = _pos(0);\n+\t\t\t\t\t_pos_sp(1) = _pos(1);","path":"src/modules/mc_pos_control/mc_pos_control_main.cpp","position":9,"original_position":9,"commit_id":"9195f42f371e4a2cc4e6c2207970c673902541a8","original_commit_id":"9195f42f371e4a2cc4e6c2207970c673902541a8","user":{"login":"julianoes","id":1419688,"avatar_url":"https://avatars.githubusercontent.com/u/1419688?v=3","gravatar_id":"","url":"https://api.github.com/users/julianoes","html_url":"https://github.com/julianoes","followers_url":"https://api.github.com/users/julianoes/followers","following_url":"https://api.github.com/users/julianoes/following{/other_user}","gists_url":"https://api.github.com/users/julianoes/gists{/gist_id}","starred_url":"https://api.github.com/users/julianoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianoes/subscriptions","organizations_url":"https://api.github.com/users/julianoes/orgs","repos_url":"https://api.github.com/users/julianoes/repos","events_url":"https://api.github.com/users/julianoes/events{/privacy}","received_events_url":"https://api.github.com/users/julianoes/received_events","type":"User","site_admin":false},"body":"Please add a comment about what this does and why.","created_at":"2016-12-06T16:37:28Z","updated_at":"2016-12-06T16:39:01Z","html_url":"https://github.com/PX4/Firmware/pull/5980#discussion_r91117129","pull_request_url":"https://api.github.com/repos/PX4/Firmware/pulls/5980","_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/91117129"},"html":{"href":"https://github.com/PX4/Firmware/pull/5980#discussion_r91117129"},"pull_request":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/5980"}}},"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/5980","id":96581045,"html_url":"https://github.com/PX4/Firmware/pull/5980","diff_url":"https://github.com/PX4/Firmware/pull/5980.diff","patch_url":"https://github.com/PX4/Firmware/pull/5980.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/5980","number":5980,"state":"open","locked":false,"title":"reset position setpoints once altitude/position condition is reached","user":{"login":"Stifael","id":13449161,"avatar_url":"https://avatars.githubusercontent.com/u/13449161?v=3","gravatar_id":"","url":"https://api.github.com/users/Stifael","html_url":"https://github.com/Stifael","followers_url":"https://api.github.com/users/Stifael/followers","following_url":"https://api.github.com/users/Stifael/following{/other_user}","gists_url":"https://api.github.com/users/Stifael/gists{/gist_id}","starred_url":"https://api.github.com/users/Stifael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stifael/subscriptions","organizations_url":"https://api.github.com/users/Stifael/orgs","repos_url":"https://api.github.com/users/Stifael/repos","events_url":"https://api.github.com/users/Stifael/events{/privacy}","received_events_url":"https://api.github.com/users/Stifael/received_events","type":"User","site_admin":false},"body":"Currently if one is in the manual position control mode and accelerates upwards (or horizontally), the vehicle skips the altitude controller until the velocity is below some threshold. The position set-point reset occurs before the vehicle's velocity is below the threshold, which leads to an overshoot.\r\nResetting the position set-point once the vehicle is below that threshold leads to a smoother transition to position control without overshoot, but undergoes a breaking distance.","created_at":"2016-12-05T18:15:17Z","updated_at":"2016-12-06T16:39:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88aa4206ea0d206c5073c6cb9fdc1bfe08adb9ee","assignee":{"login":"MaEtUgR","id":4668506,"avatar_url":"https://avatars.githubusercontent.com/u/4668506?v=3","gravatar_id":"","url":"https://api.github.com/users/MaEtUgR","html_url":"https://github.com/MaEtUgR","followers_url":"https://api.github.com/users/MaEtUgR/followers","following_url":"https://api.github.com/users/MaEtUgR/following{/other_user}","gists_url":"https://api.github.com/users/MaEtUgR/gists{/gist_id}","starred_url":"https://api.github.com/users/MaEtUgR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaEtUgR/subscriptions","organizations_url":"https://api.github.com/users/MaEtUgR/orgs","repos_url":"https://api.github.com/users/MaEtUgR/repos","events_url":"https://api.github.com/users/MaEtUgR/events{/privacy}","received_events_url":"https://api.github.com/users/MaEtUgR/received_events","type":"User","site_admin":false},"assignees":[{"login":"MaEtUgR","id":4668506,"avatar_url":"https://avatars.githubusercontent.com/u/4668506?v=3","gravatar_id":"","url":"https://api.github.com/users/MaEtUgR","html_url":"https://github.com/MaEtUgR","followers_url":"https://api.github.com/users/MaEtUgR/followers","following_url":"https://api.github.com/users/MaEtUgR/following{/other_user}","gists_url":"https://api.github.com/users/MaEtUgR/gists{/gist_id}","starred_url":"https://api.github.com/users/MaEtUgR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaEtUgR/subscriptions","organizations_url":"https://api.github.com/users/MaEtUgR/orgs","repos_url":"https://api.github.com/users/MaEtUgR/repos","events_url":"https://api.github.com/users/MaEtUgR/events{/privacy}","received_events_url":"https://api.github.com/users/MaEtUgR/received_events","type":"User","site_admin":false},{"login":"tumbili","id":7610489,"avatar_url":"https://avatars.githubusercontent.com/u/7610489?v=3","gravatar_id":"","url":"https://api.github.com/users/tumbili","html_url":"https://github.com/tumbili","followers_url":"https://api.github.com/users/tumbili/followers","following_url":"https://api.github.com/users/tumbili/following{/other_user}","gists_url":"https://api.github.com/users/tumbili/gists{/gist_id}","starred_url":"https://api.github.com/users/tumbili/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumbili/subscriptions","organizations_url":"https://api.github.com/users/tumbili/orgs","repos_url":"https://api.github.com/users/tumbili/repos","events_url":"https://api.github.com/users/tumbili/events{/privacy}","received_events_url":"https://api.github.com/users/tumbili/received_events","type":"User","site_admin":false},{"login":"PX4TestFlights","id":24407792,"avatar_url":"https://avatars.githubusercontent.com/u/24407792?v=3","gravatar_id":"","url":"https://api.github.com/users/PX4TestFlights","html_url":"https://github.com/PX4TestFlights","followers_url":"https://api.github.com/users/PX4TestFlights/followers","following_url":"https://api.github.com/users/PX4TestFlights/following{/other_user}","gists_url":"https://api.github.com/users/PX4TestFlights/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4TestFlights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4TestFlights/subscriptions","organizations_url":"https://api.github.com/users/PX4TestFlights/orgs","repos_url":"https://api.github.com/users/PX4TestFlights/repos","events_url":"https://api.github.com/users/PX4TestFlights/events{/privacy}","received_events_url":"https://api.github.com/users/PX4TestFlights/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/5980/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/5980/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/5980/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/9195f42f371e4a2cc4e6c2207970c673902541a8","head":{"label":"Stifael:brake_path","ref":"brake_path","sha":"9195f42f371e4a2cc4e6c2207970c673902541a8","user":{"login":"Stifael","id":13449161,"avatar_url":"https://avatars.githubusercontent.com/u/13449161?v=3","gravatar_id":"","url":"https://api.github.com/users/Stifael","html_url":"https://github.com/Stifael","followers_url":"https://api.github.com/users/Stifael/followers","following_url":"https://api.github.com/users/Stifael/following{/other_user}","gists_url":"https://api.github.com/users/Stifael/gists{/gist_id}","starred_url":"https://api.github.com/users/Stifael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stifael/subscriptions","organizations_url":"https://api.github.com/users/Stifael/orgs","repos_url":"https://api.github.com/users/Stifael/repos","events_url":"https://api.github.com/users/Stifael/events{/privacy}","received_events_url":"https://api.github.com/users/Stifael/received_events","type":"User","site_admin":false},"repo":{"id":67107185,"name":"Firmware","full_name":"Stifael/Firmware","owner":{"login":"Stifael","id":13449161,"avatar_url":"https://avatars.githubusercontent.com/u/13449161?v=3","gravatar_id":"","url":"https://api.github.com/users/Stifael","html_url":"https://github.com/Stifael","followers_url":"https://api.github.com/users/Stifael/followers","following_url":"https://api.github.com/users/Stifael/following{/other_user}","gists_url":"https://api.github.com/users/Stifael/gists{/gist_id}","starred_url":"https://api.github.com/users/Stifael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stifael/subscriptions","organizations_url":"https://api.github.com/users/Stifael/orgs","repos_url":"https://api.github.com/users/Stifael/repos","events_url":"https://api.github.com/users/Stifael/events{/privacy}","received_events_url":"https://api.github.com/users/Stifael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stifael/Firmware","description":"PX4 Pro Autopilot Software","fork":true,"url":"https://api.github.com/repos/Stifael/Firmware","forks_url":"https://api.github.com/repos/Stifael/Firmware/forks","keys_url":"https://api.github.com/repos/Stifael/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stifael/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stifael/Firmware/teams","hooks_url":"https://api.github.com/repos/Stifael/Firmware/hooks","issue_events_url":"https://api.github.com/repos/Stifael/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/Stifael/Firmware/events","assignees_url":"https://api.github.com/repos/Stifael/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/Stifael/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/Stifael/Firmware/tags","blobs_url":"https://api.github.com/repos/Stifael/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stifael/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stifael/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stifael/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stifael/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/Stifael/Firmware/languages","stargazers_url":"https://api.github.com/repos/Stifael/Firmware/stargazers","contributors_url":"https://api.github.com/repos/Stifael/Firmware/contributors","subscribers_url":"https://api.github.com/repos/Stifael/Firmware/subscribers","subscription_url":"https://api.github.com/repos/Stifael/Firmware/subscription","commits_url":"https://api.github.com/repos/Stifael/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stifael/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stifael/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stifael/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stifael/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/Stifael/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stifael/Firmware/merges","archive_url":"https://api.github.com/repos/Stifael/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stifael/Firmware/downloads","issues_url":"https://api.github.com/repos/Stifael/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/Stifael/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/Stifael/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/Stifael/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stifael/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/Stifael/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/Stifael/Firmware/deployments","created_at":"2016-09-01T07:08:40Z","updated_at":"2016-09-01T07:08:49Z","pushed_at":"2016-12-06T15:33:14Z","git_url":"git://github.com/Stifael/Firmware.git","ssh_url":"git@github.com:Stifael/Firmware.git","clone_url":"https://github.com/Stifael/Firmware.git","svn_url":"https://github.com/Stifael/Firmware","homepage":"http://px4.io","size":86407,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"PX4:master","ref":"master","sha":"7b81374fda700ba6b1dad3b1a55c4f07da2f62d7","user":{"login":"PX4","id":2096014,"avatar_url":"https://avatars.githubusercontent.com/u/2096014?v=3","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"avatar_url":"https://avatars.githubusercontent.com/u/2096014?v=3","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Pro Autopilot Software","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/Firmware/deployments","created_at":"2012-08-04T21:19:36Z","updated_at":"2016-12-06T07:14:27Z","pushed_at":"2016-12-06T16:32:32Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"http://px4.io","size":219783,"stargazers_count":839,"watchers_count":839,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2849,"mirror_url":null,"open_issues_count":450,"forks":2849,"open_issues":450,"watchers":839,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/5980"},"html":{"href":"https://github.com/PX4/Firmware/pull/5980"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/5980"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/5980/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/5980/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/5980/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/9195f42f371e4a2cc4e6c2207970c673902541a8"}}}}
{"actor":{"display_login":"julianoes"}}