{"action":"created","comment":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/198527387","pull_request_review_id":132472012,"id":198527387,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODUyNzM4Nw==","diff_hunk":"@@ -1450,8 +1450,20 @@ MulticopterPositionControl::control_non_manual()\n \t/* use constant descend rate when landing, ignore altitude setpoint */\n \tif (_pos_sp_triplet.current.valid\n \t    && _pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_LAND) {\n-\t\t_vel_sp(2) = _land_speed.get();\n \t\t_run_alt_control = false;\n+","path":"src/modules/mc_pos_control/mc_pos_control_main.cpp","position":6,"original_position":6,"commit_id":"5e258bc86bb236611b5e39c9326d9fa72177e646","original_commit_id":"5e258bc86bb236611b5e39c9326d9fa72177e646","user":{"login":"dakejahl","id":37091262,"node_id":"MDQ6VXNlcjM3MDkxMjYy","avatar_url":"https://avatars2.githubusercontent.com/u/37091262?v=4","gravatar_id":"","url":"https://api.github.com/users/dakejahl","html_url":"https://github.com/dakejahl","followers_url":"https://api.github.com/users/dakejahl/followers","following_url":"https://api.github.com/users/dakejahl/following{/other_user}","gists_url":"https://api.github.com/users/dakejahl/gists{/gist_id}","starred_url":"https://api.github.com/users/dakejahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakejahl/subscriptions","organizations_url":"https://api.github.com/users/dakejahl/orgs","repos_url":"https://api.github.com/users/dakejahl/repos","events_url":"https://api.github.com/users/dakejahl/events{/privacy}","received_events_url":"https://api.github.com/users/dakejahl/received_events","type":"User","site_admin":false},"body":"Look at the one liner that I removed.\r\n\r\n _vel_sp(2) = _land_speed.get();\r\n\r\nClearly this is overriding the current Z vel setpoint when the setpoint type is LAND.\r\n\r\nAlso, always limiting veritial velocity based upon height does not seem right. Those parameters are specified with the word 'LAND' and thus should only affect flight characteristics while in the LAND mode (this is my opinion).","created_at":"2018-06-27T14:57:02Z","updated_at":"2018-06-27T14:57:02Z","html_url":"https://github.com/PX4/Firmware/pull/9772#discussion_r198527387","pull_request_url":"https://api.github.com/repos/PX4/Firmware/pulls/9772","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/198527387"},"html":{"href":"https://github.com/PX4/Firmware/pull/9772#discussion_r198527387"},"pull_request":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9772"}},"in_reply_to_id":198464730},"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/9772","id":197522219,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTIyMjE5","html_url":"https://github.com/PX4/Firmware/pull/9772","diff_url":"https://github.com/PX4/Firmware/pull/9772.diff","patch_url":"https://github.com/PX4/Firmware/pull/9772.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/9772","number":9772,"state":"open","locked":false,"title":"Land enhancement","user":{"login":"dakejahl","id":37091262,"node_id":"MDQ6VXNlcjM3MDkxMjYy","avatar_url":"https://avatars2.githubusercontent.com/u/37091262?v=4","gravatar_id":"","url":"https://api.github.com/users/dakejahl","html_url":"https://github.com/dakejahl","followers_url":"https://api.github.com/users/dakejahl/followers","following_url":"https://api.github.com/users/dakejahl/following{/other_user}","gists_url":"https://api.github.com/users/dakejahl/gists{/gist_id}","starred_url":"https://api.github.com/users/dakejahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakejahl/subscriptions","organizations_url":"https://api.github.com/users/dakejahl/orgs","repos_url":"https://api.github.com/users/dakejahl/repos","events_url":"https://api.github.com/users/dakejahl/events{/privacy}","received_events_url":"https://api.github.com/users/dakejahl/received_events","type":"User","site_admin":false},"body":"This PR fixes two problems with _Land_. See #9691 & #9768\r\n\r\n**Problems**\r\n1. _Land_ can cause vehicle to flip upon land if the command was issued while the vehicle was moving quickly. \r\n\r\n2. _Land_ descent velocity was only **MPC_LAND_SPEED**. \r\n\r\n\r\n**Solutions**\r\n1. Vehicle will return to LAT/LON location where the _Land_ command was issued and begin descending from there. In the future, I want to implement a **_BRAKE_** setpoint type, but this is a good fix until that work is done.\r\n\r\n2. The vehicle now respects MPC_LAND_ALT1 and MPC_LAND_ALT2 to control descent velocities.\r\n\r\nI have simulation tested and physically flight tested this on our quadcopter and have seen no problems. I would love if someone could please test this with a fixed wing aircraft to verify. \r\n\r\nPlease let me know if you have any questions, thanks!\r\nJake","created_at":"2018-06-26T19:07:03Z","updated_at":"2018-06-27T14:57:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"621cf5e7751497a86b7ce3584822982972a91d06","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/9772/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/9772/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/9772/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/5e258bc86bb236611b5e39c9326d9fa72177e646","head":{"label":"dakejahl:land_enhancement","ref":"land_enhancement","sha":"5e258bc86bb236611b5e39c9326d9fa72177e646","user":{"login":"dakejahl","id":37091262,"node_id":"MDQ6VXNlcjM3MDkxMjYy","avatar_url":"https://avatars2.githubusercontent.com/u/37091262?v=4","gravatar_id":"","url":"https://api.github.com/users/dakejahl","html_url":"https://github.com/dakejahl","followers_url":"https://api.github.com/users/dakejahl/followers","following_url":"https://api.github.com/users/dakejahl/following{/other_user}","gists_url":"https://api.github.com/users/dakejahl/gists{/gist_id}","starred_url":"https://api.github.com/users/dakejahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakejahl/subscriptions","organizations_url":"https://api.github.com/users/dakejahl/orgs","repos_url":"https://api.github.com/users/dakejahl/repos","events_url":"https://api.github.com/users/dakejahl/events{/privacy}","received_events_url":"https://api.github.com/users/dakejahl/received_events","type":"User","site_admin":false},"repo":{"id":132155428,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIxNTU0Mjg=","name":"Firmware","full_name":"dakejahl/Firmware","owner":{"login":"dakejahl","id":37091262,"node_id":"MDQ6VXNlcjM3MDkxMjYy","avatar_url":"https://avatars2.githubusercontent.com/u/37091262?v=4","gravatar_id":"","url":"https://api.github.com/users/dakejahl","html_url":"https://github.com/dakejahl","followers_url":"https://api.github.com/users/dakejahl/followers","following_url":"https://api.github.com/users/dakejahl/following{/other_user}","gists_url":"https://api.github.com/users/dakejahl/gists{/gist_id}","starred_url":"https://api.github.com/users/dakejahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakejahl/subscriptions","organizations_url":"https://api.github.com/users/dakejahl/orgs","repos_url":"https://api.github.com/users/dakejahl/repos","events_url":"https://api.github.com/users/dakejahl/events{/privacy}","received_events_url":"https://api.github.com/users/dakejahl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dakejahl/Firmware","description":"PX4 Pro Autopilot Software","fork":true,"url":"https://api.github.com/repos/dakejahl/Firmware","forks_url":"https://api.github.com/repos/dakejahl/Firmware/forks","keys_url":"https://api.github.com/repos/dakejahl/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dakejahl/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dakejahl/Firmware/teams","hooks_url":"https://api.github.com/repos/dakejahl/Firmware/hooks","issue_events_url":"https://api.github.com/repos/dakejahl/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/dakejahl/Firmware/events","assignees_url":"https://api.github.com/repos/dakejahl/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/dakejahl/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/dakejahl/Firmware/tags","blobs_url":"https://api.github.com/repos/dakejahl/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dakejahl/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dakejahl/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/dakejahl/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dakejahl/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/dakejahl/Firmware/languages","stargazers_url":"https://api.github.com/repos/dakejahl/Firmware/stargazers","contributors_url":"https://api.github.com/repos/dakejahl/Firmware/contributors","subscribers_url":"https://api.github.com/repos/dakejahl/Firmware/subscribers","subscription_url":"https://api.github.com/repos/dakejahl/Firmware/subscription","commits_url":"https://api.github.com/repos/dakejahl/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/dakejahl/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/dakejahl/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/dakejahl/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/dakejahl/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/dakejahl/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dakejahl/Firmware/merges","archive_url":"https://api.github.com/repos/dakejahl/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dakejahl/Firmware/downloads","issues_url":"https://api.github.com/repos/dakejahl/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/dakejahl/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/dakejahl/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/dakejahl/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dakejahl/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/dakejahl/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/dakejahl/Firmware/deployments","created_at":"2018-05-04T15:08:41Z","updated_at":"2018-06-26T18:49:26Z","pushed_at":"2018-06-26T22:11:19Z","git_url":"git://github.com/dakejahl/Firmware.git","ssh_url":"git@github.com:dakejahl/Firmware.git","clone_url":"https://github.com/dakejahl/Firmware.git","svn_url":"https://github.com/dakejahl/Firmware","homepage":"http://px4.io","size":99353,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"0ac1ef12c77ef5a0db05d22bab4cfbd61b0c24a6","user":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1Mjk4Nzkw","name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","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":"2018-06-27T11:06:58Z","pushed_at":"2018-06-27T14:47:09Z","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":100394,"stargazers_count":1791,"watchers_count":1791,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5274,"mirror_url":null,"archived":false,"open_issues_count":499,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5274,"open_issues":499,"watchers":1791,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9772"},"html":{"href":"https://github.com/PX4/Firmware/pull/9772"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9772"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9772/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9772/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9772/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/5e258bc86bb236611b5e39c9326d9fa72177e646"}},"author_association":"NONE"}}
{"actor":{"display_login":"dakejahl"}}