|
11 | 11 |
|
12 | 12 | import java.util.Arrays;
|
13 | 13 |
|
| 14 | +/* |
| 15 | + * Copyright 2017, Kircher Electronics, LLC |
| 16 | + * |
| 17 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 18 | + * you may not use this file except in compliance with the License. |
| 19 | + * You may obtain a copy of the License at |
| 20 | + * |
| 21 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 22 | + * |
| 23 | + * Unless required by applicable law or agreed to in writing, software |
| 24 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 25 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 26 | + * See the License for the specific language governing permissions and |
| 27 | + * limitations under the License. |
| 28 | + */ |
| 29 | + |
14 | 30 | /**
|
| 31 | + * An implementation of a Kalman filter based orientation sensor fusion. |
| 32 | + * * <p> |
| 33 | + * The filter attempts to fuse magnetometer, gravity and gyroscope |
| 34 | + * sensors together to produce an accurate measurement of the rotation of the |
| 35 | + * device. |
| 36 | + * <p> |
| 37 | + * The magnetometer and acceleration sensors are used to determine one of the |
| 38 | + * two orientation estimations of the device. This measurement is subject to the |
| 39 | + * constraint that the device must not be accelerating and hard and soft-iron |
| 40 | + * distortions are not present in the local magnetic field. |
| 41 | + * <p> |
| 42 | + * The gyroscope is used to determine the second of two orientation estimations |
| 43 | + * of the device. The gyroscope can have a shorter response time and is not |
| 44 | + * effected by linear acceleration or magnetic field distortions, however it |
| 45 | + * experiences drift and has to be compensated periodically by the |
| 46 | + * acceleration/magnetic sensors to remain accurate. |
| 47 | + * <p> |
| 48 | + * Quaternions are used to integrate the measurements of the gyroscope and apply |
| 49 | + * the rotations to each sensors measurements via Kalman filter. This the |
| 50 | + * ideal method because quaternions are not subject to many of the singularties |
| 51 | + * of rotation matrices, such as gimbal lock. |
| 52 | + * <p> |
15 | 53 | * Created by kaleb on 7/6/17.
|
16 | 54 | */
|
17 | 55 |
|
|
0 commit comments