{"action":"created","comment":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/56194688","id":56194688,"diff_hunk":"@@ -69,6 +75,30 @@ const AP_Param::GroupInfo AP_Baro::var_info[] = {\n     // @Description: This selects which barometer will be the primary if multiple barometers are found\n     // @Values: 0:FirstBaro,1:2ndBaro,2:3rdBaro\n     AP_GROUPINFO(\"PRIMARY\", 6, AP_Baro, _primary_baro, 0),\n+    \n+    // @Param: ADJ_RATE\n+    // @DisplayName: baro adjustment rate\n+    // @Description: Rate of barometer adjustment using GPS. If enabled (>=0.1), the barometer ground pressure is slowly adjusted during flight segments with constant altitude target by using GPS information.  Recommended value: 1cm/sec\n+    // @Units: cm/second\n+    // @Range: 0 10\n+    // @Increment: 0.1\n+    AP_GROUPINFO(\"ADJ_RATE\", 7, AP_Baro, _adj_step, ADJ_RATE_DEFAULT),\n+\n+    // @Param: ADJ_TC\n+    // @DisplayName: GPS filter time constant\n+    // @Description: Time constant for the low pass filter applied to the GPS signal. As we only want to compensate for long-term trends, the should be fairly large (30sec...several mintes)\n+    // @Units: seconds\n+    // @Range: 10 600\n+    // @Increment: 1\n+    AP_GROUPINFO(\"ADJ_TC\", 8, AP_Baro, _adj_timeconstant, ADJ_TC_DEFAULT),","path":"libraries/AP_Baro/AP_Baro.cpp","position":32,"original_position":32,"commit_id":"2c87c00d51a709f7fad8753987dc471f01f3d602","original_commit_id":"2c87c00d51a709f7fad8753987dc471f01f3d602","user":{"login":"magicrub","id":4782875,"avatar_url":"https://avatars.githubusercontent.com/u/4782875?v=3","gravatar_id":"","url":"https://api.github.com/users/magicrub","html_url":"https://github.com/magicrub","followers_url":"https://api.github.com/users/magicrub/followers","following_url":"https://api.github.com/users/magicrub/following{/other_user}","gists_url":"https://api.github.com/users/magicrub/gists{/gist_id}","starred_url":"https://api.github.com/users/magicrub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicrub/subscriptions","organizations_url":"https://api.github.com/users/magicrub/orgs","repos_url":"https://api.github.com/users/magicrub/repos","events_url":"https://api.github.com/users/magicrub/events{/privacy}","received_events_url":"https://api.github.com/users/magicrub/received_events","type":"User","site_admin":false},"body":"This BARO_ADJ_TC is just rubbing me the wrong way. There must be a way to hard-code this and remove this \"yet another knob\". It should be OK to be overly conservative with it. Even with RTK, a slow filter is fine because the baro drift build-up is very very slow so the filter just has to be faster than that. Can you give me any use cases where a faster/slower value is better than 1 minute?","created_at":"2016-03-15T16:31:26Z","updated_at":"2016-03-15T16:31:26Z","html_url":"https://github.com/diydrones/ardupilot/pull/3749#discussion_r56194688","pull_request_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749","_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/56194688"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/3749#discussion_r56194688"},"pull_request":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749"}}},"pull_request":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749","id":62794937,"html_url":"https://github.com/diydrones/ardupilot/pull/3749","diff_url":"https://github.com/diydrones/ardupilot/pull/3749.diff","patch_url":"https://github.com/diydrones/ardupilot/pull/3749.patch","issue_url":"https://api.github.com/repos/diydrones/ardupilot/issues/3749","number":3749,"state":"open","locked":false,"title":"Compensate long-term baro drift","user":{"login":"hsteinhaus","id":3057137,"avatar_url":"https://avatars.githubusercontent.com/u/3057137?v=3","gravatar_id":"","url":"https://api.github.com/users/hsteinhaus","html_url":"https://github.com/hsteinhaus","followers_url":"https://api.github.com/users/hsteinhaus/followers","following_url":"https://api.github.com/users/hsteinhaus/following{/other_user}","gists_url":"https://api.github.com/users/hsteinhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/hsteinhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsteinhaus/subscriptions","organizations_url":"https://api.github.com/users/hsteinhaus/orgs","repos_url":"https://api.github.com/users/hsteinhaus/repos","events_url":"https://api.github.com/users/hsteinhaus/events{/privacy}","received_events_url":"https://api.github.com/users/hsteinhaus/received_events","type":"User","site_admin":false},"body":"This PR slowly corrects the barometric base altitude (ALT_OFFSET parameter) during flight using a low pass filtered signal derived from GPS altitude. \r\n\r\nCorrecting the base altitude is important during long AUTO missings, otherwise the actual flight altitude above home slowly drifts away from the altitude target. I have regularly seen drifts of more then 20m per hour of flight. This could easily lead to a violation of protected air spaces or to controlled flight into terrain.\r\n\r\nThe compensation starts after a certain period of flight with constant alt target (configurable by parameter ADJ_DELAY). The rate of compensation (paramter ADJ_RATE) and the time constant for filtering the GPS altitude (parameter ADJ_TC) are configurable as well. The compensation is disabled by default and has to be enabled by the user by setting a non-zero ADJ_RATE.\r\n\r\nFixes https://github.com/diydrones/ardupilot/issues/2022 . ","created_at":"2016-03-14T18:27:03Z","updated_at":"2016-03-15T16:31:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bd85ba592dd66cf5be85f7614ea091dc873b3ed","assignee":{"login":"magicrub","id":4782875,"avatar_url":"https://avatars.githubusercontent.com/u/4782875?v=3","gravatar_id":"","url":"https://api.github.com/users/magicrub","html_url":"https://github.com/magicrub","followers_url":"https://api.github.com/users/magicrub/followers","following_url":"https://api.github.com/users/magicrub/following{/other_user}","gists_url":"https://api.github.com/users/magicrub/gists{/gist_id}","starred_url":"https://api.github.com/users/magicrub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicrub/subscriptions","organizations_url":"https://api.github.com/users/magicrub/orgs","repos_url":"https://api.github.com/users/magicrub/repos","events_url":"https://api.github.com/users/magicrub/events{/privacy}","received_events_url":"https://api.github.com/users/magicrub/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749/commits","review_comments_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749/comments","review_comment_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/issues/3749/comments","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/2c87c00d51a709f7fad8753987dc471f01f3d602","head":{"label":"hsteinhaus:gps_qnh4","ref":"gps_qnh4","sha":"2c87c00d51a709f7fad8753987dc471f01f3d602","user":{"login":"hsteinhaus","id":3057137,"avatar_url":"https://avatars.githubusercontent.com/u/3057137?v=3","gravatar_id":"","url":"https://api.github.com/users/hsteinhaus","html_url":"https://github.com/hsteinhaus","followers_url":"https://api.github.com/users/hsteinhaus/followers","following_url":"https://api.github.com/users/hsteinhaus/following{/other_user}","gists_url":"https://api.github.com/users/hsteinhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/hsteinhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsteinhaus/subscriptions","organizations_url":"https://api.github.com/users/hsteinhaus/orgs","repos_url":"https://api.github.com/users/hsteinhaus/repos","events_url":"https://api.github.com/users/hsteinhaus/events{/privacy}","received_events_url":"https://api.github.com/users/hsteinhaus/received_events","type":"User","site_admin":false},"repo":{"id":17739648,"name":"ardupilot","full_name":"hsteinhaus/ardupilot","owner":{"login":"hsteinhaus","id":3057137,"avatar_url":"https://avatars.githubusercontent.com/u/3057137?v=3","gravatar_id":"","url":"https://api.github.com/users/hsteinhaus","html_url":"https://github.com/hsteinhaus","followers_url":"https://api.github.com/users/hsteinhaus/followers","following_url":"https://api.github.com/users/hsteinhaus/following{/other_user}","gists_url":"https://api.github.com/users/hsteinhaus/gists{/gist_id}","starred_url":"https://api.github.com/users/hsteinhaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsteinhaus/subscriptions","organizations_url":"https://api.github.com/users/hsteinhaus/orgs","repos_url":"https://api.github.com/users/hsteinhaus/repos","events_url":"https://api.github.com/users/hsteinhaus/events{/privacy}","received_events_url":"https://api.github.com/users/hsteinhaus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hsteinhaus/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":true,"url":"https://api.github.com/repos/hsteinhaus/ardupilot","forks_url":"https://api.github.com/repos/hsteinhaus/ardupilot/forks","keys_url":"https://api.github.com/repos/hsteinhaus/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hsteinhaus/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hsteinhaus/ardupilot/teams","hooks_url":"https://api.github.com/repos/hsteinhaus/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/hsteinhaus/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/hsteinhaus/ardupilot/events","assignees_url":"https://api.github.com/repos/hsteinhaus/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/hsteinhaus/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/hsteinhaus/ardupilot/tags","blobs_url":"https://api.github.com/repos/hsteinhaus/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hsteinhaus/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hsteinhaus/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/hsteinhaus/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hsteinhaus/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/hsteinhaus/ardupilot/languages","stargazers_url":"https://api.github.com/repos/hsteinhaus/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/hsteinhaus/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/hsteinhaus/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/hsteinhaus/ardupilot/subscription","commits_url":"https://api.github.com/repos/hsteinhaus/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/hsteinhaus/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/hsteinhaus/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/hsteinhaus/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/hsteinhaus/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/hsteinhaus/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hsteinhaus/ardupilot/merges","archive_url":"https://api.github.com/repos/hsteinhaus/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hsteinhaus/ardupilot/downloads","issues_url":"https://api.github.com/repos/hsteinhaus/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/hsteinhaus/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/hsteinhaus/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/hsteinhaus/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hsteinhaus/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/hsteinhaus/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/hsteinhaus/ardupilot/deployments","created_at":"2014-03-14T08:19:40Z","updated_at":"2016-02-22T07:56:59Z","pushed_at":"2016-03-14T23:04:05Z","git_url":"git://github.com/hsteinhaus/ardupilot.git","ssh_url":"git@github.com:hsteinhaus/ardupilot.git","clone_url":"https://github.com/hsteinhaus/ardupilot.git","svn_url":"https://github.com/hsteinhaus/ardupilot","homepage":"http://ardupilot.com/","size":71377,"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":"master"}},"base":{"label":"diydrones:master","ref":"master","sha":"df150cd8dd73fcae1556e0def0a3498a80f19bb7","user":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"diydrones/ardupilot","owner":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diydrones/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":false,"url":"https://api.github.com/repos/diydrones/ardupilot","forks_url":"https://api.github.com/repos/diydrones/ardupilot/forks","keys_url":"https://api.github.com/repos/diydrones/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diydrones/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diydrones/ardupilot/teams","hooks_url":"https://api.github.com/repos/diydrones/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/diydrones/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/diydrones/ardupilot/events","assignees_url":"https://api.github.com/repos/diydrones/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/diydrones/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/diydrones/ardupilot/tags","blobs_url":"https://api.github.com/repos/diydrones/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diydrones/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diydrones/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/diydrones/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/diydrones/ardupilot/languages","stargazers_url":"https://api.github.com/repos/diydrones/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/diydrones/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/diydrones/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/diydrones/ardupilot/subscription","commits_url":"https://api.github.com/repos/diydrones/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/diydrones/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/diydrones/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/diydrones/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/diydrones/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diydrones/ardupilot/merges","archive_url":"https://api.github.com/repos/diydrones/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diydrones/ardupilot/downloads","issues_url":"https://api.github.com/repos/diydrones/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/diydrones/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/diydrones/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/diydrones/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diydrones/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/diydrones/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/diydrones/ardupilot/deployments","created_at":"2013-01-09T00:58:52Z","updated_at":"2016-03-15T08:10:16Z","pushed_at":"2016-03-15T14:25:59Z","git_url":"git://github.com/diydrones/ardupilot.git","ssh_url":"git@github.com:diydrones/ardupilot.git","clone_url":"https://github.com/diydrones/ardupilot.git","svn_url":"https://github.com/diydrones/ardupilot","homepage":"http://ardupilot.com/","size":124135,"stargazers_count":1734,"watchers_count":1734,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3631,"mirror_url":null,"open_issues_count":677,"forks":3631,"open_issues":677,"watchers":1734,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/3749"},"issue":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/3749"},"comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/3749/comments"},"review_comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749/comments"},"review_comment":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/3749/commits"},"statuses":{"href":"https://api.github.com/repos/diydrones/ardupilot/statuses/2c87c00d51a709f7fad8753987dc471f01f3d602"}}}}