From 7001fdbbbba9d4fba6c655a254dfb99bc683f455 Mon Sep 17 00:00:00 2001 From: PSAS FC Date: Sun, 19 Jul 2015 01:55:19 -0700 Subject: [PATCH] Fixed Gyro roll direction The IMU is mounted upside down, so a carefully placed negative sign should make it do. --- src/state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state.c b/src/state.c index acdc8ed..51372a5 100644 --- a/src/state.c +++ b/src/state.c @@ -44,6 +44,7 @@ void state_receive_imu(const char *ID, uint8_t *timestamp, uint16_t len, void *b * as accurate at any phase of the launch. */ current_state.acc_up = accel; current_state.roll_rate = roll_rate; + current_state.roll_rate = -roll_rate; //Sensor coordinate frame is rotated 180 if (has_launched) { const double dt = (now - last_time) / 1.0e9;