tl;dr: How do you read in the value of the angle the joystick is pointing or the “true” value of the joystick
I am currently wondering about how to get the angle the joystick is point. To clarify, if you were to push the joystick up it would give you 90 degrees, if you pushed it to the left it would give you 180 degrees, and if you pushed it to the right it would give you 0 or 360 degrees. This seemed simple, just get the two joystick values and use either sin, cos, or tan to find the angle using SOH CAH TOA but that kept giving me strange readings at times. Upon further inspection I saw something weird; the values of the x and y axis would stop at 127. This meant that if I was slowly pushing the joystick up the values would reach 127 and stop going up even though I could still push the joystick up more. So if I went around the circumference of the circle with the joystick the Y would change but the X would be at 127. This meant that we could not use those values that we were reading from VexRT since they were not in relation to one another. From here I do not know what to do. I have looked for a built in function that gave me the angle but have not found one and I have looked for another way to get values from the Joystick but again did not find a way yet. So now I am asking the forums to see if any one had any ideas.
I am using RobotC