{"action":"created","comment":{"url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/comments/70351162","id":70351162,"diff_hunk":"@@ -16,19 +16,27 @@\n */\n void AP_InertialNav_NavEKF::update(float dt)\n {\n-    // get the position relative to the local earth frame origin\n-    if (_ahrs_ekf.get_relative_position_NED(_relpos_cm)) {\n-        _relpos_cm *= 100; // convert to cm\n-        _relpos_cm.z = - _relpos_cm.z; // InertialNav is NEU\n+    // get the NE position relative to the local earth frame origin\n+    Vector2f posNE;\n+    if (_ahrs_ekf.get_relative_position_NE(posNE)) {\n+        _relpos_cm.x = posNE.x * 100; // convert from m to cm\n+        _relpos_cm.y = posNE.y * 100; // convert from m to cm\n+    }\n+\n+    // get the D position relative to the local earth frame origin\n+    float posD;\n+    if (_ahrs_ekf.get_relative_position_D(posD)) {\n+        _relpos_cm.z = - posD * 100; // convert from m in NED to cm in NEU\n     }\n \n     // get the absolute WGS-84 position\n     _haveabspos = _ahrs_ekf.get_position(_abspos);\n \n     // get the velocity relative to the local earth frame\n-    if (_ahrs_ekf.get_velocity_NED(_velocity_cm)) {\n-        _velocity_cm *= 100; // convert to cm/s\n-        _velocity_cm.z = -_velocity_cm.z; // InertialNav is NEU\n+    Vector3f velNED;","path":"libraries/AP_InertialNav/AP_InertialNav_NavEKF.cpp","position":28,"original_position":28,"commit_id":"aeb3cda48d40f24c93b89ea33ccc69372f5e6f57","original_commit_id":"aeb3cda48d40f24c93b89ea33ccc69372f5e6f57","user":{"login":"wsilva32","id":9245329,"avatar_url":"https://avatars.githubusercontent.com/u/9245329?v=3","gravatar_id":"","url":"https://api.github.com/users/wsilva32","html_url":"https://github.com/wsilva32","followers_url":"https://api.github.com/users/wsilva32/followers","following_url":"https://api.github.com/users/wsilva32/following{/other_user}","gists_url":"https://api.github.com/users/wsilva32/gists{/gist_id}","starred_url":"https://api.github.com/users/wsilva32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsilva32/subscriptions","organizations_url":"https://api.github.com/users/wsilva32/orgs","repos_url":"https://api.github.com/users/wsilva32/repos","events_url":"https://api.github.com/users/wsilva32/events{/privacy}","received_events_url":"https://api.github.com/users/wsilva32/received_events","type":"User","site_admin":false},"body":"I assume there's no need to split vertical velocity from horizontal velocity, as we did with position?","created_at":"2016-07-11T22:47:05Z","updated_at":"2016-07-11T22:47:05Z","html_url":"https://github.com/3drobotics/ardupilot/pull/15#discussion_r70351162","pull_request_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/comments/70351162"},"html":{"href":"https://github.com/3drobotics/ardupilot/pull/15#discussion_r70351162"},"pull_request":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15","id":76885918,"html_url":"https://github.com/3drobotics/ardupilot/pull/15","diff_url":"https://github.com/3drobotics/ardupilot/pull/15.diff","patch_url":"https://github.com/3drobotics/ardupilot/pull/15.patch","issue_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/15","number":15,"state":"open","locked":false,"title":"Fix bug that can cause loss of height control when flying before GPS lock is achieved","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":"Fixes a bug that results in a scaling error of 100 on height when EKF is not doing GPS aiding.\r\n\r\nPasses autotester, needs flight test validation.","created_at":"2016-07-10T22:52:04Z","updated_at":"2016-07-11T22:47:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23e5c6e3ae7c8f95e44e9f7b63da54e0f145743e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15/commits","review_comments_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15/comments","review_comment_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/15/comments","statuses_url":"https://api.github.com/repos/3drobotics/ardupilot/statuses/aeb3cda48d40f24c93b89ea33ccc69372f5e6f57","head":{"label":"3drobotics:pr-fixHgtBug","ref":"pr-fixHgtBug","sha":"aeb3cda48d40f24c93b89ea33ccc69372f5e6f57","user":{"login":"3drobotics","id":857602,"avatar_url":"https://avatars.githubusercontent.com/u/857602?v=3","gravatar_id":"","url":"https://api.github.com/users/3drobotics","html_url":"https://github.com/3drobotics","followers_url":"https://api.github.com/users/3drobotics/followers","following_url":"https://api.github.com/users/3drobotics/following{/other_user}","gists_url":"https://api.github.com/users/3drobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/3drobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3drobotics/subscriptions","organizations_url":"https://api.github.com/users/3drobotics/orgs","repos_url":"https://api.github.com/users/3drobotics/repos","events_url":"https://api.github.com/users/3drobotics/events{/privacy}","received_events_url":"https://api.github.com/users/3drobotics/received_events","type":"Organization","site_admin":false},"repo":{"id":44397492,"name":"ardupilot","full_name":"3drobotics/ardupilot","owner":{"login":"3drobotics","id":857602,"avatar_url":"https://avatars.githubusercontent.com/u/857602?v=3","gravatar_id":"","url":"https://api.github.com/users/3drobotics","html_url":"https://github.com/3drobotics","followers_url":"https://api.github.com/users/3drobotics/followers","following_url":"https://api.github.com/users/3drobotics/following{/other_user}","gists_url":"https://api.github.com/users/3drobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/3drobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3drobotics/subscriptions","organizations_url":"https://api.github.com/users/3drobotics/orgs","repos_url":"https://api.github.com/users/3drobotics/repos","events_url":"https://api.github.com/users/3drobotics/events{/privacy}","received_events_url":"https://api.github.com/users/3drobotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/3drobotics/ardupilot","description":"APM Plane, APM Copter, APM Rover source (forked @ 4d964fb)","fork":true,"url":"https://api.github.com/repos/3drobotics/ardupilot","forks_url":"https://api.github.com/repos/3drobotics/ardupilot/forks","keys_url":"https://api.github.com/repos/3drobotics/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3drobotics/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3drobotics/ardupilot/teams","hooks_url":"https://api.github.com/repos/3drobotics/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/3drobotics/ardupilot/events","assignees_url":"https://api.github.com/repos/3drobotics/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/3drobotics/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/3drobotics/ardupilot/tags","blobs_url":"https://api.github.com/repos/3drobotics/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3drobotics/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3drobotics/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/3drobotics/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3drobotics/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/3drobotics/ardupilot/languages","stargazers_url":"https://api.github.com/repos/3drobotics/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/3drobotics/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/3drobotics/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/3drobotics/ardupilot/subscription","commits_url":"https://api.github.com/repos/3drobotics/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/3drobotics/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/3drobotics/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/3drobotics/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/3drobotics/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3drobotics/ardupilot/merges","archive_url":"https://api.github.com/repos/3drobotics/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3drobotics/ardupilot/downloads","issues_url":"https://api.github.com/repos/3drobotics/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/3drobotics/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/3drobotics/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3drobotics/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/3drobotics/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/3drobotics/ardupilot/deployments","created_at":"2015-10-16T16:28:47Z","updated_at":"2016-07-01T09:21:17Z","pushed_at":"2016-07-11T00:24:32Z","git_url":"git://github.com/3drobotics/ardupilot.git","ssh_url":"git@github.com:3drobotics/ardupilot.git","clone_url":"https://github.com/3drobotics/ardupilot.git","svn_url":"https://github.com/3drobotics/ardupilot","homepage":"http://ardupilot.com/","size":75950,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"3drobotics:master","ref":"master","sha":"7e506df8a2785efd84b992bace3483fe2b5327df","user":{"login":"3drobotics","id":857602,"avatar_url":"https://avatars.githubusercontent.com/u/857602?v=3","gravatar_id":"","url":"https://api.github.com/users/3drobotics","html_url":"https://github.com/3drobotics","followers_url":"https://api.github.com/users/3drobotics/followers","following_url":"https://api.github.com/users/3drobotics/following{/other_user}","gists_url":"https://api.github.com/users/3drobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/3drobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3drobotics/subscriptions","organizations_url":"https://api.github.com/users/3drobotics/orgs","repos_url":"https://api.github.com/users/3drobotics/repos","events_url":"https://api.github.com/users/3drobotics/events{/privacy}","received_events_url":"https://api.github.com/users/3drobotics/received_events","type":"Organization","site_admin":false},"repo":{"id":44397492,"name":"ardupilot","full_name":"3drobotics/ardupilot","owner":{"login":"3drobotics","id":857602,"avatar_url":"https://avatars.githubusercontent.com/u/857602?v=3","gravatar_id":"","url":"https://api.github.com/users/3drobotics","html_url":"https://github.com/3drobotics","followers_url":"https://api.github.com/users/3drobotics/followers","following_url":"https://api.github.com/users/3drobotics/following{/other_user}","gists_url":"https://api.github.com/users/3drobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/3drobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3drobotics/subscriptions","organizations_url":"https://api.github.com/users/3drobotics/orgs","repos_url":"https://api.github.com/users/3drobotics/repos","events_url":"https://api.github.com/users/3drobotics/events{/privacy}","received_events_url":"https://api.github.com/users/3drobotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/3drobotics/ardupilot","description":"APM Plane, APM Copter, APM Rover source (forked @ 4d964fb)","fork":true,"url":"https://api.github.com/repos/3drobotics/ardupilot","forks_url":"https://api.github.com/repos/3drobotics/ardupilot/forks","keys_url":"https://api.github.com/repos/3drobotics/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3drobotics/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3drobotics/ardupilot/teams","hooks_url":"https://api.github.com/repos/3drobotics/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/3drobotics/ardupilot/events","assignees_url":"https://api.github.com/repos/3drobotics/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/3drobotics/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/3drobotics/ardupilot/tags","blobs_url":"https://api.github.com/repos/3drobotics/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3drobotics/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3drobotics/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/3drobotics/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3drobotics/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/3drobotics/ardupilot/languages","stargazers_url":"https://api.github.com/repos/3drobotics/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/3drobotics/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/3drobotics/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/3drobotics/ardupilot/subscription","commits_url":"https://api.github.com/repos/3drobotics/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/3drobotics/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/3drobotics/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/3drobotics/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/3drobotics/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/3drobotics/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3drobotics/ardupilot/merges","archive_url":"https://api.github.com/repos/3drobotics/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3drobotics/ardupilot/downloads","issues_url":"https://api.github.com/repos/3drobotics/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/3drobotics/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/3drobotics/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/3drobotics/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3drobotics/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/3drobotics/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/3drobotics/ardupilot/deployments","created_at":"2015-10-16T16:28:47Z","updated_at":"2016-07-01T09:21:17Z","pushed_at":"2016-07-11T00:24:32Z","git_url":"git://github.com/3drobotics/ardupilot.git","ssh_url":"git@github.com:3drobotics/ardupilot.git","clone_url":"https://github.com/3drobotics/ardupilot.git","svn_url":"https://github.com/3drobotics/ardupilot","homepage":"http://ardupilot.com/","size":75950,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15"},"html":{"href":"https://github.com/3drobotics/ardupilot/pull/15"},"issue":{"href":"https://api.github.com/repos/3drobotics/ardupilot/issues/15"},"comments":{"href":"https://api.github.com/repos/3drobotics/ardupilot/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/3drobotics/ardupilot/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/3drobotics/ardupilot/statuses/aeb3cda48d40f24c93b89ea33ccc69372f5e6f57"}}}}
{"actor":{"display_login":"wsilva32"}}