Getting velocity from talons and mag encoders on Phoenix Tuner

Hi. I am trying to find my team’s robot’s maximum velocity accurately by seeing how far it travels in feet in a given period. I noticed that using Phoenix Tuner, it outputs RPM for absolute mag encoders. I figured by converting minutes to seconds and rotations to feet from the wheel circumference, I could find max velocity. However, I feel this method is incorrect. If anybody can help me out, I would appreciate it.

Depending on the distance you are driving, this method will only give you your average velocity (assuming you start standing still).
Depending on your use, and how accurate you need it to be, we measured the maximum velocity the robot achieved in a straight run. We did this by, in code, polling the encoder velocity and comparing it to a stored value, if it was bigger, keep it, otherwise keep the stored value.
Keep in mind, if your encoder is not 1:1 with your drive shaft, you will need to account in the difference in rotation rate.

This is correct and will work.

I haven’t used the Phoenix Tuner to measure RPM before, however I don’t see any problem with using it this way.

One rotation of the wheel will make your robot go a distance of the circumference of the wheel. Using this, assuming inches, take the desired RPM * Circumferce and you’ll get inches/minute. From here you can convert directly to feet/second (Divide by 720).

Also, you can relay information to Smartdashboard/Shuffleboard. They allow you to graph the value as well as see the precise value.

One last thing. If the top speed of your bot is mission critical, make sure you have full load while driving meaning the wheels are not spinning freely.

The Plot function of the phoenix tuner can help you observe some of the things you want, also, the self test with your free spinning motors will tell you your encoder rate in units/100ms, which can be converted as well with some algebra.

Otherwise, Brandon’s methodology is essentially the math we use to calculate our max ft/s for each gear.