Team612 / 612-2015

FRC team 612's repository for 2015 season
GNU General Public License v2.0
4 stars 6 forks source link

Fixing angle algorithm in autoalign #191

Closed calvin-godfrey closed 9 years ago

calvin-godfrey commented 9 years ago

Part of issue #177, I did some testing with the function and noticed it returned REALLY small numbers (1e-07), when it should be returning the angle in degrees (0-359). The other branch was already merged, so I decided to make a new branch. The parenthesis fix the math and have it return reasonable numbers.

ZachPerkins1 commented 9 years ago

If you are going to fix the angle algorithm, you probably also want to make it a class (or at least put it in a namespace). I assume that you want it to be a command, and I would do this myself, I just can't see how it would work as a command (being that it has one function, that would only really need to be called once at a time). Maybe it's just a better idea to move it into the AutoAlign command as a private function since that's all it's really used for anyways. It will still be useful, it just needs to be put into the right place.