{"action":"opened","issue":{"url":"https://api.github.com/repos/asmcup/runtime/issues/127","repository_url":"https://api.github.com/repos/asmcup/runtime","labels_url":"https://api.github.com/repos/asmcup/runtime/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/asmcup/runtime/issues/127/comments","events_url":"https://api.github.com/repos/asmcup/runtime/issues/127/events","html_url":"https://github.com/asmcup/runtime/issues/127","id":186784007,"number":127,"title":"Compass Too Precise","user":{"login":"enusbaum","id":1139047,"avatar_url":"https://avatars.githubusercontent.com/u/1139047?v=3","gravatar_id":"","url":"https://api.github.com/users/enusbaum","html_url":"https://github.com/enusbaum","followers_url":"https://api.github.com/users/enusbaum/followers","following_url":"https://api.github.com/users/enusbaum/following{/other_user}","gists_url":"https://api.github.com/users/enusbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/enusbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enusbaum/subscriptions","organizations_url":"https://api.github.com/users/enusbaum/orgs","repos_url":"https://api.github.com/users/enusbaum/repos","events_url":"https://api.github.com/users/enusbaum/events{/privacy}","received_events_url":"https://api.github.com/users/enusbaum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-02T12:10:42Z","updated_at":"2016-11-02T12:10:42Z","closed_at":null,"body":"I was working on a patch locally but wanted to get folks opinion on this. \r\n\r\nCurrently the compass returns a full float with several decimal places of precision. The use cases I've found for the compass thus far and how those solutions have worked:\r\n\r\n**Which direction am I facing**\r\nBeen able to compare if_gtf and if_ltf known coordinates for \"north\", \"south\", etc. Seems to work alright.\r\n\r\n**Which direction am I facing so I can return to that direction after turning or \"scanning\"**\r\nThis has been a problem. Because of the decimal precision returned from the compass, the best I could come up with is divide my current position by the known previous position and see the % difference and try and stop within a known % of that point. The issue is the robot turning at even 0.2 will probably blow past the EXACT point previously captured.\r\n\r\nSo I'm thinking this could be fixed two ways:\r\n\r\n**Easy Fix**\r\nLower decimal precision of compass to 2 decimal places. This should be a better \"approximation\" of direction and allow people a better opportunity to be able to return to a known direction while turning.\r\n\r\n**Harder Fix**\r\nRefactor the compass to return the bot direction in 360-degree value. with 0 being \"North\", 90 being \"East\" and so on. With no decimal notation and known, common coordinates, it would be much easier to orient the bot.\r\n\r\nThoughts?"}}
{"actor":{"display_login":"enusbaum"}}