{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/uhwsin/hackrf/pulls/1","id":55902005,"html_url":"https://github.com/uhwsin/hackrf/pull/1","diff_url":"https://github.com/uhwsin/hackrf/pull/1.diff","patch_url":"https://github.com/uhwsin/hackrf/pull/1.patch","issue_url":"https://api.github.com/repos/uhwsin/hackrf/issues/1","number":1,"state":"open","locked":false,"title":"Update hackrf_transfer.c","user":{"login":"uhwsin","id":16629629,"avatar_url":"https://avatars.githubusercontent.com/u/16629629?v=3","gravatar_id":"","url":"https://api.github.com/users/uhwsin","html_url":"https://github.com/uhwsin","followers_url":"https://api.github.com/users/uhwsin/followers","following_url":"https://api.github.com/users/uhwsin/following{/other_user}","gists_url":"https://api.github.com/users/uhwsin/gists{/gist_id}","starred_url":"https://api.github.com/users/uhwsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uhwsin/subscriptions","organizations_url":"https://api.github.com/users/uhwsin/orgs","repos_url":"https://api.github.com/users/uhwsin/repos","events_url":"https://api.github.com/users/uhwsin/events{/privacy}","received_events_url":"https://api.github.com/users/uhwsin/received_events","type":"User","site_admin":false},"body":"Intro:\r\nSome of the Hackrf board use a bad performance crystal, it will cause some program can't work---such as GNSS(GPS) simulation.  Most GPS receiver can capture the satellite\r\nwhen the doppler within 10KHz, but 10ppm bias of the crystal will cause  15Khz doppler.  And my hackrf board uses a 16ppm crystal :(  normal\r\nOf course, I can replace the crystal or use a external clock. But for most people, add a ppm correct function to hackrf_transfer is useful.\r\nHow to use:\r\n1, measure your crystal's error\r\nYou can use a precision  counter to measure it.\r\nConnect the hackrf's \"clock out\" to the counter, get the frequency Fh, then ,\r\nppm = (Fh - 10000000)/10 \r\n \r\nYou can use a standard clock source such as OCXO, TCXO, or Atom Clock, and a counter\r\nto measure the crystal error too.\r\n\r\n2, add an argument \"-C ppm \" when you use hackrf_transfer.\r\n\r\nEg. , your  crystal error is -8ppm ( In other words , your clock is slower than the standard clock), then you should add \"-C -8\" follow the hackrf_transfer command.\r\n\r\nHope you can understand my poor English:)\r\n\r\n--------------------------\r\nThanks to Michael Ossmann;\r\nThanks to Jared Boone ;\r\nThanks to Benjamin Vernoux ;\r\nThanks to GPL.","created_at":"2016-01-13T14:12:54Z","updated_at":"2016-01-13T14:12:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uhwsin/hackrf/pulls/1/commits","review_comments_url":"https://api.github.com/repos/uhwsin/hackrf/pulls/1/comments","review_comment_url":"https://api.github.com/repos/uhwsin/hackrf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uhwsin/hackrf/issues/1/comments","statuses_url":"https://api.github.com/repos/uhwsin/hackrf/statuses/fed60c571c5bacedf4865436927c0925dd2eb6f9","head":{"label":"uhwsin:uhwsin-hackrf_transfer_crystal_correct-1","ref":"uhwsin-hackrf_transfer_crystal_correct-1","sha":"fed60c571c5bacedf4865436927c0925dd2eb6f9","user":{"login":"uhwsin","id":16629629,"avatar_url":"https://avatars.githubusercontent.com/u/16629629?v=3","gravatar_id":"","url":"https://api.github.com/users/uhwsin","html_url":"https://github.com/uhwsin","followers_url":"https://api.github.com/users/uhwsin/followers","following_url":"https://api.github.com/users/uhwsin/following{/other_user}","gists_url":"https://api.github.com/users/uhwsin/gists{/gist_id}","starred_url":"https://api.github.com/users/uhwsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uhwsin/subscriptions","organizations_url":"https://api.github.com/users/uhwsin/orgs","repos_url":"https://api.github.com/users/uhwsin/repos","events_url":"https://api.github.com/users/uhwsin/events{/privacy}","received_events_url":"https://api.github.com/users/uhwsin/received_events","type":"User","site_admin":false},"repo":{"id":49577120,"name":"hackrf","full_name":"uhwsin/hackrf","owner":{"login":"uhwsin","id":16629629,"avatar_url":"https://avatars.githubusercontent.com/u/16629629?v=3","gravatar_id":"","url":"https://api.github.com/users/uhwsin","html_url":"https://github.com/uhwsin","followers_url":"https://api.github.com/users/uhwsin/followers","following_url":"https://api.github.com/users/uhwsin/following{/other_user}","gists_url":"https://api.github.com/users/uhwsin/gists{/gist_id}","starred_url":"https://api.github.com/users/uhwsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uhwsin/subscriptions","organizations_url":"https://api.github.com/users/uhwsin/orgs","repos_url":"https://api.github.com/users/uhwsin/repos","events_url":"https://api.github.com/users/uhwsin/events{/privacy}","received_events_url":"https://api.github.com/users/uhwsin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uhwsin/hackrf","description":"low cost software radio platform","fork":true,"url":"https://api.github.com/repos/uhwsin/hackrf","forks_url":"https://api.github.com/repos/uhwsin/hackrf/forks","keys_url":"https://api.github.com/repos/uhwsin/hackrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uhwsin/hackrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uhwsin/hackrf/teams","hooks_url":"https://api.github.com/repos/uhwsin/hackrf/hooks","issue_events_url":"https://api.github.com/repos/uhwsin/hackrf/issues/events{/number}","events_url":"https://api.github.com/repos/uhwsin/hackrf/events","assignees_url":"https://api.github.com/repos/uhwsin/hackrf/assignees{/user}","branches_url":"https://api.github.com/repos/uhwsin/hackrf/branches{/branch}","tags_url":"https://api.github.com/repos/uhwsin/hackrf/tags","blobs_url":"https://api.github.com/repos/uhwsin/hackrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uhwsin/hackrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uhwsin/hackrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/uhwsin/hackrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uhwsin/hackrf/statuses/{sha}","languages_url":"https://api.github.com/repos/uhwsin/hackrf/languages","stargazers_url":"https://api.github.com/repos/uhwsin/hackrf/stargazers","contributors_url":"https://api.github.com/repos/uhwsin/hackrf/contributors","subscribers_url":"https://api.github.com/repos/uhwsin/hackrf/subscribers","subscription_url":"https://api.github.com/repos/uhwsin/hackrf/subscription","commits_url":"https://api.github.com/repos/uhwsin/hackrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/uhwsin/hackrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/uhwsin/hackrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/uhwsin/hackrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/uhwsin/hackrf/contents/{+path}","compare_url":"https://api.github.com/repos/uhwsin/hackrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uhwsin/hackrf/merges","archive_url":"https://api.github.com/repos/uhwsin/hackrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uhwsin/hackrf/downloads","issues_url":"https://api.github.com/repos/uhwsin/hackrf/issues{/number}","pulls_url":"https://api.github.com/repos/uhwsin/hackrf/pulls{/number}","milestones_url":"https://api.github.com/repos/uhwsin/hackrf/milestones{/number}","notifications_url":"https://api.github.com/repos/uhwsin/hackrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uhwsin/hackrf/labels{/name}","releases_url":"https://api.github.com/repos/uhwsin/hackrf/releases{/id}","created_at":"2016-01-13T13:58:30Z","updated_at":"2016-01-13T13:58:33Z","pushed_at":"2016-01-13T14:12:42Z","git_url":"git://github.com/uhwsin/hackrf.git","ssh_url":"git@github.com:uhwsin/hackrf.git","clone_url":"https://github.com/uhwsin/hackrf.git","svn_url":"https://github.com/uhwsin/hackrf","homepage":"","size":25100,"stargazers_count":0,"watchers_count":0,"language":"KiCad","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"uhwsin:master","ref":"master","sha":"fa6f29d742347ad8bca04b561c56da2ade092ea3","user":{"login":"uhwsin","id":16629629,"avatar_url":"https://avatars.githubusercontent.com/u/16629629?v=3","gravatar_id":"","url":"https://api.github.com/users/uhwsin","html_url":"https://github.com/uhwsin","followers_url":"https://api.github.com/users/uhwsin/followers","following_url":"https://api.github.com/users/uhwsin/following{/other_user}","gists_url":"https://api.github.com/users/uhwsin/gists{/gist_id}","starred_url":"https://api.github.com/users/uhwsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uhwsin/subscriptions","organizations_url":"https://api.github.com/users/uhwsin/orgs","repos_url":"https://api.github.com/users/uhwsin/repos","events_url":"https://api.github.com/users/uhwsin/events{/privacy}","received_events_url":"https://api.github.com/users/uhwsin/received_events","type":"User","site_admin":false},"repo":{"id":49577120,"name":"hackrf","full_name":"uhwsin/hackrf","owner":{"login":"uhwsin","id":16629629,"avatar_url":"https://avatars.githubusercontent.com/u/16629629?v=3","gravatar_id":"","url":"https://api.github.com/users/uhwsin","html_url":"https://github.com/uhwsin","followers_url":"https://api.github.com/users/uhwsin/followers","following_url":"https://api.github.com/users/uhwsin/following{/other_user}","gists_url":"https://api.github.com/users/uhwsin/gists{/gist_id}","starred_url":"https://api.github.com/users/uhwsin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uhwsin/subscriptions","organizations_url":"https://api.github.com/users/uhwsin/orgs","repos_url":"https://api.github.com/users/uhwsin/repos","events_url":"https://api.github.com/users/uhwsin/events{/privacy}","received_events_url":"https://api.github.com/users/uhwsin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uhwsin/hackrf","description":"low cost software radio platform","fork":true,"url":"https://api.github.com/repos/uhwsin/hackrf","forks_url":"https://api.github.com/repos/uhwsin/hackrf/forks","keys_url":"https://api.github.com/repos/uhwsin/hackrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uhwsin/hackrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uhwsin/hackrf/teams","hooks_url":"https://api.github.com/repos/uhwsin/hackrf/hooks","issue_events_url":"https://api.github.com/repos/uhwsin/hackrf/issues/events{/number}","events_url":"https://api.github.com/repos/uhwsin/hackrf/events","assignees_url":"https://api.github.com/repos/uhwsin/hackrf/assignees{/user}","branches_url":"https://api.github.com/repos/uhwsin/hackrf/branches{/branch}","tags_url":"https://api.github.com/repos/uhwsin/hackrf/tags","blobs_url":"https://api.github.com/repos/uhwsin/hackrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uhwsin/hackrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uhwsin/hackrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/uhwsin/hackrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uhwsin/hackrf/statuses/{sha}","languages_url":"https://api.github.com/repos/uhwsin/hackrf/languages","stargazers_url":"https://api.github.com/repos/uhwsin/hackrf/stargazers","contributors_url":"https://api.github.com/repos/uhwsin/hackrf/contributors","subscribers_url":"https://api.github.com/repos/uhwsin/hackrf/subscribers","subscription_url":"https://api.github.com/repos/uhwsin/hackrf/subscription","commits_url":"https://api.github.com/repos/uhwsin/hackrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/uhwsin/hackrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/uhwsin/hackrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/uhwsin/hackrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/uhwsin/hackrf/contents/{+path}","compare_url":"https://api.github.com/repos/uhwsin/hackrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uhwsin/hackrf/merges","archive_url":"https://api.github.com/repos/uhwsin/hackrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uhwsin/hackrf/downloads","issues_url":"https://api.github.com/repos/uhwsin/hackrf/issues{/number}","pulls_url":"https://api.github.com/repos/uhwsin/hackrf/pulls{/number}","milestones_url":"https://api.github.com/repos/uhwsin/hackrf/milestones{/number}","notifications_url":"https://api.github.com/repos/uhwsin/hackrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uhwsin/hackrf/labels{/name}","releases_url":"https://api.github.com/repos/uhwsin/hackrf/releases{/id}","created_at":"2016-01-13T13:58:30Z","updated_at":"2016-01-13T13:58:33Z","pushed_at":"2016-01-13T14:12:42Z","git_url":"git://github.com/uhwsin/hackrf.git","ssh_url":"git@github.com:uhwsin/hackrf.git","clone_url":"https://github.com/uhwsin/hackrf.git","svn_url":"https://github.com/uhwsin/hackrf","homepage":"","size":25100,"stargazers_count":0,"watchers_count":0,"language":"KiCad","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uhwsin/hackrf/pulls/1"},"html":{"href":"https://github.com/uhwsin/hackrf/pull/1"},"issue":{"href":"https://api.github.com/repos/uhwsin/hackrf/issues/1"},"comments":{"href":"https://api.github.com/repos/uhwsin/hackrf/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/uhwsin/hackrf/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/uhwsin/hackrf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uhwsin/hackrf/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/uhwsin/hackrf/statuses/fed60c571c5bacedf4865436927c0925dd2eb6f9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":25,"deletions":1,"changed_files":1}}