From dcf5d7a482e022e762a656253017ebbc721d8a83 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 22 Mar 2018 12:06:41 -0600 Subject: Progress on IMU tracking --- src/survive_default_devices.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/survive_default_devices.c') diff --git a/src/survive_default_devices.c b/src/survive_default_devices.c index 6b65752..2e47b9e 100644 --- a/src/survive_default_devices.c +++ b/src/survive_default_devices.c @@ -144,11 +144,10 @@ int survive_load_htc_config_format(SurviveObject *so, char *ct0conf, int len) { FLT *values = NULL; if (parse_float_array(ct0conf, tk + 2, &values, count) > 0) { so->acc_bias = values; - so->acc_bias[0] *= .125; // XXX Wat? Observed by CNL. Biasing - // by more than this seems to hose - // things. - so->acc_bias[1] *= .125; - so->acc_bias[2] *= .125; + const FLT bias_units = 1. / 1000.; // I deeply suspect bias is in milligravities -JB + so->acc_bias[0] *= bias_units; + so->acc_bias[1] *= bias_units; + so->acc_bias[2] *= bias_units; } } if (jsoneq(ct0conf, tk, "acc_scale") == 0) { -- cgit v1.2.3