{"action":"created","issue":{"url":"https://api.github.com/repos/rpavlik/wiiuse/issues/82","repository_url":"https://api.github.com/repos/rpavlik/wiiuse","labels_url":"https://api.github.com/repos/rpavlik/wiiuse/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/rpavlik/wiiuse/issues/82/comments","events_url":"https://api.github.com/repos/rpavlik/wiiuse/issues/82/events","html_url":"https://github.com/rpavlik/wiiuse/issues/82","id":181783404,"number":82,"title":"Accelerometer Pitch Giving Incorrect Values","user":{"login":"alec100-94","id":6452862,"avatar_url":"https://avatars.githubusercontent.com/u/6452862?v=3","gravatar_id":"","url":"https://api.github.com/users/alec100-94","html_url":"https://github.com/alec100-94","followers_url":"https://api.github.com/users/alec100-94/followers","following_url":"https://api.github.com/users/alec100-94/following{/other_user}","gists_url":"https://api.github.com/users/alec100-94/gists{/gist_id}","starred_url":"https://api.github.com/users/alec100-94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alec100-94/subscriptions","organizations_url":"https://api.github.com/users/alec100-94/orgs","repos_url":"https://api.github.com/users/alec100-94/repos","events_url":"https://api.github.com/users/alec100-94/events{/privacy}","received_events_url":"https://api.github.com/users/alec100-94/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-07T22:51:53Z","updated_at":"2016-10-08T00:52:02Z","closed_at":null,"body":"I am unsure if this is intentional or not but in the current (master) version, the pitch from the accelerometer gives values between -90 and 90, and then wraps around instead of between the -180 and 180 as it is supposed to. I identified the problem (in dynamics.c), and changed it from\r\n`float pitch = RAD_TO_DEGREE(atan2f(y, sqrtf(x*x + z*z)));` to `float pitch = RAD_TO_DEGREE(atan2f(y, z));`, which works as expected, I am just reporting this as an issue I had, it is fixed for me now, but I am unsure whether this change should be incorporated into the master version or not (cannot see any possible reason for current version). Also could not figure out how to get motion plus orientation to work properly (though not sure I need it for what I'm trying to do)."},"comment":{"url":"https://api.github.com/repos/rpavlik/wiiuse/issues/comments/252391615","html_url":"https://github.com/rpavlik/wiiuse/issues/82#issuecomment-252391615","issue_url":"https://api.github.com/repos/rpavlik/wiiuse/issues/82","id":252391615,"user":{"login":"alec100-94","id":6452862,"avatar_url":"https://avatars.githubusercontent.com/u/6452862?v=3","gravatar_id":"","url":"https://api.github.com/users/alec100-94","html_url":"https://github.com/alec100-94","followers_url":"https://api.github.com/users/alec100-94/followers","following_url":"https://api.github.com/users/alec100-94/following{/other_user}","gists_url":"https://api.github.com/users/alec100-94/gists{/gist_id}","starred_url":"https://api.github.com/users/alec100-94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alec100-94/subscriptions","organizations_url":"https://api.github.com/users/alec100-94/orgs","repos_url":"https://api.github.com/users/alec100-94/repos","events_url":"https://api.github.com/users/alec100-94/events{/privacy}","received_events_url":"https://api.github.com/users/alec100-94/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T00:52:02Z","updated_at":"2016-10-08T00:52:02Z","body":"Ok, understand I think, but the change I made does return a value between -180 and +180 and allows for a full 360 degrees of motion (which is what I was going for), in the same way as the roll works (and as the comment says). I am mapping Wii remotes to the Vive wands in a combination with LEAP Motion, so full accuracy of the controller movement is key.  I might try and track the MotionPlus gyro over time, as it would be useful to have more accurate readings and be able to track the yaw. Thanks for the Help."}}
{"actor":{"display_login":"alec100-94"}}