+ public static final double counts_per_g = 2048.0;
+
+ public static double convert_accel(double counts) {
+ return counts / counts_per_g * AltosConvert.gravity;
+ }
+
+ /* In radians */
+ public static final double GYRO_FULLSCALE_DEGREES = 2000.0;
+ public static final double GYRO_COUNTS = 32767.0;
+
+ public static double gyro_degrees_per_second(double counts, double cal) {
+ return (counts - cal) * GYRO_FULLSCALE_DEGREES / GYRO_COUNTS;
+ }
+