{"action":"created","issue":{"url":"https://api.github.com/repos/diydrones/ardupilot/issues/2099","labels_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2099/labels{/name}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2099/comments","events_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2099/events","html_url":"https://github.com/diydrones/ardupilot/pull/2099","id":68076844,"number":2099,"title":"Rounding in AP_Compass (Compass_learn); Build Dataflash on MinGW ","user":{"login":"dgrat","id":4668178,"avatar_url":"https://avatars.githubusercontent.com/u/4668178?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrat","html_url":"https://github.com/dgrat","followers_url":"https://api.github.com/users/dgrat/followers","following_url":"https://api.github.com/users/dgrat/following{/other_user}","gists_url":"https://api.github.com/users/dgrat/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrat/subscriptions","organizations_url":"https://api.github.com/users/dgrat/orgs","repos_url":"https://api.github.com/users/dgrat/repos","events_url":"https://api.github.com/users/dgrat/events{/privacy}","received_events_url":"https://api.github.com/users/dgrat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-13T11:40:57Z","updated_at":"2015-04-14T10:59:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/2099","html_url":"https://github.com/diydrones/ardupilot/pull/2099","diff_url":"https://github.com/diydrones/ardupilot/pull/2099.diff","patch_url":"https://github.com/diydrones/ardupilot/pull/2099.patch"},"body":"Learning in AP_Compass smells like a rounding error and is not well optimized.\r\nYou perform a float to int conversion and add 0.5 because rounding bias should be likely 0.5.\r\nHowever the current implementation will fail for values < 0. \r\nAdditionally I simplified the code, but wasn't testing.\r\n\r\nDataflash is not compiling with MinGW or Win compilers which are not fully POSIX compatible. I tried to add support for MinGW compilation. Not sure, whether this might be helpful later :D"},"comment":{"url":"https://api.github.com/repos/diydrones/ardupilot/issues/comments/92768574","html_url":"https://github.com/diydrones/ardupilot/pull/2099#issuecomment-92768574","issue_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2099","id":92768574,"user":{"login":"dgrat","id":4668178,"avatar_url":"https://avatars.githubusercontent.com/u/4668178?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrat","html_url":"https://github.com/dgrat","followers_url":"https://api.github.com/users/dgrat/followers","following_url":"https://api.github.com/users/dgrat/following{/other_user}","gists_url":"https://api.github.com/users/dgrat/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrat/subscriptions","organizations_url":"https://api.github.com/users/dgrat/orgs","repos_url":"https://api.github.com/users/dgrat/repos","events_url":"https://api.github.com/users/dgrat/events{/privacy}","received_events_url":"https://api.github.com/users/dgrat/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T10:59:50Z","updated_at":"2015-04-14T10:59:50Z","body":"Well I was trying to add cross platform support.\r\nwindows.h or io.h isn't found and Travis doesn't care about macros. \r\nThis is not a mistake of me :D However, maybe cross platform support is overrated. \r\nDataflash was mor a fun patch for me. "}}