{"action":"created","comment":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/68587127","id":68587127,"diff_hunk":"@@ -2032,15 +2046,26 @@ FixedwingPositionControl::control_position(const math::Vector<2> &current_positi\n \n \t}\n \n-\t/* During a takeoff waypoint while waiting for launch the pitch sp is set\n-\t * already (not by tecs) */\n-\tif (!(_control_mode_current ==  FW_POSCTRL_MODE_AUTO && (\n-\t\t      (pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF &&\n-\t\t       (launch_detection_state == LAUNCHDETECTION_RES_NONE ||\n-\t\t\t_runway_takeoff.runwayTakeoffEnabled())) ||\n-\t\t      (pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_LAND &&\n-\t\t       land_noreturn_vertical))\n-\t     )) {\n+\t// decide when to use pitch setpoint from TECS because in some cases pitch\n+\t// setpoint is generated by other means\n+\tbool use_tecs_pitch = true;\n+\n+\t// auto takeoff\n+\tuse_tecs_pitch &= !(_control_mode_current ==  FW_POSCTRL_MODE_AUTO &&\n+\t\t      pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF &&\n+\t\t       launch_detection_state == LAUNCHDETECTION_RES_NONE);\n+\n+\t// runway takeoff\n+\tuse_tecs_pitch &= !_runway_takeoff.runwayTakeoffEnabled();","path":"src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp","position":126,"original_position":126,"commit_id":"327e2d473bc4cc4d3a8daa9adee2bb136a17380d","original_commit_id":"327e2d473bc4cc4d3a8daa9adee2bb136a17380d","user":{"login":"dagar","id":84712,"avatar_url":"https://avatars.githubusercontent.com/u/84712?v=3","gravatar_id":"","url":"https://api.github.com/users/dagar","html_url":"https://github.com/dagar","followers_url":"https://api.github.com/users/dagar/followers","following_url":"https://api.github.com/users/dagar/following{/other_user}","gists_url":"https://api.github.com/users/dagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagar/subscriptions","organizations_url":"https://api.github.com/users/dagar/orgs","repos_url":"https://api.github.com/users/dagar/repos","events_url":"https://api.github.com/users/dagar/events{/privacy}","received_events_url":"https://api.github.com/users/dagar/received_events","type":"User","site_admin":false},"body":"_runway_takeoff.runwayTakeoffEnabled() is checking if the param is set.\r\nSo this would also need to be only during AUTO with a TAKEOFF setpoint.\r\n\r\nOverall you've made that nasty check almost readable ;)","created_at":"2016-06-27T14:35:50Z","updated_at":"2016-06-27T14:35:50Z","html_url":"https://github.com/PX4/Firmware/pull/4916#discussion_r68587127","pull_request_url":"https://api.github.com/repos/PX4/Firmware/pulls/4916","_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/68587127"},"html":{"href":"https://github.com/PX4/Firmware/pull/4916#discussion_r68587127"},"pull_request":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/4916"}}},"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/4916","id":75261201,"html_url":"https://github.com/PX4/Firmware/pull/4916","diff_url":"https://github.com/PX4/Firmware/pull/4916.diff","patch_url":"https://github.com/PX4/Firmware/pull/4916.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/4916","number":4916,"state":"open","locked":false,"title":"Pr fw wing rock","user":{"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},"body":"1) Should solve the wing rock problem here #4523 \r\n2) Shifts the computation of the complete attitude setpoint except for the full manual mode (attitude setpoint is published by fw_att_control) into the fw position controller.\r\nThis ensures that the setpoint is logged correctly including the setpoint offsets which were never included in the logged data.\r\n3) As mentioned in 2) the attitude setpoint offsets are now added just before the attitude setpoint is published.\r\n\r\nTODO:\r\n- [x] SITL test","created_at":"2016-06-27T06:19:15Z","updated_at":"2016-06-27T14:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e880e559b0ed5b8428f5a546f5f1fbdc3ef6bd7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/4916/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/4916/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/4916/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/327e2d473bc4cc4d3a8daa9adee2bb136a17380d","head":{"label":"PX4:pr-fwWingRock","ref":"pr-fwWingRock","sha":"327e2d473bc4cc4d3a8daa9adee2bb136a17380d","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-06-27T13:56:18Z","pushed_at":"2016-06-27T14:24:04Z","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":198685,"stargazers_count":657,"watchers_count":657,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2377,"mirror_url":null,"open_issues_count":339,"forks":2377,"open_issues":339,"watchers":657,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"5935b18581619990534dd68df3d53d11d077ad77","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-06-27T13:56:18Z","pushed_at":"2016-06-27T14:24:04Z","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":198685,"stargazers_count":657,"watchers_count":657,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2377,"mirror_url":null,"open_issues_count":339,"forks":2377,"open_issues":339,"watchers":657,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/4916"},"html":{"href":"https://github.com/PX4/Firmware/pull/4916"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/4916"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/4916/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/4916/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/4916/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/327e2d473bc4cc4d3a8daa9adee2bb136a17380d"}}}}
{"actor":{"display_login":"dagar"}}