{"action":"opened","number":60,"pull_request":{"url":"https://api.github.com/repos/PX4/ecl/pulls/60","id":60482648,"html_url":"https://github.com/PX4/ecl/pull/60","diff_url":"https://github.com/PX4/ecl/pull/60.diff","patch_url":"https://github.com/PX4/ecl/pull/60.patch","issue_url":"https://api.github.com/repos/PX4/ecl/issues/60","number":60,"state":"open","locked":false,"title":"EKF: Fix Bug Causing Roll/pitch Disturbances On Mag Fusion Mode Switch","user":{"login":"priseborough","id":3596952,"avatar_url":"https://avatars.githubusercontent.com/u/3596952?v=3","gravatar_id":"","url":"https://api.github.com/users/priseborough","html_url":"https://github.com/priseborough","followers_url":"https://api.github.com/users/priseborough/followers","following_url":"https://api.github.com/users/priseborough/following{/other_user}","gists_url":"https://api.github.com/users/priseborough/gists{/gist_id}","starred_url":"https://api.github.com/users/priseborough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priseborough/subscriptions","organizations_url":"https://api.github.com/users/priseborough/orgs","repos_url":"https://api.github.com/users/priseborough/repos","events_url":"https://api.github.com/users/priseborough/events{/privacy}","received_events_url":"https://api.github.com/users/priseborough/received_events","type":"User","site_admin":false},"body":"The magnetic field states and yaw angles were being reset on transition into GPS mode, not 3D fusion mode. \r\n\r\nThis could cause large magnetometer innovations and upsets in roll and pitch when 3D fusion commenced if the vehicle was subject to significant field disturbances on the ground when it started using GPS.\r\n\r\nThis PR ensures that the mag field states and yaw are always reset when entering 3D fusion mode, and that the angle error covariances are zeroed to prevent unwanted angle disturbances when commencing 3D fusion.\r\n\r\nThe following flight test data shows an in-air transition into 3D fusion. Note that the angle error variances quickly recover within seconds of the reset due to the imu process noise.\r\n\r\n![mag x innov](https://cloud.githubusercontent.com/assets/3596952/13281506/5b323d12-db38-11e5-9f47-51f73ceba478.png)\r\n![mag z innov](https://cloud.githubusercontent.com/assets/3596952/13281508/5b7dfaea-db38-11e5-93f2-737a905ba7f1.png)\r\n![mag y innov](https://cloud.githubusercontent.com/assets/3596952/13281509/5b7fac0a-db38-11e5-9a44-36225bee008c.png)\r\n![yaw innov](https://cloud.githubusercontent.com/assets/3596952/13281512/61085d5c-db38-11e5-8851-c3caa3ad2673.png)\r\n![angle error sigma](https://cloud.githubusercontent.com/assets/3596952/13281513/66fa9978-db38-11e5-84c1-31396351ec6f.png)\r\n![roll pitch](https://cloud.githubusercontent.com/assets/3596952/13281531/84e2390a-db38-11e5-828c-bba4c0bd5781.png)\r\n![mag bias](https://cloud.githubusercontent.com/assets/3596952/13281601/d8940b3c-db38-11e5-94f8-c587cc49f93d.png)\r\n","created_at":"2016-02-24T09:55:46Z","updated_at":"2016-02-24T09:55:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PX4/ecl/pulls/60/commits","review_comments_url":"https://api.github.com/repos/PX4/ecl/pulls/60/comments","review_comment_url":"https://api.github.com/repos/PX4/ecl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/ecl/issues/60/comments","statuses_url":"https://api.github.com/repos/PX4/ecl/statuses/75e818eb697f9999c2c0ec8b93b1c53dd59191d1","head":{"label":"PX4:pr-ReduceMagModeSwitchKick","ref":"pr-ReduceMagModeSwitchKick","sha":"75e818eb697f9999c2c0ec8b93b1c53dd59191d1","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":44974513,"name":"ecl","full_name":"PX4/ecl","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/ecl","description":"Estimation & Control Library for Guidance, Navigation and Control Applications","fork":false,"url":"https://api.github.com/repos/PX4/ecl","forks_url":"https://api.github.com/repos/PX4/ecl/forks","keys_url":"https://api.github.com/repos/PX4/ecl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/ecl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/ecl/teams","hooks_url":"https://api.github.com/repos/PX4/ecl/hooks","issue_events_url":"https://api.github.com/repos/PX4/ecl/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/ecl/events","assignees_url":"https://api.github.com/repos/PX4/ecl/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/ecl/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/ecl/tags","blobs_url":"https://api.github.com/repos/PX4/ecl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/ecl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/ecl/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/ecl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/ecl/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/ecl/languages","stargazers_url":"https://api.github.com/repos/PX4/ecl/stargazers","contributors_url":"https://api.github.com/repos/PX4/ecl/contributors","subscribers_url":"https://api.github.com/repos/PX4/ecl/subscribers","subscription_url":"https://api.github.com/repos/PX4/ecl/subscription","commits_url":"https://api.github.com/repos/PX4/ecl/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/ecl/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/ecl/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/ecl/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/ecl/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/ecl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/ecl/merges","archive_url":"https://api.github.com/repos/PX4/ecl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/ecl/downloads","issues_url":"https://api.github.com/repos/PX4/ecl/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/ecl/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/ecl/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/ecl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/ecl/labels{/name}","releases_url":"https://api.github.com/repos/PX4/ecl/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/ecl/deployments","created_at":"2015-10-26T14:41:25Z","updated_at":"2016-02-12T19:04:15Z","pushed_at":"2016-02-24T09:44:01Z","git_url":"git://github.com/PX4/ecl.git","ssh_url":"git@github.com:PX4/ecl.git","clone_url":"https://github.com/PX4/ecl.git","svn_url":"https://github.com/PX4/ecl","homepage":"http://dev.px4.io","size":401,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":15,"forks":13,"open_issues":15,"watchers":8,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"e938475accbd18a92ce75e89f30620aa7ffe9ef4","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":44974513,"name":"ecl","full_name":"PX4/ecl","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/ecl","description":"Estimation & Control Library for Guidance, Navigation and Control Applications","fork":false,"url":"https://api.github.com/repos/PX4/ecl","forks_url":"https://api.github.com/repos/PX4/ecl/forks","keys_url":"https://api.github.com/repos/PX4/ecl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/ecl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/ecl/teams","hooks_url":"https://api.github.com/repos/PX4/ecl/hooks","issue_events_url":"https://api.github.com/repos/PX4/ecl/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/ecl/events","assignees_url":"https://api.github.com/repos/PX4/ecl/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/ecl/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/ecl/tags","blobs_url":"https://api.github.com/repos/PX4/ecl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/ecl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/ecl/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/ecl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/ecl/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/ecl/languages","stargazers_url":"https://api.github.com/repos/PX4/ecl/stargazers","contributors_url":"https://api.github.com/repos/PX4/ecl/contributors","subscribers_url":"https://api.github.com/repos/PX4/ecl/subscribers","subscription_url":"https://api.github.com/repos/PX4/ecl/subscription","commits_url":"https://api.github.com/repos/PX4/ecl/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/ecl/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/ecl/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/ecl/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/ecl/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/ecl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/ecl/merges","archive_url":"https://api.github.com/repos/PX4/ecl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/ecl/downloads","issues_url":"https://api.github.com/repos/PX4/ecl/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/ecl/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/ecl/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/ecl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/ecl/labels{/name}","releases_url":"https://api.github.com/repos/PX4/ecl/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/ecl/deployments","created_at":"2015-10-26T14:41:25Z","updated_at":"2016-02-12T19:04:15Z","pushed_at":"2016-02-24T09:44:01Z","git_url":"git://github.com/PX4/ecl.git","ssh_url":"git@github.com:PX4/ecl.git","clone_url":"https://github.com/PX4/ecl.git","svn_url":"https://github.com/PX4/ecl","homepage":"http://dev.px4.io","size":401,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":15,"forks":13,"open_issues":15,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/ecl/pulls/60"},"html":{"href":"https://github.com/PX4/ecl/pull/60"},"issue":{"href":"https://api.github.com/repos/PX4/ecl/issues/60"},"comments":{"href":"https://api.github.com/repos/PX4/ecl/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/ecl/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/ecl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/ecl/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/ecl/statuses/75e818eb697f9999c2c0ec8b93b1c53dd59191d1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":210,"deletions":181,"changed_files":9}}