{"action":"created","issue":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1372","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1372/labels{/name}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1372/comments","events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1372/events","html_url":"https://github.com/cleanflight/cleanflight/issues/1372","id":109761095,"number":1372,"title":"Improve Mag calibration","user":{"login":"HaukeRa","id":14967448,"avatar_url":"https://avatars.githubusercontent.com/u/14967448?v=3","gravatar_id":"","url":"https://api.github.com/users/HaukeRa","html_url":"https://github.com/HaukeRa","followers_url":"https://api.github.com/users/HaukeRa/followers","following_url":"https://api.github.com/users/HaukeRa/following{/other_user}","gists_url":"https://api.github.com/users/HaukeRa/gists{/gist_id}","starred_url":"https://api.github.com/users/HaukeRa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaukeRa/subscriptions","organizations_url":"https://api.github.com/users/HaukeRa/orgs","repos_url":"https://api.github.com/users/HaukeRa/repos","events_url":"https://api.github.com/users/HaukeRa/events{/privacy}","received_events_url":"https://api.github.com/users/HaukeRa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":46,"created_at":"2015-10-05T09:36:03Z","updated_at":"2015-10-19T11:18:34Z","closed_at":null,"body":"The Magnetometer calibration relies on the rotation around all axes. It's easy to miss a needed point during calibration. \r\n\r\nThere is an application note which fits a sphere to data points, and using its center as offset values. \r\n\r\nIt is way more robust than the current solution as it does not require a specific rotation pattern. \r\n\r\nI already implemented this code for a different project, where I'm not allowed to copy it from, but I would help reimplement it.\r\n\r\nThe method involves solving a 4x4 matrix but is formulated to use constant memory. (4x4 matrix and two 4x1 vectors)"},"comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments/149187816","html_url":"https://github.com/cleanflight/cleanflight/issues/1372#issuecomment-149187816","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1372","id":149187816,"user":{"login":"HaukeRa","id":14967448,"avatar_url":"https://avatars.githubusercontent.com/u/14967448?v=3","gravatar_id":"","url":"https://api.github.com/users/HaukeRa","html_url":"https://github.com/HaukeRa","followers_url":"https://api.github.com/users/HaukeRa/followers","following_url":"https://api.github.com/users/HaukeRa/following{/other_user}","gists_url":"https://api.github.com/users/HaukeRa/gists{/gist_id}","starred_url":"https://api.github.com/users/HaukeRa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaukeRa/subscriptions","organizations_url":"https://api.github.com/users/HaukeRa/orgs","repos_url":"https://api.github.com/users/HaukeRa/repos","events_url":"https://api.github.com/users/HaukeRa/events{/privacy}","received_events_url":"https://api.github.com/users/HaukeRa/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T11:18:34Z","updated_at":"2015-10-19T11:18:34Z","body":"Preliminary Results, full data will follow later:\r\n\r\nFinished Mag calib: [-105.491661,104.455223,-53.381275]<\\n>\r\nMagnetic field strength: 53.140007<\\n>\r\n\r\nFinished Mag calib: [-105.053452,105.288170,-54.950687]<\\n>\r\nMagnetic field strength: 52.492058<\\n>\r\n\r\nFinished Mag calib: [-104.632370,104.323296,-53.791111]<\\n>\r\nMagnetic field strength: 52.619766<\\n>\r\n\r\nFinished Mag calib: [-106.943138,103.560295,-52.033485]<\\n>\r\nMagnetic field strength: 52.990677<\\n>\r\n\r\nFinished Mag calib: [-103.419296,105.593552,-53.504028]<\\n>\r\nMagnetic field strength: 52.922459<\\n>\r\n\r\nFinished Mag calib: [-106.868736,102.695015,-52.921749]<\\n>\r\nMagnetic field strength: 52.298885<\\n>\r\n\r\nFinished Mag calib: [-104.528847,104.413376,-53.157269]<\\n>\r\nMagnetic field strength: 52.217995<\\n>\r\n\r\nFinished Mag calib: [-103.570480,105.902817,-52.655590]<\\n>\r\nMagnetic field strength: 52.160889<\\n>\r\n\r\nFinished Mag calib: [-106.554375,104.374329,-52.866940]<\\n>\r\nMagnetic field strength: 52.732746<\\n>\r\n\r\nFinished Mag calib: [-104.496002,102.057251,-54.522366]<\\n>\r\nMagnetic field strength: 51.343071<\\n>\r\n\r\nSigma^2 = (1.6488, 1.4893, 0.7575)\r\n\r\nSigma = (1.2841, 1.2204, 0.8703)\r\n\r\nTaken 64 samples each try. Samples were chosen will be denoted in the logs.\r\n\r\n\r\n"}}