How can EV3 Gyro sensor drift be handled? EV3 robots can use a Gyro sensor to determine the direction the robot is heading.

The initial conditions are important.  The sensor needs to be still and then the sensor reset.  

However, once in a while the Gyro returns values that drift over time.

What can be done to handle Gyro drift?

Step one would be to remove the drift using the 


Hardware fix:  unplug the gyro sensor, make sure the robot is still, and then plug in the sensor.
Software fix: Gyro Drift Simple Fix which should only need to be run once. 



However, I'm aware of several FLL teams using this fix and even then, once in a while the robot goes crazy, because the Gyro sensor has acquired a drift.

Applying the Simple Fix at the start of every run does not seem to fix it every time.

Is there a way to handle this?
There are two options that I can think of.


Do the "hardware" fix before every run of the robot to reboot the sensor along with the "software" fix to zero it.
Don't use the Angle reading at all. To calibrate the sensor, sample the rate (d/s) 10 times or so and take the average to get the "at rest" rate offset and store it in a variable. Subtract this variable from the rate returned by the sensor to get the actual rate. Integrate the rate over time to calculate the angle. (I haven't actually attempted this myself, but this is how you use, for example, the HiTechnic Gyro sensor since it does not provide an angle).