mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
Code for hard iron calibration: Every seconds (or faster if enough samples), find a sphere that fit the compass data. Based on Android code. BRANCH=smaug BUG=chrome-os-partner:39900 TEST=Check hard-iron bias is removed. Works better outside. Change-Id: Iab479d5113b6560b4f01b0fd87373d2eecdb9b54 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/299583 Reviewed-by: Anton Staaf <robotboy@chromium.org>
24 lines
598 B
C
24 lines
598 B
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Header file for common math functions. */
|
|
#ifndef __CROS_EC_MAT_44_H
|
|
|
|
#define __CROS_EC_MAT_44_H
|
|
|
|
#include "vec4.h"
|
|
#include "util.h"
|
|
|
|
typedef float mat44_t[4][4];
|
|
typedef size_t size4_t[4];
|
|
|
|
void mat44_decompose_lup(mat44_t LU, size4_t pivot);
|
|
|
|
void mat44_swap_rows(mat44_t A, const size_t i, const size_t j);
|
|
|
|
void mat44_solve(mat44_t A, vec4_t x, const vec4_t b, const size4_t pivot);
|
|
|
|
#endif /* __CROS_EC_MAT_44_H */
|