{"action":"created","comment":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/31202233","id":31202233,"diff_hunk":"@@ -330,8 +325,10 @@ static int32_t vtol_follower_control_simple(const float dT,\n \n \t/* Calculate the difference between where we want to be and the\n \t * above position */\n-\tfloat horiz_error_norm = vtol_calculate_distances(cur_pos_ned,\n-\t\thold_pos_ned, errors_ned, true);\n+\tvtol_calculate_distances(cur_pos_ned, hold_pos_ned, errors_ned, 0);\n+\n+\tfloat horiz_error_mag = vtol_magnitude(errors_ned, 2);","path":"flight/Modules/VtolPathFollower/vtol_follower_control.c","position":38,"original_position":47,"commit_id":"b7d70dba3c7fe0124161fd755b9da306e32ec948","original_commit_id":"7b15fdfa72c40a883c27b715c3219e6e18cff4c4","user":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"body":"Basically, the change you had me make was to take the difference, calculate the norm and normalize, before scaling back up with a deadband on the norm.\r\n\r\nMy code instead takes the difference, calculates the magnitude of the first 2 elements, and adjusts the deadband.  The Z component should not be involved in normalization of the vector or the deadband.","created_at":"2015-05-28T04:19:52Z","updated_at":"2015-05-28T04:19:52Z","html_url":"https://github.com/TauLabs/TauLabs/pull/1646#discussion_r31202233","pull_request_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646","_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments/31202233"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/1646#discussion_r31202233"},"pull_request":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646"}}},"pull_request":{"url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646","id":36361070,"html_url":"https://github.com/TauLabs/TauLabs/pull/1646","diff_url":"https://github.com/TauLabs/TauLabs/pull/1646.diff","patch_url":"https://github.com/TauLabs/TauLabs/pull/1646.patch","issue_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/1646","number":1646,"state":"open","locked":false,"title":"Urgent: Revert \"vtolpathfollower: use peabody's suggestion for norm\"","user":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"body":"This reverts commit 89ca09988e1df3e7d1ac6ed7b4e2bd4367135740.\r\n\r\nWe can't do it this way because it ends up normalizing the vertical component of the vector-- e.g. breaking altitude hold.","created_at":"2015-05-28T00:03:36Z","updated_at":"2015-05-28T04:19:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46fa4ec63210e1ef115e35a988f259106e279328","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646/commits","review_comments_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646/comments","review_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/1646/comments","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/b7d70dba3c7fe0124161fd755b9da306e32ec948","head":{"label":"mlyle:mpl-fixalthold","ref":"mpl-fixalthold","sha":"b7d70dba3c7fe0124161fd755b9da306e32ec948","user":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"repo":{"id":33151589,"name":"TauLabs","full_name":"mlyle/TauLabs","owner":{"login":"mlyle","id":90903,"avatar_url":"https://avatars.githubusercontent.com/u/90903?v=3","gravatar_id":"","url":"https://api.github.com/users/mlyle","html_url":"https://github.com/mlyle","followers_url":"https://api.github.com/users/mlyle/followers","following_url":"https://api.github.com/users/mlyle/following{/other_user}","gists_url":"https://api.github.com/users/mlyle/gists{/gist_id}","starred_url":"https://api.github.com/users/mlyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlyle/subscriptions","organizations_url":"https://api.github.com/users/mlyle/orgs","repos_url":"https://api.github.com/users/mlyle/repos","events_url":"https://api.github.com/users/mlyle/events{/privacy}","received_events_url":"https://api.github.com/users/mlyle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlyle/TauLabs","description":"","fork":true,"url":"https://api.github.com/repos/mlyle/TauLabs","forks_url":"https://api.github.com/repos/mlyle/TauLabs/forks","keys_url":"https://api.github.com/repos/mlyle/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlyle/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlyle/TauLabs/teams","hooks_url":"https://api.github.com/repos/mlyle/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/mlyle/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/mlyle/TauLabs/events","assignees_url":"https://api.github.com/repos/mlyle/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/mlyle/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/mlyle/TauLabs/tags","blobs_url":"https://api.github.com/repos/mlyle/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlyle/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlyle/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlyle/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlyle/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/mlyle/TauLabs/languages","stargazers_url":"https://api.github.com/repos/mlyle/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/mlyle/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/mlyle/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/mlyle/TauLabs/subscription","commits_url":"https://api.github.com/repos/mlyle/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlyle/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlyle/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlyle/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlyle/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/mlyle/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlyle/TauLabs/merges","archive_url":"https://api.github.com/repos/mlyle/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlyle/TauLabs/downloads","issues_url":"https://api.github.com/repos/mlyle/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/mlyle/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/mlyle/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/mlyle/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlyle/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/mlyle/TauLabs/releases{/id}","created_at":"2015-03-30T22:24:21Z","updated_at":"2015-04-30T22:56:02Z","pushed_at":"2015-05-28T04:02:42Z","git_url":"git://github.com/mlyle/TauLabs.git","ssh_url":"git@github.com:mlyle/TauLabs.git","clone_url":"https://github.com/mlyle/TauLabs.git","svn_url":"https://github.com/mlyle/TauLabs","homepage":"taulabs.org","size":198100,"stargazers_count":1,"watchers_count":1,"language":"C","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":1,"default_branch":"next"}},"base":{"label":"TauLabs:next","ref":"next","sha":"1c2097d3f66df764efae9445d1e817d5e78d6f3b","user":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":6589168,"name":"TauLabs","full_name":"TauLabs/TauLabs","owner":{"login":"TauLabs","id":3201381,"avatar_url":"https://avatars.githubusercontent.com/u/3201381?v=3","gravatar_id":"","url":"https://api.github.com/users/TauLabs","html_url":"https://github.com/TauLabs","followers_url":"https://api.github.com/users/TauLabs/followers","following_url":"https://api.github.com/users/TauLabs/following{/other_user}","gists_url":"https://api.github.com/users/TauLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/TauLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TauLabs/subscriptions","organizations_url":"https://api.github.com/users/TauLabs/orgs","repos_url":"https://api.github.com/users/TauLabs/repos","events_url":"https://api.github.com/users/TauLabs/events{/privacy}","received_events_url":"https://api.github.com/users/TauLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TauLabs/TauLabs","description":"","fork":false,"url":"https://api.github.com/repos/TauLabs/TauLabs","forks_url":"https://api.github.com/repos/TauLabs/TauLabs/forks","keys_url":"https://api.github.com/repos/TauLabs/TauLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TauLabs/TauLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TauLabs/TauLabs/teams","hooks_url":"https://api.github.com/repos/TauLabs/TauLabs/hooks","issue_events_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/events{/number}","events_url":"https://api.github.com/repos/TauLabs/TauLabs/events","assignees_url":"https://api.github.com/repos/TauLabs/TauLabs/assignees{/user}","branches_url":"https://api.github.com/repos/TauLabs/TauLabs/branches{/branch}","tags_url":"https://api.github.com/repos/TauLabs/TauLabs/tags","blobs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TauLabs/TauLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TauLabs/TauLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/TauLabs/TauLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TauLabs/TauLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/TauLabs/TauLabs/languages","stargazers_url":"https://api.github.com/repos/TauLabs/TauLabs/stargazers","contributors_url":"https://api.github.com/repos/TauLabs/TauLabs/contributors","subscribers_url":"https://api.github.com/repos/TauLabs/TauLabs/subscribers","subscription_url":"https://api.github.com/repos/TauLabs/TauLabs/subscription","commits_url":"https://api.github.com/repos/TauLabs/TauLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/TauLabs/TauLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/TauLabs/TauLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/TauLabs/TauLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/TauLabs/TauLabs/contents/{+path}","compare_url":"https://api.github.com/repos/TauLabs/TauLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TauLabs/TauLabs/merges","archive_url":"https://api.github.com/repos/TauLabs/TauLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TauLabs/TauLabs/downloads","issues_url":"https://api.github.com/repos/TauLabs/TauLabs/issues{/number}","pulls_url":"https://api.github.com/repos/TauLabs/TauLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/TauLabs/TauLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/TauLabs/TauLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TauLabs/TauLabs/labels{/name}","releases_url":"https://api.github.com/repos/TauLabs/TauLabs/releases{/id}","created_at":"2012-11-08T01:01:18Z","updated_at":"2015-05-26T06:16:29Z","pushed_at":"2015-05-28T04:02:42Z","git_url":"git://github.com/TauLabs/TauLabs.git","ssh_url":"git@github.com:TauLabs/TauLabs.git","clone_url":"https://github.com/TauLabs/TauLabs.git","svn_url":"https://github.com/TauLabs/TauLabs","homepage":"taulabs.org","size":323763,"stargazers_count":220,"watchers_count":220,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":260,"mirror_url":null,"open_issues_count":282,"forks":260,"open_issues":282,"watchers":220,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646"},"html":{"href":"https://github.com/TauLabs/TauLabs/pull/1646"},"issue":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/1646"},"comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/issues/1646/comments"},"review_comments":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646/comments"},"review_comment":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TauLabs/TauLabs/pulls/1646/commits"},"statuses":{"href":"https://api.github.com/repos/TauLabs/TauLabs/statuses/b7d70dba3c7fe0124161fd755b9da306e32ec948"}}}}