How would I implement a heading PID?

Is there a way to make a heading PID using the VEX gyroscope? Is it worth it?

Yes, there is a way. Whether it is worth it depends on a lot of factors, such as its accuracy in your exact implementation and your dependence on the algorithm.

I’m not 100% sure why you would want to do this. Note that while you can have your target/direct input be a heading, your movement will end up being derived from a bearing, as otherwise you would not have the ability to correct error if it goes past the target.

Yes. It works best with a holonomic as it just is on the rotation factor, but the gyro tends to be a bit drifty.

1 degree off over 12 feet is a little bit. sin(1)= 0.0174 so you can be off 2.09 inches at the other end for such a small deviation. At 6 degrees it is off more than a foot at 12 feet of travel. Keeping yourself straight for that mobile goal I think is the main goal here.

In theory this would give you hyper-precise control of the robot as rotation issues can mess up your location pretty darn good. It is a matter of keeping the line straight and figuring out the real coordinates of the map. A tape line would have really helpful here but there is not one. (another game with no use for line following robots) Other options include the ultrasonic sensor or just using the IME’s to figure out how far the robot has turned by the difference in number of clicks. By the delta of the ticks you can measure the radians of rotation which then gets you the displacement off from where you want to be.