{"action":"created","comment":{"url":"https://api.github.com/repos/opentx/opentx/pulls/comments/32548703","id":32548703,"diff_hunk":"@@ -1097,3 +1097,53 @@ bool caseInsensitiveLessThan(const QString &s1, const QString &s2)\n {\n   return s1.toLower() < s2.toLower();\n }\n+\n+bool gpsGlitchFilter::isGlitch(double latitude, double longitude) \n+{\n+  if ((fabs(latitude) < 0.1) && (fabs(longitude) < 0.1)) {\n+    return true;\n+  }\n+\n+  if (lastValid) {\n+    if (fabs(latitude - lastLat) > 0.01) {\n+      // qDebug() << \"gpsGlitchFilter(): latitude glitch \" << latitude << lastLat;\n+      if ( ++glitchCount < 10) {\n+        return true; \n+      }\n+    }\n+    if (fabs(longitude - lastLon) > 0.01) {\n+      // qDebug() << \"gpsGlitchFilter(): longitude glitch \" << longitude << lastLon;\n+      if ( ++glitchCount < 10) {\n+        return true; \n+      }\n+    }\n+  }\n+  lastLat = latitude;\n+  lastLon = longitude;\n+  lastValid = true;\n+  glitchCount = 0;\n+  return false;\n+}\n+\n+bool gpsLatLonFilter::isValid(QString latitude, QString longitude)\n+{\n+  if (lastLat == latitude) {\n+    return false;\n+  }\n+  if (lastLon == longitude) {\n+    return false;\n+  }\n+  lastLat = latitude;\n+  lastLon = longitude;\n+  return true;\n+}\n+\n+double toDecimalCoordinate(QString value) \n+{\n+  double temp = int(value.left(value.length()-1).toDouble() / 100);\n+  double result = temp + (value.left(value.length() - 1).toDouble() - temp * 100) / 60.0;\n+  if ((value.right(1) == \"S\") || (value.right(1) == \"W\")) {","path":"companion/src/helpers.cpp","position":49,"original_position":49,"commit_id":"31a651ad1ae273430e57c5acfaad97c7b9f6fd44","original_commit_id":"31a651ad1ae273430e57c5acfaad97c7b9f6fd44","user":{"login":"bsongis","id":5603504,"avatar_url":"https://avatars.githubusercontent.com/u/5603504?v=3","gravatar_id":"","url":"https://api.github.com/users/bsongis","html_url":"https://github.com/bsongis","followers_url":"https://api.github.com/users/bsongis/followers","following_url":"https://api.github.com/users/bsongis/following{/other_user}","gists_url":"https://api.github.com/users/bsongis/gists{/gist_id}","starred_url":"https://api.github.com/users/bsongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsongis/subscriptions","organizations_url":"https://api.github.com/users/bsongis/orgs","repos_url":"https://api.github.com/users/bsongis/repos","events_url":"https://api.github.com/users/bsongis/events{/privacy}","received_events_url":"https://api.github.com/users/bsongis/received_events","type":"User","site_admin":false},"body":"It would be better to compare a char, not a QString!","created_at":"2015-06-16T17:41:49Z","updated_at":"2015-06-16T17:41:49Z","html_url":"https://github.com/opentx/opentx/pull/2366#discussion_r32548703","pull_request_url":"https://api.github.com/repos/opentx/opentx/pulls/2366","_links":{"self":{"href":"https://api.github.com/repos/opentx/opentx/pulls/comments/32548703"},"html":{"href":"https://github.com/opentx/opentx/pull/2366#discussion_r32548703"},"pull_request":{"href":"https://api.github.com/repos/opentx/opentx/pulls/2366"}}},"pull_request":{"url":"https://api.github.com/repos/opentx/opentx/pulls/2366","id":37797215,"html_url":"https://github.com/opentx/opentx/pull/2366","diff_url":"https://github.com/opentx/opentx/pull/2366.diff","patch_url":"https://github.com/opentx/opentx/pull/2366.patch","issue_url":"https://api.github.com/repos/opentx/opentx/issues/2366","number":2366,"state":"open","locked":false,"title":"Fixes #2326: Google Earth export GPS glitch filtering and lat/lon syn…","user":{"login":"projectkk2glider","id":5950438,"avatar_url":"https://avatars.githubusercontent.com/u/5950438?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkk2glider","html_url":"https://github.com/projectkk2glider","followers_url":"https://api.github.com/users/projectkk2glider/followers","following_url":"https://api.github.com/users/projectkk2glider/following{/other_user}","gists_url":"https://api.github.com/users/projectkk2glider/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkk2glider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkk2glider/subscriptions","organizations_url":"https://api.github.com/users/projectkk2glider/orgs","repos_url":"https://api.github.com/users/projectkk2glider/repos","events_url":"https://api.github.com/users/projectkk2glider/events{/privacy}","received_events_url":"https://api.github.com/users/projectkk2glider/received_events","type":"User","site_admin":false},"body":"…chronization\r\n\r\nCloses #2326 \r\n\r\nDone a couple of related things:\r\n* a little code refactoring\r\n* fixes #2326 \r\n* filters out any GPS glitches and zero lat/lon location\r\n* fixed icon path\r\n\r\n","created_at":"2015-06-16T13:55:31Z","updated_at":"2015-06-16T17:41:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"827decdf7860726a95416207468ef9eae0a84a1b","assignee":null,"milestone":{"url":"https://api.github.com/repos/opentx/opentx/milestones/24","html_url":"https://github.com/opentx/opentx/milestones/OpenTX%202.0.18","labels_url":"https://api.github.com/repos/opentx/opentx/milestones/24/labels","id":1095570,"number":24,"title":"OpenTX 2.0.18","description":"","creator":{"login":"bsongis","id":5603504,"avatar_url":"https://avatars.githubusercontent.com/u/5603504?v=3","gravatar_id":"","url":"https://api.github.com/users/bsongis","html_url":"https://github.com/bsongis","followers_url":"https://api.github.com/users/bsongis/followers","following_url":"https://api.github.com/users/bsongis/following{/other_user}","gists_url":"https://api.github.com/users/bsongis/gists{/gist_id}","starred_url":"https://api.github.com/users/bsongis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsongis/subscriptions","organizations_url":"https://api.github.com/users/bsongis/orgs","repos_url":"https://api.github.com/users/bsongis/repos","events_url":"https://api.github.com/users/bsongis/events{/privacy}","received_events_url":"https://api.github.com/users/bsongis/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":9,"state":"open","created_at":"2015-05-04T18:35:52Z","updated_at":"2015-06-16T13:55:46Z","due_on":"2015-07-01T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/opentx/opentx/pulls/2366/commits","review_comments_url":"https://api.github.com/repos/opentx/opentx/pulls/2366/comments","review_comment_url":"https://api.github.com/repos/opentx/opentx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentx/opentx/issues/2366/comments","statuses_url":"https://api.github.com/repos/opentx/opentx/statuses/31a651ad1ae273430e57c5acfaad97c7b9f6fd44","head":{"label":"opentx:projectkk2glider/issue_2326_ge_filtering","ref":"projectkk2glider/issue_2326_ge_filtering","sha":"31a651ad1ae273430e57c5acfaad97c7b9f6fd44","user":{"login":"opentx","id":6073522,"avatar_url":"https://avatars.githubusercontent.com/u/6073522?v=3","gravatar_id":"","url":"https://api.github.com/users/opentx","html_url":"https://github.com/opentx","followers_url":"https://api.github.com/users/opentx/followers","following_url":"https://api.github.com/users/opentx/following{/other_user}","gists_url":"https://api.github.com/users/opentx/gists{/gist_id}","starred_url":"https://api.github.com/users/opentx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentx/subscriptions","organizations_url":"https://api.github.com/users/opentx/orgs","repos_url":"https://api.github.com/users/opentx/repos","events_url":"https://api.github.com/users/opentx/events{/privacy}","received_events_url":"https://api.github.com/users/opentx/received_events","type":"Organization","site_admin":false},"repo":{"id":14794708,"name":"opentx","full_name":"opentx/opentx","owner":{"login":"opentx","id":6073522,"avatar_url":"https://avatars.githubusercontent.com/u/6073522?v=3","gravatar_id":"","url":"https://api.github.com/users/opentx","html_url":"https://github.com/opentx","followers_url":"https://api.github.com/users/opentx/followers","following_url":"https://api.github.com/users/opentx/following{/other_user}","gists_url":"https://api.github.com/users/opentx/gists{/gist_id}","starred_url":"https://api.github.com/users/opentx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentx/subscriptions","organizations_url":"https://api.github.com/users/opentx/orgs","repos_url":"https://api.github.com/users/opentx/repos","events_url":"https://api.github.com/users/opentx/events{/privacy}","received_events_url":"https://api.github.com/users/opentx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentx/opentx","description":"OpenTX custom firmware for Transmitters","fork":false,"url":"https://api.github.com/repos/opentx/opentx","forks_url":"https://api.github.com/repos/opentx/opentx/forks","keys_url":"https://api.github.com/repos/opentx/opentx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentx/opentx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentx/opentx/teams","hooks_url":"https://api.github.com/repos/opentx/opentx/hooks","issue_events_url":"https://api.github.com/repos/opentx/opentx/issues/events{/number}","events_url":"https://api.github.com/repos/opentx/opentx/events","assignees_url":"https://api.github.com/repos/opentx/opentx/assignees{/user}","branches_url":"https://api.github.com/repos/opentx/opentx/branches{/branch}","tags_url":"https://api.github.com/repos/opentx/opentx/tags","blobs_url":"https://api.github.com/repos/opentx/opentx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentx/opentx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentx/opentx/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentx/opentx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentx/opentx/statuses/{sha}","languages_url":"https://api.github.com/repos/opentx/opentx/languages","stargazers_url":"https://api.github.com/repos/opentx/opentx/stargazers","contributors_url":"https://api.github.com/repos/opentx/opentx/contributors","subscribers_url":"https://api.github.com/repos/opentx/opentx/subscribers","subscription_url":"https://api.github.com/repos/opentx/opentx/subscription","commits_url":"https://api.github.com/repos/opentx/opentx/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentx/opentx/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentx/opentx/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentx/opentx/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentx/opentx/contents/{+path}","compare_url":"https://api.github.com/repos/opentx/opentx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentx/opentx/merges","archive_url":"https://api.github.com/repos/opentx/opentx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentx/opentx/downloads","issues_url":"https://api.github.com/repos/opentx/opentx/issues{/number}","pulls_url":"https://api.github.com/repos/opentx/opentx/pulls{/number}","milestones_url":"https://api.github.com/repos/opentx/opentx/milestones{/number}","notifications_url":"https://api.github.com/repos/opentx/opentx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentx/opentx/labels{/name}","releases_url":"https://api.github.com/repos/opentx/opentx/releases{/id}","created_at":"2013-11-29T07:02:56Z","updated_at":"2015-06-14T21:03:20Z","pushed_at":"2015-06-16T13:55:31Z","git_url":"git://github.com/opentx/opentx.git","ssh_url":"git@github.com:opentx/opentx.git","clone_url":"https://github.com/opentx/opentx.git","svn_url":"https://github.com/opentx/opentx","homepage":"","size":160857,"stargazers_count":240,"watchers_count":240,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":248,"forks":142,"open_issues":248,"watchers":240,"default_branch":"next"}},"base":{"label":"opentx:master","ref":"master","sha":"31924c1a23904b3d6f78e74c8fd579cd11386894","user":{"login":"opentx","id":6073522,"avatar_url":"https://avatars.githubusercontent.com/u/6073522?v=3","gravatar_id":"","url":"https://api.github.com/users/opentx","html_url":"https://github.com/opentx","followers_url":"https://api.github.com/users/opentx/followers","following_url":"https://api.github.com/users/opentx/following{/other_user}","gists_url":"https://api.github.com/users/opentx/gists{/gist_id}","starred_url":"https://api.github.com/users/opentx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentx/subscriptions","organizations_url":"https://api.github.com/users/opentx/orgs","repos_url":"https://api.github.com/users/opentx/repos","events_url":"https://api.github.com/users/opentx/events{/privacy}","received_events_url":"https://api.github.com/users/opentx/received_events","type":"Organization","site_admin":false},"repo":{"id":14794708,"name":"opentx","full_name":"opentx/opentx","owner":{"login":"opentx","id":6073522,"avatar_url":"https://avatars.githubusercontent.com/u/6073522?v=3","gravatar_id":"","url":"https://api.github.com/users/opentx","html_url":"https://github.com/opentx","followers_url":"https://api.github.com/users/opentx/followers","following_url":"https://api.github.com/users/opentx/following{/other_user}","gists_url":"https://api.github.com/users/opentx/gists{/gist_id}","starred_url":"https://api.github.com/users/opentx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentx/subscriptions","organizations_url":"https://api.github.com/users/opentx/orgs","repos_url":"https://api.github.com/users/opentx/repos","events_url":"https://api.github.com/users/opentx/events{/privacy}","received_events_url":"https://api.github.com/users/opentx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentx/opentx","description":"OpenTX custom firmware for Transmitters","fork":false,"url":"https://api.github.com/repos/opentx/opentx","forks_url":"https://api.github.com/repos/opentx/opentx/forks","keys_url":"https://api.github.com/repos/opentx/opentx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentx/opentx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentx/opentx/teams","hooks_url":"https://api.github.com/repos/opentx/opentx/hooks","issue_events_url":"https://api.github.com/repos/opentx/opentx/issues/events{/number}","events_url":"https://api.github.com/repos/opentx/opentx/events","assignees_url":"https://api.github.com/repos/opentx/opentx/assignees{/user}","branches_url":"https://api.github.com/repos/opentx/opentx/branches{/branch}","tags_url":"https://api.github.com/repos/opentx/opentx/tags","blobs_url":"https://api.github.com/repos/opentx/opentx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentx/opentx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentx/opentx/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentx/opentx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentx/opentx/statuses/{sha}","languages_url":"https://api.github.com/repos/opentx/opentx/languages","stargazers_url":"https://api.github.com/repos/opentx/opentx/stargazers","contributors_url":"https://api.github.com/repos/opentx/opentx/contributors","subscribers_url":"https://api.github.com/repos/opentx/opentx/subscribers","subscription_url":"https://api.github.com/repos/opentx/opentx/subscription","commits_url":"https://api.github.com/repos/opentx/opentx/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentx/opentx/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentx/opentx/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentx/opentx/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentx/opentx/contents/{+path}","compare_url":"https://api.github.com/repos/opentx/opentx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentx/opentx/merges","archive_url":"https://api.github.com/repos/opentx/opentx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentx/opentx/downloads","issues_url":"https://api.github.com/repos/opentx/opentx/issues{/number}","pulls_url":"https://api.github.com/repos/opentx/opentx/pulls{/number}","milestones_url":"https://api.github.com/repos/opentx/opentx/milestones{/number}","notifications_url":"https://api.github.com/repos/opentx/opentx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentx/opentx/labels{/name}","releases_url":"https://api.github.com/repos/opentx/opentx/releases{/id}","created_at":"2013-11-29T07:02:56Z","updated_at":"2015-06-14T21:03:20Z","pushed_at":"2015-06-16T13:55:31Z","git_url":"git://github.com/opentx/opentx.git","ssh_url":"git@github.com:opentx/opentx.git","clone_url":"https://github.com/opentx/opentx.git","svn_url":"https://github.com/opentx/opentx","homepage":"","size":160857,"stargazers_count":240,"watchers_count":240,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":142,"mirror_url":null,"open_issues_count":248,"forks":142,"open_issues":248,"watchers":240,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/opentx/opentx/pulls/2366"},"html":{"href":"https://github.com/opentx/opentx/pull/2366"},"issue":{"href":"https://api.github.com/repos/opentx/opentx/issues/2366"},"comments":{"href":"https://api.github.com/repos/opentx/opentx/issues/2366/comments"},"review_comments":{"href":"https://api.github.com/repos/opentx/opentx/pulls/2366/comments"},"review_comment":{"href":"https://api.github.com/repos/opentx/opentx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentx/opentx/pulls/2366/commits"},"statuses":{"href":"https://api.github.com/repos/opentx/opentx/statuses/31a651ad1ae273430e57c5acfaad97c7b9f6fd44"}}}}