{"action":"created","issue":{"url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/265","labels_url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/265/labels{/name}","comments_url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/265/comments","events_url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/265/events","html_url":"https://github.com/swift-nav/libswiftnav/issues/265","id":123402553,"number":265,"title":"Ideas on GPS week rollover","user":{"login":"ljbade","id":1215089,"avatar_url":"https://avatars.githubusercontent.com/u/1215089?v=3","gravatar_id":"","url":"https://api.github.com/users/ljbade","html_url":"https://github.com/ljbade","followers_url":"https://api.github.com/users/ljbade/followers","following_url":"https://api.github.com/users/ljbade/following{/other_user}","gists_url":"https://api.github.com/users/ljbade/gists{/gist_id}","starred_url":"https://api.github.com/users/ljbade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljbade/subscriptions","organizations_url":"https://api.github.com/users/ljbade/orgs","repos_url":"https://api.github.com/users/ljbade/repos","events_url":"https://api.github.com/users/ljbade/events{/privacy}","received_events_url":"https://api.github.com/users/ljbade/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T03:01:58Z","updated_at":"2015-12-22T03:45:23Z","closed_at":null,"body":"The next GPS rollover is in 2019, which isn't that far away and likely in the lifetime of current receivers.\r\n\r\nThe cause is that GPS WN is broadcast to 10 bits so is mod 1024 of the real WN, which is currently between 1024-2047 since the last rollover in 1999.\r\n\r\nCurrently we hardcode that we are in 1024-2047, so in WN 2048 the receiver will warp back to 1999. Many of our time functions will also break as they do not check for roll over.\r\n\r\nAt a minimum the current WN range should be a setting to allow users to update it in the future.\r\n\r\nWe should also encode the compile date of the firmware to allow us to compute a valid WN for 20 years after shipping.\r\n\r\nFinally we could have the Piksi console update these settings from the local computer's clock, so that a Piksi will have a valid date for 20 years after connecting it to the console.\r\n\r\nFor an example of how u-blox handle this, read https://forum.u-blox.com/index.php?qa=60&qa_1=what-week-rollover-roll-over-and-handled-blox-gnss-receivers\r\n\r\n/cc @mookerji @fnoble "},"comment":{"url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/comments/166497913","html_url":"https://github.com/swift-nav/libswiftnav/issues/265#issuecomment-166497913","issue_url":"https://api.github.com/repos/swift-nav/libswiftnav/issues/265","id":166497913,"user":{"login":"ljbade","id":1215089,"avatar_url":"https://avatars.githubusercontent.com/u/1215089?v=3","gravatar_id":"","url":"https://api.github.com/users/ljbade","html_url":"https://github.com/ljbade","followers_url":"https://api.github.com/users/ljbade/followers","following_url":"https://api.github.com/users/ljbade/following{/other_user}","gists_url":"https://api.github.com/users/ljbade/gists{/gist_id}","starred_url":"https://api.github.com/users/ljbade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljbade/subscriptions","organizations_url":"https://api.github.com/users/ljbade/orgs","repos_url":"https://api.github.com/users/ljbade/repos","events_url":"https://api.github.com/users/ljbade/events{/privacy}","received_events_url":"https://api.github.com/users/ljbade/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T03:45:23Z","updated_at":"2015-12-22T03:45:23Z","body":"A similar technique is mentioned in http://gauss.gge.unb.ca/gpsworld/gpsworld.november98.pdf\r\n\r\nThey also point out a real time clock is useful for this too."}}