Skip to content

Commit

Permalink
Create a log group for sensfusion6 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lkumar93 committed Nov 3, 2016
1 parent c1da0ae commit 03cf9ff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/modules/src/sensfusion6.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <math.h>

#include "sensfusion6.h"
#include "log.h"
#include "param.h"

#define M_PI_F ((float) M_PI)
Expand Down Expand Up @@ -306,6 +307,18 @@ static void estimatedGravityDirection(float* gx, float* gy, float* gz)
*gz = q0 * q0 - q1 * q1 - q2 * q2 + q3 * q3;
}

LOG_GROUP_START(sensorfusion6)
LOG_ADD(LOG_FLOAT, qw, &q0)
LOG_ADD(LOG_FLOAT, qx, &q1)
LOG_ADD(LOG_FLOAT, qy, &q2)
LOG_ADD(LOG_FLOAT, qz, &q3)
LOG_ADD(LOG_FLOAT, gravityX, &gravX)
LOG_ADD(LOG_FLOAT, gravityY, &gravY)
LOG_ADD(LOG_FLOAT, gravityZ, &gravZ)
LOG_ADD(LOG_FLOAT, accZbase, &baseZacc)
LOG_ADD(LOG_UINT8, isInit, &isInit)
LOG_ADD(LOG_UINT8, isCalibrated, &isCalibrated)
LOG_GROUP_STOP(sensorfusion6)

PARAM_GROUP_START(sensorfusion6)
#ifdef MADWICK_QUATERNION_IMU
Expand Down

0 comments on commit 03cf9ff

Please sign in to comment.