diff --git a/flight/Modules/Attitude/attitude.c b/flight/Modules/Attitude/attitude.c index 87daf3c52..682484543 100644 --- a/flight/Modules/Attitude/attitude.c +++ b/flight/Modules/Attitude/attitude.c @@ -329,6 +329,13 @@ static void updateAttitude(AttitudeRawData * attitudeRaw) q[1] = q[1] + qdot[1]; q[2] = q[2] + qdot[2]; q[3] = q[3] + qdot[3]; + + if(q[0] < 0) { + q[0] = -q[0]; + q[1] = -q[1]; + q[2] = -q[2]; + q[3] = -q[3]; + } } // Renomalize