add interpolation on cal

This commit is contained in:
TT 2017-09-15 22:13:17 +09:00
parent 0ce695b886
commit 774a11ae74
5 changed files with 90 additions and 4 deletions

1
dsp.c
View file

@ -89,6 +89,7 @@ calculate_gamma(float gamma[2])
float rs = acc_ref_s;
float rc = acc_ref_c;
float rr = rs * rs + rc * rc;
//rr = sqrtf(rr) * 1e8;
float ss = acc_samp_s;
float sc = acc_samp_c;
gamma[0] = (sc * rc + ss * rs) / rr;