mvPerDegreePerSecond

Gyro

Gyro

setRateConstant

public void setRateConstant(double mvPerDegreePerSecond)

Set the scale factor of the gyro, in millivolts per degree per
second. The nominal value is 5. You can test this by rotating
the gyro 360 degrees (physically) and comparing it to the
calculated value. If the sensor says N degrees, set the
parameter to 5*N/360

calibrate

public double calibrate(int ms)

Automatically perform gyro calibration by waiting a while and
measuring the drift. The robot should be stationary during
this period. The function will return after calibration is
complete (i.e., this method is synchronous).

Parameters:

ms - Number of milliseconds to integrate over. According
to Analog Devices, periods greater than 5000ms are of marginal
benefit.