{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/173566646","pull_request_review_id":102787624,"id":173566646,"diff_hunk":"@@ -53,39 +64,83 @@ class AP_Airspeed\n     float get_airspeed(uint8_t i) const {\n         return state[i].airspeed;\n     }\n-    float get_airspeed(void) const { return get_airspeed(primary); }\n+    float get_airspeed(void) const {\n+        if (blend_state.active) {\n+            return blend_state.airspeed;\n+        } else {\n+            return get_airspeed(primary);\n+        }\n+    }\n \n     // return the unfiltered airspeed in m/s\n     float get_raw_airspeed(uint8_t i) const {\n         return state[i].raw_airspeed;\n     }\n-    float get_raw_airspeed(void) const { return get_raw_airspeed(primary); }\n+    float get_raw_airspeed(void) const {\n+        if (blend_state.active) {\n+            return blend_state.raw_airspeed;\n+        } else {\n+            return get_raw_airspeed(primary);\n+        }\n+    }\n \n     // return the current airspeed ratio (dimensionless)\n     float get_airspeed_ratio(uint8_t i) const {\n         return param[i].ratio;\n     }\n-    float get_airspeed_ratio(void) const { return get_airspeed_ratio(primary); }\n+    float get_airspeed_ratio(void) const {\n+        if (blend_state.active) {\n+            return blend_state.ratio;\n+        } else {\n+            return get_airspeed_ratio(primary);\n+        }\n+    }\n \n     // get temperature if available\n     bool get_temperature(uint8_t i, float &temperature);\n-    bool get_temperature(float &temperature) { return get_temperature(primary, temperature); }\n+    bool get_temperature(float &temperature) {\n+        if (blend_state.active) {\n+            temperature = blend_state.temperature;\n+            return true;\n+        } else {\n+            return get_temperature(primary, temperature);\n+        }\n+    }\n \n     // set the airspeed ratio (dimensionless)\n     void set_airspeed_ratio(uint8_t i, float ratio) {\n         param[i].ratio.set(ratio);\n     }\n-    void set_airspeed_ratio(float ratio) { set_airspeed_ratio(primary, ratio); }\n+    void set_airspeed_ratio(float ratio) {","path":"libraries/AP_Airspeed/AP_Airspeed.h","position":84,"original_position":84,"commit_id":"1c0b524bbd69bde791d139937612c14070a0165e","original_commit_id":"1c0b524bbd69bde791d139937612c14070a0165e","user":{"login":"EShamaev","id":7996972,"avatar_url":"https://avatars1.githubusercontent.com/u/7996972?v=4","gravatar_id":"","url":"https://api.github.com/users/EShamaev","html_url":"https://github.com/EShamaev","followers_url":"https://api.github.com/users/EShamaev/followers","following_url":"https://api.github.com/users/EShamaev/following{/other_user}","gists_url":"https://api.github.com/users/EShamaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EShamaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EShamaev/subscriptions","organizations_url":"https://api.github.com/users/EShamaev/orgs","repos_url":"https://api.github.com/users/EShamaev/repos","events_url":"https://api.github.com/users/EShamaev/events{/privacy}","received_events_url":"https://api.github.com/users/EShamaev/received_events","type":"User","site_admin":false},"body":"> since it clearly doesn't get called anywhere\r\nIf it does not - I will remove.","created_at":"2018-03-09T21:01:21Z","updated_at":"2018-03-09T21:01:21Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/7738#discussion_r173566646","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/173566646"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/7738#discussion_r173566646"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738"}},"in_reply_to_id":173560627},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738","id":169827397,"html_url":"https://github.com/ArduPilot/ardupilot/pull/7738","diff_url":"https://github.com/ArduPilot/ardupilot/pull/7738.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/7738.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/7738","number":7738,"state":"closed","locked":false,"title":"AP_Airspeed: Blending of several sensors","user":{"login":"EShamaev","id":7996972,"avatar_url":"https://avatars1.githubusercontent.com/u/7996972?v=4","gravatar_id":"","url":"https://api.github.com/users/EShamaev","html_url":"https://github.com/EShamaev","followers_url":"https://api.github.com/users/EShamaev/followers","following_url":"https://api.github.com/users/EShamaev/following{/other_user}","gists_url":"https://api.github.com/users/EShamaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EShamaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EShamaev/subscriptions","organizations_url":"https://api.github.com/users/EShamaev/orgs","repos_url":"https://api.github.com/users/EShamaev/repos","events_url":"https://api.github.com/users/EShamaev/events{/privacy}","received_events_url":"https://api.github.com/users/EShamaev/received_events","type":"User","site_admin":false},"body":"If the plane is equipped with several airspeed sensors it is natural to blend them.\r\nThis is the first draft to hear the community thoughts before it goes too far.\r\nMain idea is that we trust more to sensors that are close together (if there are >= 3) and those which values are closer to EKF predicted ones.","created_at":"2018-02-18T12:07:15Z","updated_at":"2018-03-09T21:01:21Z","closed_at":"2018-03-09T19:27:21Z","merged_at":"2018-03-09T19:27:21Z","merge_commit_sha":"6954a0035a8c9cddfadb29c7410ad8e900f07919","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tridge","id":831867,"avatar_url":"https://avatars2.githubusercontent.com/u/831867?v=4","gravatar_id":"","url":"https://api.github.com/users/tridge","html_url":"https://github.com/tridge","followers_url":"https://api.github.com/users/tridge/followers","following_url":"https://api.github.com/users/tridge/following{/other_user}","gists_url":"https://api.github.com/users/tridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tridge/subscriptions","organizations_url":"https://api.github.com/users/tridge/orgs","repos_url":"https://api.github.com/users/tridge/repos","events_url":"https://api.github.com/users/tridge/events{/privacy}","received_events_url":"https://api.github.com/users/tridge/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":24259150,"url":"https://api.github.com/repos/ArduPilot/ardupilot/labels/Enhancement","name":"Enhancement","color":"84b6eb","default":false},{"id":136051782,"url":"https://api.github.com/repos/ArduPilot/ardupilot/labels/Library","name":"Library","color":"f7c6c7","default":false},{"id":24269267,"url":"https://api.github.com/repos/ArduPilot/ardupilot/labels/Plane","name":"Plane","color":"d7e102","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/7738/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/1c0b524bbd69bde791d139937612c14070a0165e","head":{"label":"EShamaev:AP_Airspeed_Blending","ref":"AP_Airspeed_Blending","sha":"1c0b524bbd69bde791d139937612c14070a0165e","user":{"login":"EShamaev","id":7996972,"avatar_url":"https://avatars1.githubusercontent.com/u/7996972?v=4","gravatar_id":"","url":"https://api.github.com/users/EShamaev","html_url":"https://github.com/EShamaev","followers_url":"https://api.github.com/users/EShamaev/followers","following_url":"https://api.github.com/users/EShamaev/following{/other_user}","gists_url":"https://api.github.com/users/EShamaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EShamaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EShamaev/subscriptions","organizations_url":"https://api.github.com/users/EShamaev/orgs","repos_url":"https://api.github.com/users/EShamaev/repos","events_url":"https://api.github.com/users/EShamaev/events{/privacy}","received_events_url":"https://api.github.com/users/EShamaev/received_events","type":"User","site_admin":false},"repo":{"id":76563246,"name":"ardupilot","full_name":"EShamaev/ardupilot","owner":{"login":"EShamaev","id":7996972,"avatar_url":"https://avatars1.githubusercontent.com/u/7996972?v=4","gravatar_id":"","url":"https://api.github.com/users/EShamaev","html_url":"https://github.com/EShamaev","followers_url":"https://api.github.com/users/EShamaev/followers","following_url":"https://api.github.com/users/EShamaev/following{/other_user}","gists_url":"https://api.github.com/users/EShamaev/gists{/gist_id}","starred_url":"https://api.github.com/users/EShamaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EShamaev/subscriptions","organizations_url":"https://api.github.com/users/EShamaev/orgs","repos_url":"https://api.github.com/users/EShamaev/repos","events_url":"https://api.github.com/users/EShamaev/events{/privacy}","received_events_url":"https://api.github.com/users/EShamaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EShamaev/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":true,"url":"https://api.github.com/repos/EShamaev/ardupilot","forks_url":"https://api.github.com/repos/EShamaev/ardupilot/forks","keys_url":"https://api.github.com/repos/EShamaev/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EShamaev/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EShamaev/ardupilot/teams","hooks_url":"https://api.github.com/repos/EShamaev/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/EShamaev/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/EShamaev/ardupilot/events","assignees_url":"https://api.github.com/repos/EShamaev/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/EShamaev/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/EShamaev/ardupilot/tags","blobs_url":"https://api.github.com/repos/EShamaev/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EShamaev/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EShamaev/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/EShamaev/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EShamaev/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/EShamaev/ardupilot/languages","stargazers_url":"https://api.github.com/repos/EShamaev/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/EShamaev/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/EShamaev/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/EShamaev/ardupilot/subscription","commits_url":"https://api.github.com/repos/EShamaev/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/EShamaev/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/EShamaev/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/EShamaev/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/EShamaev/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/EShamaev/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EShamaev/ardupilot/merges","archive_url":"https://api.github.com/repos/EShamaev/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EShamaev/ardupilot/downloads","issues_url":"https://api.github.com/repos/EShamaev/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/EShamaev/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/EShamaev/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/EShamaev/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EShamaev/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/EShamaev/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/EShamaev/ardupilot/deployments","created_at":"2016-12-15T13:46:17Z","updated_at":"2016-12-15T13:46:30Z","pushed_at":"2018-03-09T19:18:08Z","git_url":"git://github.com/EShamaev/ardupilot.git","ssh_url":"git@github.com:EShamaev/ardupilot.git","clone_url":"https://github.com/EShamaev/ardupilot.git","svn_url":"https://github.com/EShamaev/ardupilot","homepage":"http://ardupilot.org/","size":98922,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"53b76efbd2726e54e7c9099cef9c593aabb1a657","user":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars3.githubusercontent.com/u/17919847?v=4","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"ArduPilot/ardupilot","owner":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars3.githubusercontent.com/u/17919847?v=4","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArduPilot/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":false,"url":"https://api.github.com/repos/ArduPilot/ardupilot","forks_url":"https://api.github.com/repos/ArduPilot/ardupilot/forks","keys_url":"https://api.github.com/repos/ArduPilot/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArduPilot/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArduPilot/ardupilot/teams","hooks_url":"https://api.github.com/repos/ArduPilot/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/ArduPilot/ardupilot/events","assignees_url":"https://api.github.com/repos/ArduPilot/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/ArduPilot/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/tags","blobs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/ArduPilot/ardupilot/languages","stargazers_url":"https://api.github.com/repos/ArduPilot/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/ArduPilot/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscription","commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArduPilot/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/ArduPilot/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArduPilot/ardupilot/merges","archive_url":"https://api.github.com/repos/ArduPilot/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArduPilot/ardupilot/downloads","issues_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/ArduPilot/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/ArduPilot/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArduPilot/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/ArduPilot/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/ArduPilot/ardupilot/deployments","created_at":"2013-01-09T00:58:52Z","updated_at":"2018-03-09T17:13:37Z","pushed_at":"2018-03-09T20:53:57Z","git_url":"git://github.com/ArduPilot/ardupilot.git","ssh_url":"git@github.com:ArduPilot/ardupilot.git","clone_url":"https://github.com/ArduPilot/ardupilot.git","svn_url":"https://github.com/ArduPilot/ardupilot","homepage":"http://ardupilot.org/","size":98560,"stargazers_count":3049,"watchers_count":3049,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6034,"mirror_url":null,"archived":false,"open_issues_count":1077,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":6034,"open_issues":1077,"watchers":3049,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/7738"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/7738"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/7738/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/7738/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/1c0b524bbd69bde791d139937612c14070a0165e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"EShamaev"}}