10 memset(w, 0,
sizeof *w);
11 w->
D[0] = w->
D[4] = w->
D[8] = 1.0f;
18 w->
sum[0] += v[0]; w->
sum[1] += v[1]; w->
sum[2] += v[2];
26 memcpy(w->
D, Dn,
sizeof Dn);
31 if (w->
n == 0)
return -1;
32 const float k = 1.0f / (float)w->
n;
33 const float m[3] = { w->
sum[0]*k, w->
sum[1]*k, w->
sum[2]*k };
void accwin_rotate(accwin_t *w, const float E[9])
after every propagation
void accwin_add(accwin_t *w, const float acc[3])
sample in the current body
int accwin_mean(const accwin_t *w, float out[3])
in the current body, 0 = OK
void accwin_reset(accwin_t *w)
Windowed accelerometer mean, compensated for rotation.
void mat3_vec(const float A[9], const float x[3], float y[3])
y = A*x
void mat3t_vec(const float A[9], const float x[3], float y[3])
y = A'*x
void mat3_mul(const float A[9], const float B[9], float C[9])
C = A*B
Single-precision SO(3) Lie-group utilities (port of expSO3.m / skewSym.m + firmware helpers).
float D[9]
rotation body(start) <- body(now)