The GG My Block

The GG My Block gets Gyro Sensor feedback and calculates values to store to the Gyro rate and angular position variables. The variable block gSpd stores the current rate of rotation of the Gyro Sensor after accounting for the offset bias. The calculation is not quite as simple as subtracting the bias as we can see from the detailed equation inside the Block Text Field of the Advanced Math block. A new Gyro offset is actually calculated from 99.95 percent of the old gOS variable block and 0.05 percent of the current Gyro rate. This is to account for increased bias over time. It is this new Gyro offset that is subtracted from the current Gyro Sensor block value to return the value for the gSpd variable block.

As opposed to measuring ...

Get Learning LEGO MINDSTORMS EV3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.